@datagrok/bio 2.12.8 → 2.12.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see package.js.LICENSE.txt */
2
- var bio;(()=>{var n={2012:(n,t,e)=>{"use strict";e.d(t,{f:()=>r});var i=e(9976);class r extends i.B{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,r)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,r)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new r({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(n){const t=n in r.aaSynonyms?r.aaSynonyms[n]:n;return super.get(t)}}r.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class a{static getPalette(n="grok"){switch(n){case"grok":return r.GrokGroups;case"lesk":return r.Lesk;default:throw new Error(`ChemPalette: scheme \`${n}\` does not exist`)}}static getInnerOuter(n){let t=0,e="",i="";for(const r of n)"("==r?t++:")"==r?t--:t?e+=r:i+=r;return isNaN(parseInt(e))?[i,e]:[i,""]}static getColorAAPivot(n="",t="grok"){const e=this.getPalette(t);let[i,r]=this.getInnerOuter(n);if(i=i.length>6?`${i.slice(0,3)}...`:i,r=r.length>6?`${r.slice(0,3)}...`:r,1==n.length||"("==n[1]){const t=n[0]?.toUpperCase();return t in e?[e.get(t),t,r,1]:[this.undefinedColor,i,r,1]}if("d"==n[0]&&n[1]in e&&(2==n.length||"("==n[2])){const t=n[1]?.toUpperCase();return t in e?[e.get(t),t,r,2]:[this.undefinedColor,i,r,2]}if(n.substring(0,3)in this.AAFullNames&&(3==n.length||"("==n[3])){const t=this.AAFullNames[n.substring(0,3)];return t in e?[e.get(t),t,r,3]:[this.undefinedColor,i,r,3]}if(n[0]?.toLowerCase()==n[0]&&n.substring(1,3)in this.AAFullNames&&(4==n.length||"("==n[4])){const t=this.AAFullNames[n.substring(1,3)];return t in e?[e.get(t),t,r,4]:[this.undefinedColor,i,r,4]}return[this.undefinedColor,i,r,0]}}a.SemType="Aminoacids",a.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",a.undefinedColor="rgb(100,100,100)",a.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},a.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},a.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},a.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"}},6584:(n,t,e)=>{"use strict";e.d(t,{BX:()=>a,nW:()=>o,tW:()=>f});var i=e(4469);const r="Libraries",a="System:AppData/Bio/monomer-libraries/";let s=Promise.resolve();async function o(){let n;return s=s.then((async()=>{const t=await i.dapi.userDataStorage.getValue(r,"Settings",!0);n=t?JSON.parse(t):{exclude:[],explicit:[]},n.exclude=n.exclude instanceof Array?n.exclude:[],n.explicit=n.explicit instanceof Array?n.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(n,void 0,2)}`)})),await s,n}async function f(n){s=s.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(n,void 0,2)}`),await i.dapi.userDataStorage.postValue(r,"Settings",JSON.stringify(n),!0)})),await s}},7228:(n,t,e)=>{"use strict";e.d(t,{GR:()=>b,JN:()=>h,Qx:()=>u,Xk:()=>d});var i=e(976),r=e(4469),a=e(1047),s=e(6286),o=(e(8260),e(8457)),f=e(5697);function d(n){const t=[];for(let e=0;e<n.rowCount;e++){const i={};Object.keys(a.K4).forEach((t=>{if("symbol"===t){const r=n.get(a.K4[t],e);i[t]="."===r?n.get(a.At,e):r}else if("rgroups"===t){const r=n.get(a.K4[t],e).split("\n"),s=[];r.forEach((n=>{const t={},e=n.substring(n.lastIndexOf("]")+1),i=n.match(/\[R(\d+)\]/)[1];t.capGroupSMILES="H"===e?`[*:${i}][H]`:`O[*:${i}]`,t.alternateId="H"===e?`R${i}-H`:`R${i}-OH`,t.capGroupName="H"===e?"H":"OH",t.label=`R${i}`,s.push(t)})),i[t]=s}else a.K4[t]&&(i[t]=n.get(a.K4[t],e))})),t.push(i)}return t}async function h(){const n=i.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===n.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await n[0].prepare().call()).getOutputParamValue()}async function u(n,t){n instanceof i.Column&&(n=(0,o.O)(n).columns.toList());const e=(await h()).getBioLib(),a=new Array(n.length),f=n[0].length,d=new Float32Array(f);for(let o=0;o<n.length;++o){const h=t.getCanonical(o),u=e.getMonomer("PEPTIDE",h)?.smiles??"",c=n[o],b=c.getRawData(),l=c.categories,g=l.indexOf("");if(a[o]={categories:l,data:b,emptyIndex:g},void 0===h)continue;const D=i.Column.fromStrings("smiles",l.map((n=>e.getMonomer("PEPTIDE",n)?.smiles??""))),j=(i.DataFrame.fromColumns([D]),(await r.chem.getSimilarities(D,u)).getRawData());for(let n=0;n<f;++n){const t=b[n];d[n]+=h!==s.G2&&t!==g?j[t]:h===s.G2&&t===g?1:0}}for(let e=0;e<d.length;++e){let r=d[e]/t.length;for(let s=0;s<n.length;++s){const n=a[s];if(s>=t.length&&n.data[e]!==n.emptyIndex||n.data[e]===n.emptyIndex&&s<t.length){r=i.FLOAT_NULL;break}}d[e]=r}return i.Column.fromFloat32Array("Similarity",d)}async function c(n){const t=(await h()).getBioLib(),e=[],a={},s=n.map((n=>t.getMonomer("PEPTIDE",n)?.smiles??"")),o=i.Column.fromStrings("smiles",s);for(let t=0;t<s.length;++t){a[n[t]]=t;const i=s[t],f=""===i?new Array(s.length).fill(0):(await r.chem.getSimilarities(o,i)).getRawData();f[t]=1,e[t]=Array.from(f)}return{scoringMatrix:e,alphabetIndexes:a}}async function b(n,t="Morgan"){const e=(await h()).getBioLib(),r=new Array(n.length).fill(0).map((()=>new Array(n.length).fill(0))),a={},s=n.map((n=>e.getMonomer("PEPTIDE",n)?.smiles??"")),o=i.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!o)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await c(n);const d=i.Column.fromStrings("smiles",s),u=(i.DataFrame.fromColumns([d]),(await o.apply({col:d,fingerprintType:t}))?.entries);if(!u)return console.warn(`${t} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await c(n);for(let t=0;t<u.length;++t)if(r[t][t]=1,a[n[t]]=t,u[t])for(let n=t+1;n<u.length;++n)u[n]&&(r[t][n]=r[n][t]=(0,f.Z3)(u[t],u[n]));return{scoringMatrix:r,alphabetIndexes:a}}},8601:(n,t,e)=>{"use strict";e.d(t,{i0:()=>c});var i=e(4469),r=e(976),a=e(6414),s=e.n(a),o=e(1821),f=e(8260);const d={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:"d",RIBOSE:"r",PHOSPHATE:"p",OXYGEN:"O",HYDROGEN:"H"};var h=e(1047);function u(n){return Math.round(d.PRECISION_FACTOR*n)/d.PRECISION_FACTOR}async function c(n,t,a){if(0===r.Func.find({package:"Chem",name:"getRdKitModule"}).length)return{col:null,warnings:['Transformation to atomic level requires the package "Chem" installed.']};if(t.semType!==r.SEMTYPE.MACROMOLECULE)return{col:null,warnings:[`Only the ${r.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${t.semType}'`]};let u=t;const c=f.g.forColumn(t);c.isHelm()&&(u=c.convert(o.r2.SEPARATOR,"."),u.name=t.name);const l=f.g.forColumn(u).alphabet;let g;if("PT"===l||"UN"===l)g="PEPTIDE";else{if("RNA"!==l&&"DNA"!==l)return{col:null,warnings:[`Unexpected column's '${u.name}' alphabet '${l}'.`]};g="RNA"}const D=function(n){const t=n.length,e=new Array(t),r=f.g.forColumn(n);let a=!1;for(let n=0;n<t;++n){const t=r.getSplitted(n);a||(a=0===t.length),e[n]=s()(t.canonicals).filter((n=>!r.isGap(n))).map((n=>n)).toArray()}return a&&i.shell.warning(`Some values in the "${n.name}" column are empty`),e}(u),j=await async function(n,t,e,r){const a=function(n,t,e){const i=new Map;for(const r of n.getMonomerSymbolsByType(t)){const a=n.getMonomer(t,r);if("RNA"===t&&("Branch"===a.monomerType||"DNA"===e&&a.symbol===d.DEOXYRIBOSE||"RNA"===e&&a.symbol===d.RIBOSE||a.symbol===d.PHOSPHATE)||"PEPTIDE"===t&&"Branch"!==a.monomerType){const n={};h.rx.forEach((t=>{n[t]=a[t]})),i.set(a.symbol,n)}}return i}(t,e,r),s=new Map,o=await i.functions.call("Chem:getRdKitModule"),f={value:null};if("RNA"===e){const n="RNA"===r?[d.RIBOSE,d.PHOSPHATE]:[d.DEOXYRIBOSE,d.PHOSPHATE];for(const t of n)b(s,t,a,o,e,f)}for(let t=0;t<n.length;++t){const i=n[t];for(const n of i)if(""!==n)try{b(s,n,a,o,e,f)}catch(t){const e=t instanceof Error?t.message:t.toString(),i=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${n}', error:\n${e}\n${i}`),new Error(`Can't get monomer '${n}' from library: ${e}`)}}return s}(D,a,g,l),H=u.length,{molfileList:A,molfileWarningList:p}=await async function(n,t,i,r,a){const s=Math.max(navigator.hardwareConcurrency-2,1),o=new Array(s).fill(null).map((()=>new Worker(new URL(e.p+e.u(79),e.b)))),f=a/s;let d=[],h=[];const u=new Array(s);for(let e=0;e<s;e++){const d=Math.floor(e*f),h=e===s-1?a:Math.floor((e+1)*f);o[e].postMessage({monomerSequencesArray:n,monomersDict:t,alphabet:i,polymerType:r,start:d,end:h}),u[e]=new Promise((n=>{o[e].onmessage=({data:{molfileList:t,molfileWarningList:e}})=>{n({molfileList:t,molfileWarningList:e})}}))}return(await Promise.all(u)).forEach((n=>{d=d.concat(...n.molfileList),h=h.concat(...n.molfileWarningList)})),setTimeout((()=>{o.forEach((n=>{n.terminate()}))}),0),{molfileList:d,molfileWarningList:h}}(D,j,l,g,H);if(p.length>.05*H)throw new Error("Too many errors getting molfiles.");const I=`molfile(${u.name})`,M=n.columns.getUnusedName(I),T=r.Column.fromStrings(M,A);return T.semType=r.SEMTYPE.MOLECULE,T.setTag(r.TAGS.UNITS,r.UNITS.Molecule.MOLBLOCK),{col:T,warnings:p}}function b(n,t,e,i,r,a){if(!n.has(t)){const s=function(n,t,e,i,r){if(t.has(n)){const s=t.get(n),o=function(n){const t=[];for(const e of n){let n=e.capGroupSMILES;n||(n=e.capGroupSMILES),n=n.replace(/(\[|\]|\*|:|\d)/g,""),t.push(n)}return t}(s.rgroups),f=(a=s.molfile).includes("V3000")?function(n){const t=new Map,e=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let i;for(;null!==(i=e.exec(n));)i.index===e.lastIndex&&e.lastIndex++,t.set(parseInt(i[1]),parseInt(i[3]));return t}(a):function(n){const t=new Map;let e=n.indexOf(d.V2K_A_LINE,0),i=e;for(;-1!==e;){i=n.indexOf("\n",e);const r=parseInt(n.substring(e,i).replace(/^A\s+/,""));e=n.indexOf("R",i),i=n.indexOf("\n",e);const a=parseInt(n.substring(e,i).replace(/^R/,""));t.set(r,a),e=n.indexOf(d.V2K_A_LINE,i)}for(e=n.indexOf(d.V2K_RGP_LINE,0),i=n.indexOf("\n",e);-1!==e;){e+=d.V2K_RGP_SHIFT,i=n.indexOf("\n",e);const r=n.substring(e,i).replaceAll(/\s+/g," ").split(" ").map((n=>parseInt(n))).slice(1);for(let n=0;n<r.length;n+=2){if(t.has(r[n])&&t.get(r[n])!==r[n+1])throw new Error(`r-group index ${r[n]} has already been added with a different value`);t.set(r[n],r[n+1])}e=n.indexOf(d.V2K_RGP_LINE,i)}return t}(a),h=s.molfile.includes("V3000")?s.molfile:function(n,t){const e=t.get_mol(n),i=e.get_v3Kmolblock();return e.delete(),i}(function(n){let t=n.indexOf(d.V2K_A_LINE,0);-1===t&&(t=n.indexOf(d.V2K_RGP_LINE));const e=n.indexOf(d.V3K_END,t);return n.substring(0,t)+n.substring(e)}(s.molfile),e),c=function(n){let t=(n=n.replaceAll("\r","")).indexOf(d.V3K_BEGIN_COUNTS_LINE)+d.V3K_COUNTS_SHIFT,e=n.indexOf(" ",t+1);const i=parseInt(n.substring(t,e));return t=e+1,e=n.indexOf(" ",t+1),{atomCount:i,bondCount:parseInt(n.substring(t,e))}}(h),b=function(n,t){const e=new Array(t),i=new Float32Array(t),r=new Float32Array(t),a=new Array(t);let s=n.indexOf(d.V3K_BEGIN_ATOM_BLOCK);s=n.indexOf("\n",s);let o=s;for(let f=0;f<t;f++){s=n.indexOf(d.V3K_BEGIN_DATA_LINE,s)+d.V3K_IDX_SHIFT,o=n.indexOf(" ",s),s=o+1,o=n.indexOf(" ",s),e[f]=n.substring(s,o);const t=new Array(2);for(let e=0;e<2;++e)s=o+1,o=n.indexOf(" ",s),t[e]=parseFloat(n.substring(s,o));i[f]=t[0],r[f]=t[1],s=o,o=n.indexOf("\n",s)+1,a[f]=n.slice(s,o),s=o}return{atomTypes:e,x:i,y:r,kwargs:a}}(h,c.atomCount),D=function(n,t){const e=new Uint32Array(t),i=new Array(t),r=new Map,a=new Map;let s=n.indexOf(d.V3K_BEGIN_BOND_BLOCK);s=n.indexOf("\n",s);let o=s;for(let f=0;f<t;++f){const t=new Array(3);s=n.indexOf(d.V3K_BEGIN_DATA_LINE,o)+d.V3K_IDX_SHIFT,o=n.indexOf(" ",s);for(let e=0;e<3;++e)s=o+1,o=Math.min(n.indexOf("\n",s),n.indexOf(" ",s)),t[e]=parseInt(n.slice(s,o));e[f]=t[0],i[f]=t.slice(1);const h=n.indexOf("\n",s);let u=n.slice(o,h),c=u.indexOf(d.V3K_BOND_CONFIG);if(-1!==c){c=u.indexOf("=",c)+1;let n=u.indexOf(" ",c);-1===n&&(n=u.length);const t=parseInt(u.slice(c,n));r.set(f,t);const e=d.V3K_BOND_CONFIG+t.toString();u=u.replace(e,"")}u||a.set(f,u)}return{bondTypes:e,atomPairs:i,bondConfiguration:r,kwargs:a}}(h,c.bondCount),H=function(n,t,e,i){const r={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};return function(n,t,e){for(const[i,r]of e)n.atomTypes[i-1]=t[r-1]}(n,e,i),function(n,t){t.rNodes=Array.from(n.keys());for(let e=0;e<t.rNodes.length;e++)for(const i of[1,2])if(n.get(t.rNodes[e])===i){const n=t.rNodes[i-1];t.rNodes[i-1]=t.rNodes[e],t.rNodes[e]=n}}(i,r),l(t,r),r}(b,D,o,f),T=function(n){let t=[],e=n.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==e;){e+=28;const i=n.indexOf(")",e);t=t.concat(n.substring(e,i).split(" ").slice(1).map((n=>parseInt(n)))),e=i,e=n.indexOf("M V30 MDLV30/STEABS ATOMS=(",e)}return t}(h),m={atoms:b,bonds:D,meta:H,stereoAtoms:T};return"PEPTIDE"===i?function(n){const t=n.meta.terminalNodes[0]-1,e=n.meta.rNodes[0]-1,i=n.atoms.x,r=n.atoms.y;M(n,-i[t],-r[t]);const a=A(i[e],r[e]);p(n.atoms,-a),i[n.meta.rNodes[1]-1]<0&&function(n){I(n,!1)}(n);const s=function(n){const t=function(n){const t=new Map;for(const e of n.bonds.atomPairs)for(let n=0;n<2;n++){const i=e[n],r=e[(n+1)%2];t.has(i)?t.get(i)?.push(r):t.set(i,new Array(1).fill(r))}return t}(n);let e=0;const i=n.atoms.atomTypes.length;let r=0;for(;0===e;){const a=t.get(n.meta.terminalNodes[1])[r];if(n.atoms.atomTypes[a-1]===d.OXYGEN&&a!==n.meta.rNodes[1]&&(e=a),r++,r>i)throw new Error(`Search for double-bonded Oxygen in ${n} has exceeded the limit of ${i}`)}return e}(n);!function(n,t){n.atoms.y[n.meta.rNodes[1]-1]<0&&n.atoms.y[t-1]<0&&(function(n){I(n,!0)}(n),p(n.atoms,-function(n,t){return A(n,t)+Math.PI/2}(n.atoms.x[n.meta.terminalNodes[1]-1],n.atoms.y[n.meta.terminalNodes[1]-1])))}(n,s),function(n,t){const e=n.atoms.x;e[n.meta.rNodes[1]-1]>e[t-1]&&function(n,t,e){const i=t-1,r=e-1,a=n.atoms.x,s=n.atoms.y,o=a[i],f=s[i];a[i]=a[r],s[i]=s[r],a[r]=o,s[r]=f}(n,t,n.meta.rNodes[1])}(n,s)}(m):n===d.RIBOSE||n===d.DEOXYRIBOSE?function(n,t){const e=n.atoms.x,i=n.atoms.y;let r=n.meta.terminalNodes[0]-1;const a=n.meta.rNodes[1]-1;M(n,-e[r],-i[r]);const s=A(e[a],i[a]);p(n.atoms,3*Math.PI/2-s),t.value=function(n){const t=n.atoms.x,e=n.atoms.y,i=n.meta.rNodes[2]-1,r=n.meta.terminalNodes[2]-1,a=t[i]-t[r],s=e[i]-e[r];return Math.atan(s/a)+Math.PI/2}(n),r=n.meta.terminalNodes[0]-1,M(n,-e[r],-i[r])}(m,r):n===d.PHOSPHATE?function(n){const t=n.meta.terminalNodes[0]-1,e=n.meta.rNodes[0]-1,i=n.atoms.x,r=n.atoms.y;M(n,-i[t],-r[t]);const a=A(i[e],r[e]);p(n.atoms,Math.PI/2-a)}(m):function(n,t){const e=n.atoms.x,i=n.atoms.y,r=n.meta.terminalNodes[0]-1,a=n.meta.rNodes[0]-1;M(n,-e[r],-i[r]);const s=A(e[a],i[a]),o=t.value;if(!o)throw new Error("The value of sugarBranchToOYAngle is null");p(n.atoms,Math.PI-s+o);const f=function(n,t){return u(Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2))}({x:e[n.meta.rNodes[0]-1],y:i[n.meta.rNodes[0]-1]},{x:e[n.meta.terminalNodes[0]-1],y:i[n.meta.terminalNodes[0]-1]});if(1!=f)for(let n=0;n<e.length;++n)e[n]=u(e[n]/f),i[n]=u(i[n]/f)}(m,r),function(n,t,e){"PEPTIDE"===n?(g(t,n),j(t,t.meta.rNodes[1])):e===d.RIBOSE||e===d.DEOXYRIBOSE?(j(t,t.meta.rNodes[1]),t.meta.rNodes[1]=t.meta.terminalNodes[1],l(t.bonds,t.meta),g(t,n),j(t,t.meta.rNodes[1]),j(t,t.meta.rNodes[0]),j(t,t.meta.rNodes[2])):e===d.PHOSPHATE&&(t.meta.terminalNodes[0]=t.meta.rNodes[0],M(t,-t.atoms.x[t.meta.terminalNodes[0]-1],-t.atoms.y[t.meta.terminalNodes[0]-1]),g(t,n),j(t,t.meta.rNodes[1]))}(i,m,n),function(n){let t=0;for(;t<n.atoms.atomTypes.length;)n.atoms.atomTypes[t]===d.HYDROGEN&&(j(n,t+1),--t),++t}(m),m}var a;return null}(t,e,i,r,a);if(!s)throw new Error(`Monomer with symbol '${t}' is absent the monomer library`);n.set(t,s)}}function l(n,t){const e=t.rNodes;t.terminalNodes=new Array(e.length).fill(0);const i=t.terminalNodes,r=n.atomPairs;let a=0,s=0;for(;a<r.length&&s<i.length;){for(let n=0;n<i.length;++n)for(let t=0;t<2;++t)r[a][t]===e[n]&&(i[n]=r[a][(t+1)%2],e.length,++s);++a}}function g(n,t){n.meta.rNodes.length>1&&(n.meta.backboneShift=D(n,n.meta.rNodes[1]-1,n.meta.terminalNodes[0]-1)),"RNA"===t&&n.meta.rNodes.length>2&&(n.meta.branchShift=D(n,n.meta.rNodes[2]-1,n.meta.terminalNodes[0]-1))}function D(n,t,e){return[u(n.atoms.x[t]-n.atoms.x[e]),u(n.atoms.y[t]-n.atoms.y[e])]}function j(n,t){if(void 0!==t){const e=t-1,i=n.atoms,r=n.bonds,a=n.meta;i.atomTypes.splice(e,1),i.x=H(Float32Array,i.x,e,1),i.y=H(Float32Array,i.y,e,1),i.kwargs.splice(e,1);for(let n=0;n<a.terminalNodes.length;++n)a.terminalNodes[n]>t?--a.terminalNodes[n]:a.terminalNodes[n]===t&&(a.terminalNodes[n]=-1);for(let n=0;n<a.rNodes.length;++n)a.rNodes[n]>t?--a.rNodes[n]:a.rNodes[n]===t&&(a.rNodes[n]=-1);let s=0;for(;s<r.atomPairs.length;){const n=r.atomPairs[s][0],e=r.atomPairs[s][1];n===t||e===t?(r.atomPairs.splice(s,1),r.bondTypes=H(Uint32Array,r.bondTypes,s,1),r.bondConfiguration.has(s)&&r.bondConfiguration.delete(s),r.kwargs.has(s)&&r.kwargs.delete(s),--s):(r.atomPairs[s][0]=n>t?n-1:n,r.atomPairs[s][1]=e>t?e-1:e),++s}let o=Array.from(r.bondConfiguration.keys());o.forEach((n=>{if(r.bondConfiguration.has(n)&&n>e){const t=r.bondConfiguration.get(n);r.bondConfiguration.delete(n),r.bondConfiguration.set(n-1,t)}})),o=Array.from(r.kwargs.keys()),o.forEach((n=>{if(r.kwargs.has(n)&&n>e){const t=r.kwargs.get(n);r.kwargs.delete(n),r.kwargs.set(n-1,t)}}))}}function H(n,t,e,i){const r=new n(t.length-i);let a=0,s=0;for(;a<t.length;)a===e&&(a+=i),r[s]=t[a],++s,++a;return r}function A(n,t){let e;if(0===n)e=t>0?0:Math.PI;else if(0===t)e=n>0?-Math.PI/2:Math.PI/2;else{const i=t/n,r=Math.atan(i);e=n<0?Math.PI/2+r:-Math.PI/2+r}return e}function p(n,t){if(0!==t){const e=n.x,i=n.y,r=Math.cos(t),a=Math.sin(t);for(let n=0;n<e.length;++n){const t=e[n];e[n]=u(t*r-i[n]*a),i[n]=u(t*a+i[n]*r)}}}function I(n,t){if(t){const t=n.atoms.y;for(let n=0;n<t.length;n++)t[n]=-t[n]}else{const t=n.atoms.x;for(let n=0;n<t.length;n++)t[n]=-t[n]}const e=n.bonds.bondConfiguration;for(const[n,t]of e){const i=1===t?3:1;e.set(n,i)}}function M(n,t,e){const i=n.atoms.x,r=n.atoms.y;for(let n=0;n<i.length;++n)i[n]=u(i[n]+t),void 0!==e&&(r[n]=u(r[n]+e))}},6137:(n,t,e)=>{"use strict";e.d(t,{J:()=>r});var i=e(9976);class r extends i.B{static get Chromatogram(){return void 0===this.chromatogram&&(this.chromatogram=new r({A:"green",C:"blue",G:"black",T:"red",U:"red",others:"gray"})),this.chromatogram}}class a{}a.SemType="Nucleotides",a.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",a.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},9976:(n,t,e)=>{"use strict";e.d(t,{B:()=>i});class i{static makePalette(n,t=!1,e=i){const r={};return n.forEach((n=>{const e=n[0],i=n[1];e.forEach(((n,e)=>{r[n]=this.colourPalette[i][t?0:e]}))})),new e(r)}constructor(n){this._palette=n}get(n){return this._palette[n]}}i.undefinedColor="rgb(100,100,100)",i.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]}},7331:(n,t,e)=>{"use strict";e.d(t,{UE:()=>d});var i=e(976),r=e(9976);class a{static hashCode(n){let t=0;if(0===n.length)return t;for(let e=0;e<n.length;e++)t=(t<<5)-t+n.charCodeAt(e),t|=0;return t}}class s{}class o extends s{get(n){return"#666666"}}class f extends s{static buildPalette(){return[].concat(...Object.values(r.B.colourPalette))}get(n){const t=a.hashCode(n)%f.palette.length;return function(n){if(null==n)return"rgb(100,100,100)";const t=i.Color.fromHtml(n),e=i.Color.g(t),r=i.Color.r(t),a=i.Color.b(t),s=Math.sqrt(Math.pow(0-r,2)+Math.pow(0-e,2)+Math.pow(0-a,2));return s>210?`rgb(${r/s*210},${e/s*210},${a/s*210})`:i.Color.toRgb(t)}(f.palette[t])}}f.palette=f.buildPalette();class d extends r.B{static get Gray(){return void 0===this.gray&&(this.gray=new o),this.gray}static get Color(){return void 0===this.color&&(this.color=new f),this.color}}},9611:(n,t,e)=>{"use strict";e.d(t,{A:()=>d});var i=e(4469),r=e(976),a=e(6414),s=e.n(a),o=e(8260);const f={DNA:"RNA",RNA:"RNA",PT:"PEPTIDE",UN:"PEPTIDE"};class d{get updated(){return this._updated}constructor(n,t,e){this.grid=n,this.col=t,this.propsProvider=e,this._monomerLengthList=null,this.separatorWidth=5,this._updated=!1,this._monomerLengthMap={},this._monomerStructureMap={},this.subs=[],this.props=this.propsProvider(),this._rowsProcessed=r.BitSet.create(this.col.length),this.grid&&(this.subs.push(t.dataFrame.onDataChanged.subscribe((()=>{try{this.props=this.propsProvider(),this._monomerLengthList=null,this._rowsProcessed=r.BitSet.create(this.col.length)}catch(n){console.error(n)}}))),this.subs.push(i.events.onViewRemoved.subscribe((n=>{try{this.grid?.view?.id===n.id&&this.destroy()}catch(n){console.error(n)}}))))}destroy(){for(const n of this.subs)n.unsubscribe()}getCellMonomerLengths(n){const t=this.props.seqHandler.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(n),e=new Array(t.length+1);e[0]=5;for(let n=1;n<e.length;n++)e[n]=e[n-1]+t[n-1];return[t,e]}getCellMonomerLengthsForSeq(n){null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.col.length).fill(null),this._updated=!0);let t=this._monomerLengthList[n];if(null===t){const e=o.g.forColumn(this.col).getSplitted(n).originals;t=this._monomerLengthList[n]=new Array(e.length);for(const[n,i]of s().enumerate(e)){const e=this.props.monomerToShort(n,this.props.monomerLengthLimit),r=(this.props.seqHandler.isSeparator()?this.separatorWidth:this.props.separatorWidth)+e.length*this.props.monomerCharWidth;t[i]=r}this._updated=!0}return t}getCellMonomerLengthsForSeqMsa(){var n;null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null),this._updated=!0),(n=this._monomerLengthList)[0]??(n[0]=new Array(0));const t=this._monomerLengthList[0],{startIdx:e,endIdx:i}=(()=>{try{return this.grid&&this.grid.dart?{startIdx:Math.max(Math.floor((this.grid?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((this.grid?.vertScroll.max??0)+10),this.col.length)}:{startIdx:0,endIdx:Math.min(this.col.length,10)}}catch(n){return{startIdx:0,endIdx:Math.min(this.col.length,10)}}})();for(let n=e;n<i;n++){if(this._rowsProcessed.get(n))continue;const e=o.g.forColumn(this.col).getSplitted(n).originals;e.length>t.length&&t.push(...new Array(e.length-t.length).fill(0));for(const[n,i]of s().enumerate(e)){const e=this.props.monomerToShort(n,this.props.monomerLengthLimit),r=this.props.separatorWidth+e.length*this.props.monomerCharWidth;t[i]=Math.max(t[i]??0,r)}this._updated=!0}return t}getPosition(n,t){const[e,i]=this.getCellMonomerLengths(n),r=o.g.forColumn(this.col),a=s()(r.getSplitted(n).originals).toArray();if(0===a.length)return null;let f=100,d=null,h=a.length,u=!1,c=0;if(i[0]<=t&&t<i.slice(-1)[0])for(;!u;)if(c=Math.floor((h+(d??0))/2),t>=i[c]&&t<=i[c+1]?(d=c,u=!0):t<i[c]?h=c-1:t>i[c+1]&&(d=c+1),d==h&&(u=!0),--f<=0)throw new Error(`Get position for pointer x = ${t} searching has not converged on ${JSON.stringify(i)}. `);return d}getMonomer(n){const t=this.props.seqHandler.alphabet??"UN",e=f[t];return this.props.monomerLib?.getMonomer(e,n)??null}setMonomerLengthLimit(n){this.props.monomerLengthLimit=n,this._updated=!0}setSeparatorWidth(n){this.props.separatorWidth=n,this._updated=!0}isMsa(){return this.props.seqHandler.isMsa()}}},1047:(n,t,e)=>{"use strict";e.d(t,{$3:()=>o,At:()=>r,K4:()=>a,Z2:()=>s,pU:()=>f,rx:()=>i});const i=["symbol","molfile","rgroups","name"],r="MonomerName",a={monomerType:null,smiles:null,name:"MonomerName",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerCode"},s={monomerType:"Backbone",smiles:"",name:"",author:"Datagrok",molfile:"",naturalAnalog:"",rgroups:[],createDate:null,id:0,polymerType:"PEPTIDE",symbol:""},o="p",f=new RegExp(`[rd]\\((\\w)\\)${o}?`,"g")},7945:(n,t,e)=>{"use strict";function i(n){return"string"==typeof n||n instanceof String?n:"StateError"===n.constructor.name?n.message:"StateError"===n.constructor.name&&"$thrownJsError"in n?i(n.$thrownJsError):n instanceof Error?n.message:n.toString()}function r(n){return n instanceof Error?n.stack:"StateError"===n.constructor.name&&"$thrownJsError"in n?r(n.$thrownJsError):void 0}function a(n){return[i(n),r(n)]}e.d(t,{yf:()=>a})},5226:(n,t,e)=>{"use strict";e.d(t,{i:()=>s});var i=e(976),r=e(8260),a=e(1821);class s{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(n,t){return this._fileContent.slice(n,t).split(/\s/).join("")}parseColumns(){const n=/^>(.*)$/gm;let t,e=0;for(;t=n.exec(this._fileContent);){const i=this._fileContent.substring(t.index+1,n.lastIndex);this._descriptionsArray.push(i),0!==e&&this._sequencesArray.push(this.parseMacromolecule(e,t.index)),e=n.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(e,-1))}importFasta(){const n=i.Column.fromStrings("description",this.descriptionsArray),t=i.Column.fromStrings("sequence",this.sequencesArray);return t.semType=i.SEMTYPE.MACROMOLECULE,t.setTag(i.TAGS.UNITS,a.r2.FASTA),r.g.forColumn(t),[i.DataFrame.fromColumns([n,t])]}constructor(n){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=n,this.parseColumns()}}},1821:(n,t,e)=>{"use strict";e.d(t,{BM:()=>s,CI:()=>a,XS:()=>f,r2:()=>i});var i,r=e(6286);!function(n){n.FASTA="fasta",n.SEPARATOR="separator",n.HELM="helm"}(i||(i={}));const a=", ",s=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,o=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}},f=[new r.LA("PT",o.fasta.peptide,.5),new r.LA("DNA",o.fasta.dna,.55),new r.LA("RNA",o.fasta.rna,.55)]},8447:(n,t,e)=>{"use strict";e.d(t,{Ar:()=>r.Ar,CI:()=>i.CI,GU:()=>r.GU,XS:()=>i.XS,dQ:()=>r.dQ,gP:()=>r.gP,kB:()=>r.kB,py:()=>r.py,r2:()=>i.r2,up:()=>r.up});var i=e(1821),r=e(2583)},6286:(n,t,e)=>{"use strict";e.d(t,{G2:()=>i,LA:()=>r,dJ:()=>a});const i="";class r{constructor(n,t,e){this.name=n,this.alphabet=t,this.cutoff=e}}class a extends r{constructor(n,t,e){super(n.name,n.alphabet,n.cutoff),this.freq=t,this.similarity=e}}},2583:(n,t,e)=>{"use strict";e.d(t,{wx:()=>l,w4:()=>J,py:()=>N,vU:()=>M,Ar:()=>H,GU:()=>m,dQ:()=>P,up:()=>w,kB:()=>D,FJ:()=>j,gP:()=>I});var i=e(976),r=e(6414),a=e.n(r),s=e(6286),o=e(1821),f=e(8260);class d extends Float32Array{}var h=e(850),u=e(2012),c=e(6137),b=e(7331);class l{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(n){return this.getOriginal(n)===this.gapOriginalMonomer}getCanonical(n){if(this.length<=n)throw new Error("Index out of bounds");return this.mList[n]}getOriginal(n){if(this.length<=n)throw new Error("Index out of bounds");return this.mList[n]}constructor(n,t){this.mList=n,this.gapOriginalMonomer=t}}class g{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(n){return this.getOriginal(n)===f.lh[o.r2.FASTA]}getCanonical(n){if(this.length<=n)throw new Error("Index out of bounds");return this.isGap(n)?s.G2:this.seqS[n]}getOriginal(n){if(this.length<=n)throw new Error("Index out of bounds");return this.seqS[n]}constructor(n){this.seqS=n}}const D=n=>{const t=a()(n.toString().matchAll(o.BM)).map((n=>n[2]??n[1])).toArray();return new l(t,f.lh[o.r2.FASTA])},j=n=>n?new g(n):new l([],f.lh[o.r2.FASTA]);function H(n,t=undefined){return e=>{if(e){const i=e.replaceAll('"-"',"").replaceAll("'-'","").split(n,t);return new l(i,f.lh[o.r2.SEPARATOR])}return new l([],f.lh[o.r2.SEPARATOR])}}const A=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,p=/\[([^\[\]]+)]/g,I=n=>{A.lastIndex=0;const t=A.exec(n.toString()),e=t?t[2]:null,i=e?e.split("."):[];return new l(i.map((n=>{p.lastIndex=0;const t=p.exec(n);return t&&t.length>=2?t[1]:n})),f.lh[o.r2.HELM])};function M(n,t,e=undefined){if(n.toLowerCase().startsWith(o.r2.FASTA))return D;if(n.toLowerCase().startsWith(o.r2.SEPARATOR))return H(t,e);if(n.toLowerCase().startsWith(o.r2.HELM))return I;throw new Error(`Unexpected units ${n} .`)}const T=/([^\W_]+)/g;function m(n,t){if(n.length<=t)return n;const e=n.match(T),i=n.length>t||(e?.length??0)>1,r=e?.[0]??" ";return i?r.substring(0,t-1)+"…":r}function J(n,t,e="-"){const i=t.map((t=>{const i=function(n,t,e="-"){const i=new Set([...new Set(Object.keys(n)),...t]);i.delete(e);const r=[],a=[];for(const e of i)r.push(e in n?n[e]:0),a.push(t.has(e)?1:0);const s=new d(r),o=new d(a);return(0,h.MA)(s,o)/((0,h.$G)(s)*(0,h.$G)(o))}(n,t.alphabet,e);return new s.dJ(t,n,i)}));let r;const a=Math.max(...i.map((n=>n.similarity>n.cutoff?n.similarity:-1)));return r=a>0?i.find((n=>n.similarity===a)).name:"UN",r}function P(n,t=5){let e;if(n.semType==i.SEMTYPE.MACROMOLECULE)e=f.g.forColumn(n).alphabet;else{const i=function(n,t,e){const i=n.categories;return function(n,t){const e={};let i=!0,r=null;for(const a of n)if(null==r?r=a.length:a.length!==r&&(i=!1),a.length>=t)for(const n of a.canonicals)n in e||(e[n]=0),e[n]+=1;return{freq:e,sameLength:i}}(a().enumerate(n.getRawData()).map((([n,t])=>e(i[n]))),t)}(n,t,D);e=J(i.freq,o.XS)}return N(e)}function N(n){switch(n){case"PT":return u.f.GrokGroups;case"DNA":case"RNA":return c.J.Chromatogram;default:return b.UE.Color}}function w(n){const t=n.columns.bySemTypeAll(i.SEMTYPE.MACROMOLECULE);let e=t.find((n=>{const t=n.getTag(i.TAGS.UNITS);return!!t&&-1!==t.indexOf("MSA")}))??null;return!e&&t.length>0&&(e=t[0]),e}},8260:(n,t,e)=>{"use strict";e.d(t,{dm:()=>c,g:()=>l,lh:()=>b});var i=e(976),r=e(6414),a=e.n(r),s=e(8447),o=e(6286),f=e(2583),d=e(708),h=e(7228),u=e(1047);const c=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},b={[s.r2.FASTA]:"-",[s.r2.SEPARATOR]:"",[s.r2.HELM]:"*"};class l{constructor(n){if(this._splitter=null,this.cached=!0,this._splitted=null,this.columnVersion=null,this._stats=null,this._maxLength=null,this._posList=null,this._joiner=void 0,n.type!==i.TYPE.STRING)throw new Error(`Unexpected column type '${n.type}', must be '${i.TYPE.STRING}'.`);this._column=n;const t=this._column.getTag(i.TAGS.UNITS);if(null==t)throw new Error("Units are not specified in column");if(this._units=t,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?b[s.r2.FASTA]:this.isHelm()?b[s.r2.HELM]:b[s.r2.SEPARATOR],!this.column.tags.has("aligned")||!this.column.tags.has("alphabet")||!this.column.tags.has(".alphabetIsMultichar")&&!this.isHelm()&&"UN"===this.alphabet)if(this.isFasta())l.setUnitsToFastaColumn(this);else if(this.isSeparator()){const t=n.getTag("separator");l.setUnitsToSeparatorColumn(this,t)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(i.TAGS.UNITS)}'.`);l.setUnitsToHelmColumn(this)}if(!this.column.tags.has(".alphabetIsMultichar"))if(this.isHelm())this.column.setTag(".alphabetIsMultichar","true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '.alphabetIsMultichar' is mandatory.`);this.notationProvider=this.column.temp[c.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(n){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE||n.column.getTag(i.TAGS.UNITS)!==s.r2.FASTA)throw new Error(`The column of notation '${s.r2.FASTA}' must be '${i.SEMTYPE.MACROMOLECULE}'.`);n.column.setTag(i.TAGS.UNITS,s.r2.FASTA),l.setTags(n)}static setUnitsToSeparatorColumn(n,t){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE||n.column.getTag(i.TAGS.UNITS)!==s.r2.SEPARATOR)throw new Error(`The column of notation '${s.r2.SEPARATOR}' must be '${i.SEMTYPE.MACROMOLECULE}'.`);if(!t)throw new Error(`The column of notation '${s.r2.SEPARATOR}' must have the separator tag.`);n.column.setTag(i.TAGS.UNITS,s.r2.SEPARATOR),n.column.setTag("separator",t),l.setTags(n)}static setUnitsToHelmColumn(n){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${s.r2.HELM}' must be '${i.SEMTYPE.MACROMOLECULE}'`);n.column.setTag(i.TAGS.UNITS,s.r2.HELM),l.setTags(n)}static setTags(n){const t=n.column.getTag(i.TAGS.UNITS),e=n.stats;if(Object.keys(e.freq).some((n=>n.length>1)),[s.r2.FASTA,s.r2.SEPARATOR].includes(t)){if(!n.column.getTag("alphabet")&&0===Object.keys(e.freq).length)throw new Error("Alphabet is empty and not annotated.");let t=n.column.getTag("aligned");null===t&&(t=e.sameLength?"SEQ.MSA":"SEQ",n.column.setTag("aligned",t));let i=n.column.getTag("alphabet");if(null===i&&(i=(0,f.w4)(e.freq,s.XS),n.column.setTag("alphabet",i)),"UN"===i){const t=Object.keys(e.freq).length,i=Object.keys(e.freq).some((n=>n.length>1));n.column.setTag(".alphabetSize",t.toString()),n.column.setTag(".alphabetIsMultichar",i?"true":"false")}}}get column(){return this._column}get length(){return this._column.length}get units(){return this._units}get notation(){return this._notation}get defaultGapOriginal(){return this._defaultGapOriginal}get separator(){const n=this.column.getTag("separator")??void 0;if(this.notation===s.r2.SEPARATOR&&void 0===n)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return n}get aligned(){const n=this.column.getTag("aligned");if(!n&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return n}get alphabet(){const n=this.column.getTag("alphabet");if(!n&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return n}get helmCompatible(){return this.column.getTag(".isHelmCompatible")}getAlphabetSize(){if(this.notation==s.r2.HELM||"UN"==this.alphabet){const n=this.column.getTag(".alphabetSize");let t;if(n)t=parseInt(n);else{const n=this.stats;t=Object.keys(n.freq).length}return t}switch(this.alphabet){case"PT":return 20;case"DNA":case"RNA":return 4;case"NT":return console.warn("Unexpected alphabet 'NT'."),4;default:throw new Error(`Unexpected alphabet '${this.alphabet}'.`)}}getAlphabetIsMultichar(){return this.notation===s.r2.HELM||"UN"===this.alphabet&&"true"===this.column.getTag(".alphabetIsMultichar")}getSplitted(n){if(this.cached){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let t=this._splitted[n]?this._splitted[n].deref():void 0;if(!t){const e=this.column.get(n);t=this.splitter(e),this._splitted[n]=new WeakRef(t)}return t}{const t=this.column.get(n);return this.splitter(t)}}get stats(){if(null===this._stats){const n={};let t=!0,e=null;const i=this.column.length;for(let r=0;r<i;++r){const i=this.getSplitted(r);null==e?e=i.length:i.length!==e&&(t=!1);for(const t of i.canonicals)t in n||(n[t]=0),n[t]+=1}this._stats={freq:n,sameLength:t}}return this._stats}get maxLength(){return null===this._maxLength&&(this._maxLength=0===this.column.length?0:Math.max(...a().count(0).take(this.column.length).map((n=>this.getSplitted(n).length)))),this._maxLength}get posList(){if(null===this._posList){const n=this.column.getTag(".positionNames");this._posList=n?n.split(s.CI).map((n=>n.trim())):a().count(1).take(this.maxLength).map((n=>n.toString())).toArray()}return this._posList}isFasta(){return this.notation===s.r2.FASTA}isSeparator(){return this.notation===s.r2.SEPARATOR}isHelm(){return this.notation===s.r2.HELM}isRna(){return"RNA"===this.alphabet}isDna(){return"DNA"===this.alphabet}isPeptide(){return"PT"===this.alphabet}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(n){return!n||n===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(s.r2.FASTA))return s.r2.FASTA;if(this.units.toLowerCase().startsWith(s.r2.SEPARATOR))return s.r2.SEPARATOR;if(this.units.toLowerCase().startsWith(s.r2.HELM))return s.r2.HELM;throw new Error(`Column '${this.column.name}' has unexpected notation '${this.units}'.`)}getHelmWrappers(){return[this.isDna()||this.isRna()||this.isHelmCompatible()?"RNA1{":"PEPTIDE1{",this.isDna()?"d(":this.isRna()?"r(":"",this.isDna()||this.isRna()?")p":"","}$$$$"]}getNewColumn(n,t,e,r){const a=this.column,o=n.toLowerCase()+"("+a.name+")",f=e??a.dataFrame.columns.getUnusedName(o),d=i.Column.fromList("string",f,r??new Array(this.column.length).fill(""));if(d.semType=i.SEMTYPE.MACROMOLECULE,d.setTag(i.TAGS.UNITS,n),n===s.r2.SEPARATOR){if(!t)throw new Error(`Notation '${s.r2.SEPARATOR}' requires separator value.`);d.setTag("separator",t)}d.setTag(i.TAGS.CELL_RENDERER,"sequence");const h=a.getTag("aligned");h&&d.setTag("aligned",h);let u=a.getTag("alphabet");u||this.notation!==s.r2.HELM||n===s.r2.HELM||(u="UN"),null!=u&&d.setTag("alphabet",u);let c=a.getTag(".alphabetSize");null!=u&&c&&d.setTag(".alphabetSize",c);const b=a.getTag(".alphabetIsMultichar");return null!=u&&void 0!==b&&d.setTag(".alphabetIsMultichar",b),n==s.r2.HELM&&(c=this.getAlphabetSize().toString(),d.setTag(".alphabetSize",c)),d}getNewColumnFromList(n,t){return this.getNewColumn(this.notation,this.separator,n,t)}static getNewColumn(n){const t=l.forColumn(n),e=t.notation;return t.getNewColumn(e)}static unitsStringIsValid(n){return n=n.toLowerCase(),[s.r2.FASTA,s.r2.SEPARATOR,s.r2.HELM].some((t=>n.startsWith(t.toLowerCase())))}static getNewColumnFromParams(n,t,e){if(!l.unitsStringIsValid(e))throw new Error("Invalid format of 'units' parameter");const r=i.Column.fromList("string",t,new Array(n).fill(""));return r.semType=i.SEMTYPE.MACROMOLECULE,r.setTag(i.TAGS.UNITS,e),r}getSplitter(n){let t=null;if(t=this.notationProvider?this.notationProvider.splitter:null,t)return t;if(this.units.toLowerCase().startsWith(s.r2.FASTA))return null===this.column.getTag("alphabet")||this.getAlphabetIsMultichar()?s.kB:f.FJ;if(this.units.toLowerCase().startsWith(s.r2.SEPARATOR))return(0,s.Ar)(this.separator,n);if(this.units.toLowerCase().startsWith(s.r2.HELM))return s.gP;throw new Error(`Unexpected units ${this.units} .`)}split(n){return this.splitter(n)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");return this.isMsa()?d.U.HAMMING:(this.alphabet,d.U.LEVENSHTEIN)}getDistanceFunction(){return d.o[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const n=(await(0,h.JN)()).getBioLib().getMonomerSymbolsByType("PEPTIDE".toString()),t=new Set(n),e=((0,s.Ar)(this.separator),new Set),i=this.column.length,r=this.column.getRawData();for(let n=0;n<i;++n){const i=r[n];if(!(i in e)){e.add(i);const r=this.getSplitted(n);for(const n of r.canonicals)if(!t.has(n))return this.column.setTag(".isHelmCompatible","false"),!1}}return this.column.setTag(".isHelmCompatible","true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(n){return n===s.r2.FASTA}toSeparator(n){return n===s.r2.SEPARATOR}toHelm(n){return n===s.r2.HELM}convertHelmToFastaSeparator(n,t,e,i){i||(i=this.toFasta(t)?b[s.r2.FASTA]:b[s.r2.SEPARATOR]),e||(e=this.toFasta(t)?"":this.separator);const r=n.startsWith("RNA"),a=this.splitter(n),o=[];for(let n=0;n<a.length;++n){let e=a.getOriginal(n);if(r&&(e=e.replace(u.pU,"")),e===b[s.r2.HELM])o.push(i);else if(this.toFasta(t)&&e.length>1){const n="["+e+"]";o.push(n)}else o.push(e)}return o.join(e)}convert(n,t){const e=this.getJoiner({notation:n,separator:t}),i=this.getNewColumn(n,t);return i.init((n=>{const t=this.getSplitted(n);return e(t)})),i}getRegion(n,t,e){const i=this.getNewColumn(this.notation,this.separator);i.name=e;const r=n??0,a=t??this.maxLength-1,o=this.getJoiner(),d=a-r+1,h=b[this.notation];i.init((n=>{const t=this.getSplitted(n),e=new Array(d);for(let n=0;n<d;++n){const i=r+n;e[n]=i<t.length?t.getOriginal(i):h}return o(new f.wx(e,h))}));const u=n=>{const t=n.split(",").map((n=>n.trim())),e=new Array(d);for(let n=0;n<d;++n){const i=r+n;e[n]=i<t.length?t[i]:"?"}return e.join(s.CI)},c=this.column.getTag(".positionNames");c&&i.setTag(".positionNames",u(c));const l=this.column.getTag(".positionLabels");return l&&i.setTag(".positionLabels",u(l)),i}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(n){const t=n?n.notation:this.notation,e=n?n.separator:this.separator;let i;const r=this;switch(t){case s.r2.FASTA:i=function(n){return r.joinToFasta(n,r.isHelm())};break;case s.r2.SEPARATOR:if(!e)throw new Error(`Separator is mandatory for notation '${t}'.`);i=function(n){return g(n,e,r.isHelm())};break;case s.r2.HELM:{const n="DNA"===r.alphabet||"RNA"===r.alphabet,t=r.getHelmWrappers();i=function(e){return D(e,t,n)};break}default:throw new Error(`Unexpected notation '${t}'.`)}return i}getConverter(n,t=undefined){if(n===s.r2.SEPARATOR&&!t)throw new Error(`Target separator is not specified for target units '${s.r2.SEPARATOR}'.`);const e=this;if(n===s.r2.FASTA)return function(n){return e.convertToFasta(n)};if(n===s.r2.HELM)return function(n){return e.convertToHelm(n)};if(n===s.r2.SEPARATOR)return function(n){return e.convertToSeparator(n,t)};throw new Error}static forColumn(n){let t=n.temp[c.seqHandler];return t&&t.columnVersion===n.version||(t=n.temp[c.seqHandler]=new l(n)),t}joinToFasta(n,t){const e=new Array(n.length);for(let i=0;i<n.length;++i){const r=n.getOriginal(i);let a=n.getOriginal(i);t&&(a=a.replace(u.pU,"$1")),r===o.G2?a=b[s.r2.FASTA]:r===u.$3?a="":a.length>1&&(a="["+a+"]"),e[i]=a}return e.join("")}convertToFasta(n){const t=this.splitter,e=this.isHelm()?this.splitterAsHelmNucl(n):t(n);return this.joinToFasta(e,this.isHelm())}convertToSeparator(n,t){return g(this.isHelm()?this.splitterAsHelmNucl(n):this.splitter(n),t,this.isHelm())}convertToHelm(n){const t=this.getHelmWrappers(),e=n.startsWith("DNA")||n.startsWith("RNA");return D(this.splitter(n),t,e)}splitterAsHelmNucl(n){const t=this.splitter(n),e=new Array(t.length),i=n.startsWith("DNA"),r=n.startsWith("RNA");for(let n=0;n<t.length;++n){let a=t.getOriginal(n);(i||r)&&(a=a.replace(u.pU,"$1"),a=a===u.$3?null:a),e[n]=a||null}return new f.wx(e.filter((n=>!!n)),b[s.r2.HELM])}}function g(n,t,e){const i=new Array(n.length);for(let t=0;t<n.length;++t){const r=n.getCanonical(t);let a=n.getOriginal(t);e&&(a=a.replace(u.pU,"$1")),r===o.G2?a=b[s.r2.SEPARATOR]:r===u.$3&&(a=""),i[t]=a}return i.join(t)}function D(n,t,e){const[i,r,a,f]=t,d=new Array(n.length);for(let t=0;t<n.length;++t){const i=n.getCanonical(t);let f=n.getOriginal(t);i===o.G2?f=b[s.r2.HELM]:(e&&(f=f.replace(u.pU,"$1")),f=1===f.length?`${r}${f}${a}`:`${r}[${f}]${a}`),d[t]=f}return`${i}${d.join(".")}${f}`}},8457:(n,t,e)=>{"use strict";e.d(t,{O:()=>a});var i=e(976),r=e(8260);function a(n){const t=n=>{const t=s.columns.addNewString((n+1).toString());return e.push(t),t},e=[],a=n.length,s=i.DataFrame.create(a),o=r.g.forColumn(n);for(let n=0;n<a;++n){const i=o.getSplitted(n);for(let r=0;r<i.length;++r){const a=i.getOriginal(r);((e[r]??null)||t(r)).set(n,a,!1)}}return s}},172:(n,t,e)=>{"use strict";e.d(t,{c:()=>a});var i,r=e(7945);!function(n){n[n.error=0]="error",n[n.warning=1]="warning",n[n.info=2]="info",n[n.debug=3]="debug"}(i||(i={}));class a{constructor(n){this.logger=n,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(n,t){const e=++this.syncCounter;this.logger.debug(`${n}, SYNC syncId = ${e}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${n}, SYNC syncId = ${e}, START `),await t(),this.logger.debug(`${n}, SYNC syncId = ${e}, END `)})).catch((t=>{const[i,a]=(0,r.yf)(t);this.logger.error(`${n}, SYNC syncId = ${e}, ERROR:\n${i}`,void 0,a),this.errors.push(t)}))}resetErrors(){const n=this.errors;return this.errors=[],n}}},9298:(n,t,e)=>{"use strict";e.d(t,{Ct:()=>f,DX:()=>i,ES:()=>r,dE:()=>o,iD:()=>s,vS:()=>h,vw:()=>a});var i,r,a,s,o,f,d=e(976);!function(n){n.tooltipWebLogo=".tooltipWebLogo"}(i||(i={})),function(n){n.Entropy="Entropy",n.full="100%"}(r||(r={})),function(n){n.TOP="top",n.MIDDLE="middle",n.BOTTOM="bottom"}(a||(a={})),function(n){n.LEFT="left",n.CENTER="center",n.RIGHT="right"}(s||(s={})),function(n){n.AUTO="auto",n.ON="on",n.OFF="off"}(o||(o={})),function(n){n.Filtered="Filtered",n.Selected="Selected"}(f||(f={}));const h=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=d.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=r.Entropy,this.positionWidth=16,this.verticalAlignment=a.MIDDLE,this.horizontalAlignment=s.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=50,this.maxHeight=100,this.showPositionLabels=!0,this.positionMarginState=o.AUTO,this.positionMargin=0,this.filterSource=f.Filtered}}},922:(n,t,e)=>{"use strict";e.d(t,{_:()=>f});class i{constructor(n){this.init(n)}init(n){this.fileContent=n.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var n;return null!==(n=this._atomTypes)&&void 0!==n||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var n;return null!==(n=this._pairsOfBondedAtoms)&&void 0!==n||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var n;return null!==(n=this._bondTypes)&&void 0!==n||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:n,bondCount:t}=this.parseAtomAndBondCounts();this._atomCount=n,this._bondCount=t}getNextColumnIdx(n){for(;!this.isWhitespace(n);)++n;for(;this.isWhitespace(n);)++n;return n}shiftIdxToSpecifiedColumn(n,t){let e=n;const i=this.isWhitespace(e)?t:t-1;for(let n=0;n<i;n++)e=this.getNextColumnIdx(e);return e}parseAtomTypes(){const n=this.atomCount,t=new Array(n);let e=this.getAtomBlockIdx();for(let i=0;i<n;i++)e=this.shiftIdxToAtomType(e),t[i]=this.parseAtomType(e),e=this.getNextLineIdx(e);return t}parseAtomCoordinates(){const n=new Float32Array(this.atomCount),t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount);let i=this.getAtomBlockIdx();for(let r=0;r<this.atomCount;r++){i=this.shiftIdxToXColumn(i);for(const a of[n,t,e])a[r]=this.parseFloatValue(i),i=this.getNextColumnIdx(i);i=this.getNextLineIdx(i)}return{x:n,y:t,z:e}}parseBondedAtomPairs(){const n=new Array(this.bondCount);let t=this.getBondBlockIdx();for(let e=0;e<this.bondCount;e++){t=this.shiftIdxToBondedAtomsPair(t);const i=new Uint16Array(2);i[0]=this.parseIntValue(t),t=this.getNextColumnIdx(t),i[1]=this.parseIntValue(t),n[e]=i,t=this.getNextLineIdx(t)}return n}parseBondTypes(){const n=this.bondCount,t=new Uint16Array(n);let e=this.getBondBlockIdx();for(let i=0;i<n;i++)e=this.shiftIdxToBondType(e),t[i]=this.parseIntValue(e),e=this.getNextLineIdx(e);return t}isWhitespace(n){const t=this.fileContent[n];return" "===t||"\t"===t}getNextLineIdx(n){return"\n"!==this.fileContent[n]?this.fileContent.indexOf("\n",n)+1:n+1}parseFloatValue(n){return this.parseNumericValue(parseFloat,n)}parseIntValue(n){return this.parseNumericValue(parseInt,n)}parseNumericValue(n,t){let e=t+1;for(;!this.isWhitespace(e);)++e;return n(this.fileContent.substring(t,e))}}class r extends i{constructor(n){super(n),this.init(n)}init(n){super.init(n)}parseAtomType(n){let t=n,e=t;return this.isQuote(t)?(e=this.getNextIdenticalChar(t),t++):e=this.fileContent.indexOf(" ",e),this.fileContent.substring(t,e)}isQuote(n){const t=this.fileContent[n].charCodeAt(0);return 39===t||34===t}getNextIdenticalChar(n){const t=this.fileContent[n];return t?this.fileContent.indexOf(t,n+1):-1}isQuery(){return this.isQueryOrFragment(((n,t)=>{return 39===n||34===n||76===n&&!((e=this.fileContent.charCodeAt(t+1))>64&&e<91||e>96&&e<123);var e}))}isFragment(){return this.isQueryOrFragment((n=>82===n||42===n))}isQueryOrFragment(n){const t=this.atomCount;let e=this.getAtomBlockIdx();for(let i=0;i<t;i++){if(e=this.shiftIdxToAtomType(e),n(this.fileContent.charCodeAt(e),e))return!0;e=this.getNextLineIdx(e)}return!1}}var a;!function(n){n.HEADER="V2000",n[n.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",n[n.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",n[n.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",n[n.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",n[n.BOND_TYPE_COL=3]="BOND_TYPE_COL",n[n.RGP_SHIFT=8]="RGP_SHIFT",n.RGP_LINE="M RGP",n.A_LINE="A ",n.END="M END"}(a||(a={}));class s extends r{constructor(n){super(n)}static validate(n){return-1!==n.indexOf(a.HEADER)&&-1!==n.indexOf(a.END)}shiftIdxToAtomType(n){return this.shiftIdxToSpecifiedColumn(n,a.ATOM_TYPE_COL)}getCountsLineIdx(){let n=0;for(let t=0;t<a.NUM_OF_HEADER_LINES;++t)n=this.getNextLineIdx(n);return n}getAtomBlockIdx(){let n=this.getCountsLineIdx();return n=this.getNextLineIdx(n),n}shiftIdxToXColumn(n){return this.getNextColumnIdx(n)}shiftIdxToBondedAtomsPair(n){return this.shiftIdxToSpecifiedColumn(n,a.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(n){return this.shiftIdxToSpecifiedColumn(n,a.BOND_TYPE_COL)}getBondBlockIdx(){let n=this.getAtomBlockIdx();for(let t=0;t<this.atomCount;t++)n=this.getNextLineIdx(n);return n}parseAtomAndBondCounts(){let n=this.getCountsLineIdx(),t=n+a.NUM_OF_COUNTS_DIGITS;const e=parseInt(this.fileContent.substring(n,t));return n=t,t+=a.NUM_OF_COUNTS_DIGITS,{atomCount:e,bondCount:parseInt(this.fileContent.substring(n,t))}}}class o extends r{constructor(n){super(n),this.init(n)}shiftIdxToAtomType(n){return this.shiftIdxToSpecifiedColumn(n,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let n=this.fileContent.indexOf("M V30 BEGIN ATOM");return n=this.getNextLineIdx(n),n}shiftIdxToXColumn(n){let t=this.shiftIdxToAtomType(n);return this.isQuote(t)?(t=this.getNextIdenticalChar(t),t=this.getNextColumnIdx(t),t):this.shiftIdxToSpecifiedColumn(n,5)}shiftIdxToBondedAtomsPair(n){return this.shiftIdxToSpecifiedColumn(n,5)}shiftIdxToBondType(n){return this.shiftIdxToSpecifiedColumn(n,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static validate(n){return-1!==n.indexOf("V3000")&&-1!==n.indexOf("M END")}parseAtomAndBondCounts(){let n=this.fileContent.indexOf("M V30 COUNTS ")+14,t=this.fileContent.indexOf(" ",n+1);const e=parseInt(this.fileContent.substring(n,t));return n=t+1,t=this.fileContent.indexOf(" ",n+1),{atomCount:e,bondCount:parseInt(this.fileContent.substring(n,t))}}}class f{constructor(){}static getInstance(n){if(s.validate(n))return new s(n);if(o.validate(n))return new o(n);throw new Error("Malformed molfile")}}},7905:(n,t,e)=>{"use strict";n=e.hmd(n);var i,r=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(n={}){var t,e,r=void 0!==n?n:{};r.ready=new Promise((function(n,i){t=n,e=i}));var a,s=Object.assign({},r),o="object"==typeof window,f="function"==typeof importScripts,d=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(o||f)&&(f?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),i&&(d=i),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f&&(a=n=>{var t=new XMLHttpRequest;return t.open("GET",n,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),r.print||console.log.bind(console);var h,u,c=r.printErr||console.warn.bind(console);Object.assign(r,s),s=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(h=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&m("no native wasm support detected");var b,l,g,D=!1;function j(){var n=u.buffer;r.HEAP8=b=new Int8Array(n),r.HEAP16=new Int16Array(n),r.HEAP32=new Int32Array(n),r.HEAPU8=l=new Uint8Array(n),r.HEAPU16=new Uint16Array(n),r.HEAPU32=g=new Uint32Array(n),r.HEAPF32=new Float32Array(n),r.HEAPF64=new Float64Array(n)}var H=[],A=[],p=[],I=0,M=null,T=null;function m(n){r.onAbort&&r.onAbort(n),c(n="Aborted("+n+")"),D=!0,n+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(n);throw e(t),t}var J,P,N="data:application/octet-stream;base64,";function w(n){return n.startsWith(N)}function L(n){try{if(n==J&&h)return new Uint8Array(h);if(a)return a(n);throw"both async and sync fetching of the wasm failed"}catch(n){m(n)}}function U(n,t,e){return function(n){return h||!o&&!f||"function"!=typeof fetch?Promise.resolve().then((function(){return L(n)})):fetch(n,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+n+"'";return t.arrayBuffer()})).catch((function(){return L(n)}))}(n).then((function(n){return WebAssembly.instantiate(n,t)})).then((function(n){return n})).then(e,(function(n){c("failed to asynchronously prepare wasm: "+n),m(n)}))}function B(n){for(;n.length>0;)n.shift()(r)}function R(n){this.excPtr=n,this.ptr=n-24,this.set_type=function(n){g[this.ptr+4>>2]=n},this.get_type=function(){return g[this.ptr+4>>2]},this.set_destructor=function(n){g[this.ptr+8>>2]=n},this.get_destructor=function(){return g[this.ptr+8>>2]},this.set_caught=function(n){n=n?1:0,b[this.ptr+12>>0]=n},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(n){n=n?1:0,b[this.ptr+13>>0]=n},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(n,t){this.set_adjusted_ptr(0),this.set_type(n),this.set_destructor(t)},this.set_adjusted_ptr=function(n){g[this.ptr+16>>2]=n},this.get_adjusted_ptr=function(){return g[this.ptr+16>>2]},this.get_exception_ptr=function(){if(v(this.get_type()))return g[this.excPtr>>2];var n=this.get_adjusted_ptr();return 0!==n?n:this.excPtr}}function C(n){var t=u.buffer;try{return u.grow(n-t.byteLength+65535>>>16),j(),1}catch(n){}}function y(n){return r["_"+n]}w(J="wasmDbscan.wasm")||(P=J,J=r.locateFile?r.locateFile(P,d):d+P);var E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Q(n,t,e,i,r){var a={string:n=>{var t=0;return null!=n&&0!==n&&(t=function(n){var t=function(n){for(var t=0,e=0;e<n.length;++e){var i=n.charCodeAt(e);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++e):t+=3}return t}(n)+1,e=Y(t);return function(n,t,e){!function(n,t,e,i){if(!(i>0))return 0;for(var r=e+i-1,a=0;a<n.length;++a){var s=n.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&n.charCodeAt(++a)),s<=127){if(e>=r)break;t[e++]=s}else if(s<=2047){if(e+1>=r)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=r)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=r)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}t[e]=0}(n,l,t,e)}(n,e,t),e}(n)),t},array:n=>{var t,e,i=Y(n.length);return t=n,e=i,b.set(t,e),i}},s=y(n),o=[],f=0;if(i)for(var d=0;d<i.length;d++){var h=a[e[d]];h?(0===f&&(f=S()),o[d]=h(i[d])):o[d]=i[d]}var u=s.apply(null,o);return function(n){return 0!==f&&x(f),function(n){return"string"===t?(e=n)?function(n,t,e){for(var i=t+e,r=t;n[r]&&!(r>=i);)++r;if(r-t>16&&n.buffer&&E)return E.decode(n.subarray(t,r));for(var a="";t<r;){var s=n[t++];if(128&s){var o=63&n[t++];if(192!=(224&s)){var f=63&n[t++];if((s=224==(240&s)?(15&s)<<12|o<<6|f:(7&s)<<18|o<<12|f<<6|63&n[t++])<65536)a+=String.fromCharCode(s);else{var d=s-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}(l,e,i):"":"boolean"===t?Boolean(n):n;var e,i}(n)}(u)}var k,F={__cxa_throw:function(n,t,e){throw new R(n).init(t,e),n},abort:function(){m("")},emscripten_memcpy_big:function(n,t,e){l.copyWithin(n,t,t+e)},emscripten_resize_heap:function(n){var t,e=l.length,i=2147483648;if((n>>>=0)>i)return!1;for(var r=1;r<=4;r*=2){var a=e*(1+.2/r);if(a=Math.min(a,n+100663296),C(Math.min(i,(t=Math.max(n,a))+(65536-t%65536)%65536)))return!0}return!1}},S=(function(){var n,t,i,a,s={env:F,wasi_snapshot_preview1:F};function o(n,t){var e,i=n.exports;return r.asm=i,u=r.asm.memory,j(),r.asm.__indirect_function_table,e=r.asm.__wasm_call_ctors,A.unshift(e),function(n){if(I--,r.monitorRunDependencies&&r.monitorRunDependencies(I),0==I&&(null!==M&&(clearInterval(M),M=null),T)){var t=T;T=null,t()}}(),i}if(I++,r.monitorRunDependencies&&r.monitorRunDependencies(I),r.instantiateWasm)try{return r.instantiateWasm(s,o)}catch(n){c("Module.instantiateWasm callback failed with error: "+n),e(n)}(n=h,t=J,i=s,a=function(n){o(n.instance)},n||"function"!=typeof WebAssembly.instantiateStreaming||w(t)||"function"!=typeof fetch?U(t,i,a):fetch(t,{credentials:"same-origin"}).then((function(n){return WebAssembly.instantiateStreaming(n,i).then(a,(function(n){return c("wasm streaming compile failed: "+n),c("falling back to ArrayBuffer instantiation"),U(t,i,a)}))}))).catch(e)}(),r._dbscan=function(){return(r._dbscan=r.asm.dbscan).apply(null,arguments)},r._malloc=function(){return(r._malloc=r.asm.malloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},function(){return(S=r.asm.stackSave).apply(null,arguments)}),x=function(){return(x=r.asm.stackRestore).apply(null,arguments)},Y=function(){return(Y=r.asm.stackAlloc).apply(null,arguments)},v=function(){return(v=r.asm.__cxa_is_pointer_type).apply(null,arguments)};function z(){function n(){k||(k=!0,r.calledRun=!0,D||(B(A),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)n=r.postRun.shift(),p.unshift(n);var n;B(p)}()))}I>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)n=r.preRun.shift(),H.unshift(n);var n;B(H)}(),I>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.ccall=Q,r.cwrap=function(n,t,e,i){var r=!e||e.every((n=>"number"===n||"boolean"===n));return"string"!==t&&r&&!i?y(n):function(){return Q(n,t,e,arguments)}},T=function n(){k||z(),k||(T=n)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return z(),n.ready});"object"==typeof exports?n.exports=r:"function"==typeof define&&e.amdO?define([],(function(){return r})):"object"==typeof exports&&(exports.exportCppDbscanLib=r)},6254:(n,t,e)=>{"use strict";function i(n){return(t,e)=>n*t+e-Math.floor((t+2)*(t+1)/2)}e.d(t,{y:()=>i})},5697:(n,t,e)=>{"use strict";e.d(t,{Dz:()=>H,FV:()=>d,Jv:()=>T,KR:()=>f,MI:()=>p,NB:()=>l,UX:()=>b,WI:()=>c,Z3:()=>o,Zd:()=>u,_h:()=>h,aW:()=>D,bX:()=>M,fX:()=>A,kg:()=>s,s:()=>g,yU:()=>j});var i=e(9657),r=e(1040),a=e(708);r.gk.Tanimoto,r.gk.Dice,r.gk.Asymmetric,r.gk.BraunBlanquet,r.gk.Cosine,r.gk.Kulczynski,r.gk.McConnaughey,r.gk.RogotGoldberg,r.gk.Russel,r.gk.Sokal,r.gk.Hamming,r.gk.Euclidean,r.gk.Tanimoto,r.gk.Dice,r.gk.Asymmetric,r.gk.BraunBlanquet,r.gk.Cosine,r.gk.Kulczynski,r.gk.McConnaughey,r.gk.RogotGoldberg,r.gk.Russel,r.gk.Sokal,r.gk.Hamming,r.gk.Euclidean;const s=[r.gk.Tanimoto,r.gk.Dice,r.gk.Cosine];function o(n,t){const e=n.trueCount()+t.trueCount();if(0==e)return 1;const i=n.andWithCountBits(t,!0);return i/(e-i)}function f(n,t){return 1-o(n,t)}function d(n,t){return I(o(new i.Z(n,32*n.length),new i.Z(t,32*t.length)))}function h(n,t){return 1-function(n,t){const e=n.trueCount()+t.trueCount();return 0==e?0:2*n.andWithCountBits(t,!0)/e}(n,t)}function u(n,t){return 1-function(n,t){const e=n.trueCount()*t.trueCount();return 0==e?0:n.andWithCountBits(t,!0)/Math.sqrt(e)}(n,t)}function c(n,t){return Math.sqrt(n.trueCount()+t.trueCount()-2*n.andWithCountBits(t,!0))}function b(n,t){return n.trueCount()+t.trueCount()-2*n.andWithCountBits(t,!0)}function l(n,t){return 1-function(n,t){const e=n.trueCount()+t.trueCount(),i=n.andWithCountBits(t,!0);return i/(2*e-3*i)}(n,t)}function g(n,t){return I(function(n,t){const e=n.trueCount()+t.trueCount(),i=n.trueCount()*t.trueCount();return 0==i?0:n.andWithCountBits(t,!0)*e/(2*i)}(n,t))}function D(n,t){return I(function(n,t){const e=n.trueCount()+t.trueCount(),i=n.trueCount()*t.trueCount();return 0==i?0:(n.andWithCountBits(t,!0)*e-i)/i}(n,t))}function j(n,t){return 1-function(n,t){const e=Math.min(n.trueCount(),t.trueCount());return 0==e?0:n.andWithCountBits(t,!0)/e}(n,t)}function H(n,t){return I(function(n,t){const e=Math.max(n.trueCount(),t.trueCount());return 0==e?0:n.andWithCountBits(t,!0)/e}(n,t))}function A(n,t){return I(function(n,t){return 0==n.length?0:n.andWithCountBits(t,!0)/n.length}(n,t))}function p(n,t){return I(function(n,t){const e=n.andWithCountBits(t,!0),i=n.countBits(!0)+t.countBits(!0),r=n.length,a=r-i+e;return e==r||a==r?1:e/i+a/(2*r-i)}(n,t))}function I(n){return 0===n?3402823e32:1/n-1}function M(n){if(n&&null!=n.range&&n.range>0){const t=n.range;return(n,e)=>Math.abs(n-e)/t}return(n,t)=>Math.abs(n-t)}function T(n){const t=function(n){const t=n?.mostCommon??new Set;return(n,e)=>{const i=n.length,r=e.length;let a=0,s=0,o=0;for(;s<i&&o<r;)n[s]===e[o]?(t?.has(n[s])||++a,++s,++o):n[s]<e[o]?++s:++o;return a}}(n);return(n,e)=>0===e.length||0===n.length?1e4:Math.min(n.length,e.length)/(t(n,e)+1e-4)}r.gk.Tanimoto,r.gk.Asymmetric,r.gk.Cosine,r.gk.Sokal,a.U.HAMMING,a.U.LEVENSHTEIN,a.U.MONOMER_CHEMICAL_DISTANCE,a.U.NEEDLEMANN_WUNSCH},3277:(n,t,e)=>{"use strict";e.d(t,{Ec:()=>d,dB:()=>o,n3:()=>i,q6:()=>s,sS:()=>f,ts:()=>a,vO:()=>r});const i="dim-red-preprocessing-function",r="supportedSemTypes",a="supportedTypes",s="supportedUnits",o="supportedDistanceFunctions",f="bypassLargeDataWarning",d="show-scatterplot-progress"},708:(n,t,e)=>{"use strict";function i(n={}){const t=function(){if(!n||!n.scoringMatrix||!n.alphabetIndexes)return(n,t)=>n===t?0:1;if(n.scoringMatrix.length!==Object.keys(n.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const t=n.alphabetIndexes,e=n.scoringMatrix,i=Math.min(...Object.keys(t).map((n=>n.charCodeAt(0))))+1,r=new Float32Array((e.length+i)*(e.length+i));return Object.entries(t).forEach((([n,i])=>{const a=e[i];Object.entries(t).forEach((([t,i])=>{r[n.charCodeAt(0)*e.length+t.charCodeAt(0)]=a[i]}))})),(n,t)=>1-r[n.charCodeAt(0)*e.length+t.charCodeAt(0)]}(),e=n?.threshold??0;return(n,i)=>{let r=0;const a=n.length,s=i.length,o=Math.max(a,s)*(1-e);a!==s&&(r=Math.abs(a-s));let f=0;for(let e=0;e<Math.min(a,s);e++)if(n[e]!==i[e]&&(f+=t(n[e],i[e]),f>o))return 1;return f+=r,f/=Math.max(a,s),f}}e.d(t,{U:()=>s,o:()=>o});var r=e(1811);const a={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var s;!function(n){n.HAMMING="Hamming",n.LEVENSHTEIN="Levenshtein",n.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",n.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(s||(s={}));const o={[s.HAMMING]:i,[s.LEVENSHTEIN]:function(){return(n,t)=>(0,r.T)(n,t)/Math.max(n.length,t.length)},[s.NEEDLEMANN_WUNSCH]:function(n){const t=new Uint16Array(65536),{gapOpen:e,gapExtend:i,scoringMatrix:r,alphabetIndexes:s}={...a,...n};Object.entries(s).forEach((([n,e])=>t[n.charCodeAt(0)]=e));const o=[new Float32Array(1e4),new Float32Array(1e4)];return(n,a)=>{const s=new Array(n.length+1).fill(!1),f=new Array(n.length+1).fill(!1);let d=0,h=1;for(let t=1;t<n.length+1;t++)o[0][t]=-e-(t-1)*i,o[1][t]=0;o[0][0]=0;for(let u=1;u<a.length+1;u++){o[h][0]=-e-(u-1)*i;for(let c=1;c<n.length+1;c++){const b=o[d][c-1]+r[t[n.charCodeAt(c-1)]][t[a.charCodeAt(u-1)]],l=o[d][c]-(s[c]?i:e),g=o[h][c-1]-(f[c-1]?i:e);o[h][c]=Math.max(b,g,l),o[h][c]===b?(s[c]=!1,f[c]=!1):o[h][c]===g?(s[c]=!1,f[c]=!0):(s[c]=!0,f[c]=!1)}d=h,h=(h+1)%2}const u=Math.max(n.length,a.length);return(u-o[d][n.length])/u}},[s.MONOMER_CHEMICAL_DISTANCE]:i}},4628:(n,t,e)=>{"use strict";var i;e.d(t,{A:()=>i}),function(n){n.UMAP="UMAP",n.T_SNE="t-SNE"}(i||(i={}))},1040:(n,t,e)=>{"use strict";var i,r,a,s,o,f,d;e.d(t,{CF:()=>r,Qe:()=>o,W:()=>i,Yc:()=>f,gd:()=>s,gj:()=>d,gk:()=>a}),function(n){n.Levenshtein="Levenshtein",n.JaroWinkler="Jaro-Winkler",n.Manhattan="Manhattan",n.Onehot="One-Hot"}(i||(i={})),function(n){n.Euclidean="Euclidean"}(r||(r={})),function(n){n.Tanimoto="Tanimoto",n.Dice="Dice",n.Asymmetric="Asymmetric",n.BraunBlanquet="Braun-Blanquet",n.Cosine="Cosine",n.Kulczynski="Kulczynski",n.McConnaughey="Mc-Connaughey",n.RogotGoldberg="Rogot-Goldberg",n.Russel="Russel",n.Sokal="Sokal",n.Hamming="Hamming",n.Euclidean="Euclidean"}(a||(a={})),function(n){n.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(n){n.Vector="Vector",n.String="String",n.BitArray="BitArray",n.MacroMolecule="MacroMolecule",n.Number="Number",n.IntArray="IntArray",n.NumberArray="NumberArray"}(o||(o={})),function(n){n.Difference="Difference"}(f||(f={})),function(n){n.CommonItems="Common Items"}(d||(d={}))},6361:(n,t,e)=>{"use strict";e.d(t,{W:()=>i.W});var i=e(1040);e(7861)},7861:(n,t,e)=>{"use strict";var i=e(1811),r=e(3979),a=e(5697),s=e(850),o=e(708),f=e(1040);const d={[f.CF.Euclidean]:s.dP},h={[f.W.Levenshtein]:i.T,[f.W.JaroWinkler]:r.H$,[f.W.Manhattan]:function(n,t){if(n.length!==t.length)return 1;{let e=0;for(let i=1;i<n.length;i++)e+=n[i]==t[i]?0:1;return e/n.length}},[f.W.Onehot]:function(n,t){return n===t?0:1}},u={[f.gk.Tanimoto]:a.KR,[f.gk.Dice]:a._h,[f.gk.Asymmetric]:a.yU,[f.gk.BraunBlanquet]:a.Dz,[f.gk.Cosine]:a.Zd,[f.gk.Kulczynski]:a.s,[f.gk.McConnaughey]:a.aW,[f.gk.RogotGoldberg]:a.MI,[f.gk.Russel]:a.fX,[f.gk.Sokal]:a.NB,[f.gk.Hamming]:a.UX,[f.gk.Euclidean]:a.WI},c={[f.gd.TanimotoIntArray]:a.FV},b={[f.Yc.Difference]:a.bX},l={[f.gj.CommonItems]:a.Jv},g={[f.Qe.Vector]:{[f.CF.Euclidean]:d[f.CF.Euclidean]},[f.Qe.String]:{[f.W.Levenshtein]:h[f.W.Levenshtein],[f.W.JaroWinkler]:h[f.W.JaroWinkler],[f.W.Manhattan]:h[f.W.Manhattan],[f.W.Onehot]:h[f.W.Onehot]},[f.Qe.BitArray]:{[f.gk.Tanimoto]:u[f.gk.Tanimoto],[f.gk.Dice]:u[f.gk.Dice],[f.gk.Asymmetric]:u[f.gk.Asymmetric],[f.gk.BraunBlanquet]:u[f.gk.BraunBlanquet],[f.gk.Cosine]:u[f.gk.Cosine],[f.gk.Kulczynski]:u[f.gk.Kulczynski],[f.gk.McConnaughey]:u[f.gk.McConnaughey],[f.gk.RogotGoldberg]:u[f.gk.RogotGoldberg],[f.gk.Russel]:u[f.gk.Russel],[f.gk.Sokal]:u[f.gk.Sokal]},[f.Qe.MacroMolecule]:{[o.U.HAMMING]:o.o[o.U.HAMMING],[o.U.LEVENSHTEIN]:o.o[o.U.LEVENSHTEIN],[o.U.NEEDLEMANN_WUNSCH]:o.o[o.U.NEEDLEMANN_WUNSCH],[o.U.MONOMER_CHEMICAL_DISTANCE]:o.o[o.U.MONOMER_CHEMICAL_DISTANCE]},[f.Qe.Number]:{[f.Yc.Difference]:b[f.Yc.Difference]},[f.Qe.IntArray]:{[f.gd.TanimotoIntArray]:c[f.gd.TanimotoIntArray]},[f.Qe.NumberArray]:{[f.gj.CommonItems]:l[f.gj.CommonItems]}};Object.keys(g).reduce(((n,t)=>{for(const e of Object.keys(g[t]))n[e]=t;return n}),{})},9657:(n,t,e)=>{"use strict";e.d(t,{Z:()=>i});class i{constructor(n,t=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof n){const e=n,r=i._createBuffer(e);if(t)for(let n=0;n<r.length;n++)r[n]=-1;this._data=r,this._length=e}else{if(!(n instanceof Uint32Array))throw new Error("Invalid constructor");this._data=n,this._length=t}}getRawData(){return this._data}assureGoez(n,t){if(n<0)throw new Error(`${t} should be greater than zero`)}assureInRange(n,t,e,i){if(n<t||n>e)throw new Error(`Argument ${i} (${n}) out of range (${t}, ${e})`)}copy(n,t,e){for(let i=0;i<e;i++)t[i]=n[i]}copyFrom(n){if(this._length!=n._length)throw new Error(`Lengths differ (${this._length} != ${n._length})`);this.copy(n._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(n){this._data=n,this._version++}get version(){return this._version}set version(n){this._version=n}incrementVersion(n=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(n){this._versionedName=n,this._versionedNameVersion=this._version}get self(){return this}setLength(n){if(n<0)throw new Error("should be >= 0");if(n==this._length)return;const t=Math.floor((n+31)/32);if(t>this._data.length||t+this.SHRINK_THRESHOLD<this._data.length){const n=new Uint32Array(t);this.copy(this._data,n,t>this._data.length?this._data.length:t),this._data=n}n>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,t)),this._length=n,this._version++}static fromAnd(n,t){if(n._length!=t._length)throw new Error(`Lengths differ (${n._length} != ${t._length})`);const e=new i(n._length);e._length=n._length,e._data=i._createBuffer(e._length),e._version=0;const r=n.lengthInInts;for(let i=0;i<r;i++)e._data[i]=n._data[i]&t._data[i];return e}static _createBuffer(n){return new Uint32Array(Math.floor((n+31)/32))}static fromValues(n){const t=new i(n.length);t._version=0;for(let e=0;e<t._length;e++)n[e]&&(t._data[Math.floor(e/32)]|=1<<(e%32&31));return t}static fromSeq(n,t){const e=new i(n);for(let i=0;i<n;++i)e.setBit(i,t(i));return e._version=0,e}static fromString(n){return i.fromSeq(n.length,(t=>"1"==n.charAt(t)))}static fromUint32Array(n,t){const e=new i(n);return e._data=t,e}static fromBytes(n){const t=n.length,e=new i(8*t);e._data=new Uint32Array(Math.floor((t+3)/4)),e._length=8*t;let r=0,a=0;for(;t-a>=4;)e._data[r++]=255&n[a]|(255&n[a+1])<<8|(255&n[a+2])<<16|(255&n[a+3])<<24,a+=4;return t-a==3&&(e._data[r]=(255&n[a+2])<<16),t-a==2&&(e._data[r]|=(255&n[a+1])<<8),t-a==1&&(e._data[r]|=255&n[a]),e._version=0,e}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(n){if(this==n)return!0;if(null==n)return!1;if(this._length!=n._length)return!1;if(0==this._length)return!0;for(let t=0;t<this._data.length-1;t++)if(this._data[t]!=n._data[t])return!1;for(let t=8*(this._data.length-1);t<this._length;t++)if(this.getBit(t)!=n.getBit(t))return!1;return!0}clone(){const n=new i(0,!1);return n._data=Uint32Array.from(this._data),n._length=this._length,n._version=this._version,n}init(n,t){this.setAll(!1,!1);for(let t=0;t<this._length;t++)n(t)&&(this._data[Math.floor(t/32)]|=1<<(t%32&31));return this.incrementVersion(t),this}invert(n=!0){for(let n=0;n<this._data.length;n++)this._data[n]^=-1;this.incrementVersion(n)}setAll(n,t=!1){const e=n?-1:0,i=this.lengthInInts;for(let n=0;n<i;n++)this._data[n]=e;this.incrementVersion(t)}setIndexes(n,t=!0,e=!0,i=!0){e&&this.setAll(!t,!1);for(const e of n)this.setFast(e,t);this.incrementVersion(i)}everyIndex(n,t=!0){for(const e of n)if(this.getBit(e)!=t)return!1;return!0}anyIndex(n,t=!0){for(const e of n)if(this.getBit(e)==t)return!0;return!1}setWhere(n,t=!0,e=!0,i=!0,r=!0){if(e&&r&&this.setAll(!t,!1),r)for(let e=0;e<this._length;e++)n(e)&&this.setFast(e,t);else for(let e=0;e<this._length;e++)this.setFast(e,n(e)?t:!t);this.incrementVersion(i)}getRange(n,t){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const e=[];for(let i=n;i<t;++i)e.push(this.getBit(i));return i.fromValues(e)}getRangeAsList(n,t){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const e=[];for(let i=n;i<t;++i)e.push(this.getBit(i));return e}setRange(n,t,e,i=!0){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length-1,"to");const r=Math.min(n,t),a=Math.max(n,t);if(e)for(let n=r;n<=a;n++)this.setTrue(n);else for(let n=r;n<=a;n++)this.setFalse(n);return this.incrementVersion(i),this}setRandom(n,t,e=!0){if(n<0||n>this._length)throw new Error("n must be >= 0 && <= Count");n>this._length/2&&this.setRandom(this._length-n,!t),this.setAll(!t);for(let e=0;e<n;){const n=Math.floor(Math.random()*this._length);this.getBit(n)!=t&&(this.setFast(n,t),e++)}this.incrementVersion(e)}and(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]&=n._data[t];return this.incrementVersion(t),this}andNot(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");const e=this.lengthInInts;for(let t=0;t<e;t++)this._data[t]&=~n._data[t];return this.incrementVersion(t),this}notAnd(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t]&n._data[t];return this.incrementVersion(t),this}not(n=!0){for(let n=0,t=this.lengthInInts;n<t;n++)this._data[n]=~this._data[n];return this.incrementVersion(n),this}or(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]|=n._data[t];return this.incrementVersion(t),this}xor(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]^=n._data[t];return this.incrementVersion(t),this}insertAt(n,t,e=!1){if(this.assureInRange(n,0,this._length,"pos"),0==t)return;const i=this._length;this.setLength(this._length+t);for(let e=i-1;e>=n;e--)this.setBit(e+t,this.getBit(e));for(let i=n;i<n+t;i++)this.setBit(i,e)}removeAt(n,t=1){if(t<0)throw new Error("n cannot be negative");if(this.assureInRange(n,0,this._length-t,"pos"),this.contains(!0))for(let e=n;e<this._length-t;e++)this.setBit(e,this.getBit(e+t));this.setLength(this._length-t)}removeByMask(n,t=!0){if(this._length!=n.length)throw new Error("length != mask.length");if(n==this)this.setLength(n.countBits(!t)),this.setAll(!t);else{let e=0;for(let i=-1;-1!=(i=n.findNext(i,!t));)this.setFast(e++,this.getBit(i));this._length=e,this._version++}return this}getBit(n){return 0!=(this._data[Math.floor(n/32)]&1<<(31&n))}setBit(n,t,e=!0){this.setFast(n,t),this._version++}setFast(n,t){t?this._data[Math.floor(n/32)]|=1<<(31&n):this._data[Math.floor(n/32)]&=~(1<<(31&n))}setTrue(n){this._data[Math.floor(n/32)]|=1<<(31&n)}setFalse(n){this._data[Math.floor(n/32)]&=~(1<<(31&n))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(n){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const n=this.lengthInInts;let t=0;for(;t<n-1;t++)for(let n=this._data[t];0!=n;n>>>=8)this._selectedCount+=i._onBitCount[255&n];let e=this._data[t];const r=31&this._length;for(0!=r&&(e&=~(4294967295<<r));0!=e;e>>>=8)this._selectedCount+=i._onBitCount[255&e];this._selectedCountVersion=this._version}return n?this._selectedCount:this._length-this._selectedCount}countWhere(n){let t=0;if(this.trueCount()==this._length)for(let e=0;e<this._length;e++)t+=n(e)?1:0;else for(let e=-1;-1!=(e=this.findNext(e,!0));)t+=n(e)?1:0;return t}andWithCountBits(n,t){if(0==this._length)return 0;let e=0;const r=this.lengthInInts;let a=0;for(;a<r-1;a++)for(let t=this._data[a]&n._data[a];0!=t;t>>>=8)e+=i._onBitCount[255&t];let s=this._data[a]&n._data[a];const o=31&this._length;for(0!=o&&(s&=~(4294967295<<o));0!=s;s>>>=8)e+=i._onBitCount[255&s];return t?e:this._length-e}clear(){this.setLength(0)}contains(n){return this.findNext(-1,n)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(n,t=!0){if(this.assureInRange(n,-1,this._length,"index"),n>=this._length-1)return-1;let e=31&(n=n<0?0:n+1);const r=this.lengthInInts;for(let a=Math.floor(n/32);a<r;a++){let r=t?this._data[a]:~this._data[a];if(0!=e)r&=4294967295<<e&4294967295,e=0;else if(!t&&-4294967296==r)continue;for(let t=0;0!=r;t+=8,r>>>=8){const e=i._firstOnBit[255&r];if(e>=0)return(n=e+32*a+t)>=this._length?-1:n}}return-1}findPrev(n,t=!0){if(0==n)return-1;this.assureInRange(n,-1,this._length,"index");let e=1+(n=n<0?this._length-1:n-1)&31;for(let r=Math.floor(n/32);r>=0;r--){let n=t?this._data[r]:~this._data[r];0!=e&&(n&=~(4294967295<<e),e=0);for(let t=24;0!=n;t-=8,n<<=8){const e=i._lastOnBit[n>>>24];if(e>=0)return e+32*r+t}}return-1}}i._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),i._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),i._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7])},279:(n,t,e)=>{"use strict";function i(n,t,e){function i(n,t){let e=null,i=null;for(const r of n){const n=t(r);(null==i||n>i)&&(e=r,i=n)}return e}const r=[(s=n-1,Math.floor(function(n){return Math.random()*n}(s)))],a=new Set;var s;for(let t=0;t<n;++t)r.includes(t)||a.add(t);for(;r.length<t;){const n=i(a.values(),(n=>Math.min.apply(Math,r.map((function(t,i){return e(n,t)})))));null!=n&&(r.push(n),a.delete(n))}return r}e.d(t,{L:()=>i})},8467:(n,t,e)=>{"use strict";e.d(t,{gw:()=>o,zg:()=>s}),e(4469);var i=e(976);e(9133),i.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,').columns.add(i.Column.fromList(i.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r,a=function(n,t,e,i){return new(e||(e=Promise))((function(r,a){function s(n){try{f(i.next(n))}catch(n){a(n)}}function o(n){try{f(i.throw(n))}catch(n){a(n)}}function f(n){var t;n.done?r(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(s,o)}f((i=i.apply(n,t||[])).next())}))};function s(n,t,e,i=0,r="timeout"){return a(this,void 0,void 0,(function*(){return new Promise(((a,s)=>{const o=n.subscribe((n=>{try{t(n),a("OK")}catch(n){s(n)}o.unsubscribe(),clearTimeout(f)})),f=setTimeout((()=>{o.unsubscribe(),s(r)}),i);e()}))}))}function o(n){return a(this,void 0,void 0,(function*(){yield new Promise((t=>setTimeout(t,n)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(n){n.notNull=function(n,t){if(null==n)throw new Error(`${null==t?"Value":t} not defined`)}}(r||(r={})),i.DataFrame.fromColumns([i.Column.fromStrings("col",["val1","val2","val3"])])},850:(n,t,e)=>{"use strict";function i(n=!1,t="Assertion error."){if(!n)throw new Error(t)}function r(n){let t=0;for(let e=0;e<n.length;e++)t+=n[e]*n[e];return Math.sqrt(t)}function a(n,t){if(n.length!=t.length)throw new Error("The dimensionality of the vectors must match");let e=0;for(let i=0;i<n.length;i++)e+=n[i]*t[i];return e}function s(n,t){let e=0;const i=n.length;if(i!==t.length)throw new Error("The dimensionality of the vectors must match");for(let r=0;r<i;++r)e+=Math.pow(n[r]-t[r],2);return Math.sqrt(e)}function o(n){const t=n.length;let e=0,i=0;for(let r=0;r<t;++r)e+=n[r],i+=Math.pow(n[r],2);const r=e/t,a=1/Math.sqrt(i/t-Math.pow(r,2));for(let e=0;e<t;++e)n[e]=(n[e]-r)*a;return n}e.d(t,{$G:()=>r,Fv:()=>o,MA:()=>a,dP:()=>s,hu:()=>i})},3351:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(1581),r=e(3487),a=e(7023),s=e(4815),o=e(4181),f=e(2141),d="errorMessage",h=new i.Name("emUsed"),u={required:"missingProperty",dependencies:"property",dependentRequired:"property"},c=/\$\{[^}]+\}/,b=/\$\{([^}]+)\}/g,l=/^""\s*\+\s*|\s*\+\s*""$/g;const g=(n,t={})=>{if(!n.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(n.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return n.addKeyword(function(n){return{keyword:d,schemaType:["string","object"],post:!0,code(t){const{gen:e,data:g,schema:D,schemaValue:j,it:H}=t;if(!1===H.createErrors)return;const A=D,p=r.strConcat(f.default.instancePath,H.errorPath);function I(n,t){return r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,i._`${n}.instancePath === ${p}`,i._`${n}.keyword in ${t}`,i._`${n}.schemaPath.indexOf(${H.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${n}.schemaPath.slice(${H.errSchemaPath.length}))`)}function M(n,t){const i=[];for(const e in n){const n=t[e];c.test(n)&&i.push([e,m(n)])}return e.object(...i)}function T(n){return c.test(n)?new a._Code(a.safeStringify(n).replace(b,((n,t)=>`" + JSON.stringify(${s.getData(t,H)}) + "`)).replace(l,"")):i.stringify(n)}function m(n){return i._`function(){return ${T(n)}}`}e.if(i._`${f.default.errors} > 0`,(()=>{if("object"==typeof A){const[a,s]=function(n){let t,e;for(const i in n){if("properties"===i||"items"===i)continue;const r=n[i];if("object"==typeof r){t||(t={});const n=t[i]={};for(const t in r)n[t]=[]}else e||(e={}),e[i]=[]}return[t,e]}(A);s&&function(r){const a=e.const("emErrors",i.stringify(r)),s=e.const("templates",M(r,D));e.forOf("err",f.default.vErrors,(n=>e.if(I(n,a),(()=>e.code(i._`${a}[${n}.keyword].push(${n})`).assign(i._`${n}.${h}`,!0)))));const{singleError:d}=n;if(d){const n=e.let("message",i._`""`),r=e.let("paramsErrors",i._`[]`);u((t=>{e.if(n,(()=>e.code(i._`${n} += ${"string"==typeof d?d:";"}`))),e.code(i._`${n} += ${c(t)}`),e.assign(r,i._`${r}.concat(${a}[${t}])`)})),o.reportError(t,{message:n,params:i._`{errors: ${r}}`})}else u((n=>o.reportError(t,{message:c(n),params:i._`{errors: ${a}[${n}]}`})));function u(n){e.forIn("key",a,(t=>e.if(i._`${a}[${t}].length`,(()=>n(t)))))}function c(n){return i._`${n} in ${s} ? ${s}[${n}]() : ${j}[${n}]`}}(s),a&&function(n){const r=e.const("emErrors",i.stringify(n)),a=[];for(const t in n)a.push([t,M(n[t],D[t])]);const s=e.const("templates",e.object(...a)),d=e.scopeValue("obj",{ref:u,code:i.stringify(u)}),c=e.let("emPropParams"),b=e.let("emParamsErrors");e.forOf("err",f.default.vErrors,(n=>e.if(I(n,r),(()=>{e.assign(c,i._`${d}[${n}.keyword]`),e.assign(b,i._`${r}[${n}.keyword][${n}.params[${c}]]`),e.if(b,(()=>e.code(i._`${b}.push(${n})`).assign(i._`${n}.${h}`,!0)))})))),e.forIn("key",r,(n=>e.forIn("keyProp",i._`${r}[${n}]`,(a=>{e.assign(b,i._`${r}[${n}][${a}]`),e.if(i._`${b}.length`,(()=>{const r=e.const("tmpl",i._`${s}[${n}] && ${s}[${n}][${a}]`);o.reportError(t,{message:i._`${r} ? ${r}() : ${j}[${n}][${a}]`,params:i._`{errors: ${b}}`})}))}))))}(a),function(n){const{props:a,items:s}=n;if(!a&&!s)return;const u=i._`typeof ${g} == "object"`,c=i._`Array.isArray(${g})`,b=e.let("emErrors");let l,H;const A=e.let("templates");function I(n,t){e.assign(b,i.stringify(n)),e.assign(A,M(n,t))}a&&s?(l=e.let("emChildKwd"),e.if(u),e.if(c,(()=>{I(s,D.items),e.assign(l,i.str`items`)}),(()=>{I(a,D.properties),e.assign(l,i.str`properties`)})),H=i._`[${l}]`):s?(e.if(c),I(s,D.items),H=i._`.items`):a&&(e.if(r.and(u,r.not(c))),I(a,D.properties),H=i._`.properties`),e.forOf("err",f.default.vErrors,(n=>function(n,t,a){e.if(r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,i._`${n}.instancePath.indexOf(${p}) === 0`),(()=>{const r=e.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=e.const("emMatches",i._`${r}.exec(${n}.instancePath.slice(${p}.length))`),o=e.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);e.if(i._`${o} !== undefined && ${o} in ${t}`,(()=>a(o)))}))}(n,b,(t=>e.code(i._`${b}[${t}].push(${n})`).assign(i._`${n}.${h}`,!0))))),e.forIn("key",b,(n=>e.if(i._`${b}[${n}].length`,(()=>{o.reportError(t,{message:i._`${n} in ${A} ? ${A}[${n}]() : ${j}${H}[${n}]`,params:i._`{errors: ${b}[${n}]}`}),e.assign(i._`${f.default.vErrors}[${f.default.errors}-1].instancePath`,i._`${p} + "/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),e.endIf()}(function({properties:n,items:t}){const e={};if(n){e.props={};for(const t in n)e.props[t]=[]}if(t){e.items={};for(let n=0;n<t.length;n++)e.items[n]=[]}return e}(A))}const a="string"==typeof A?A:A._;a&&function(n){const a=e.const("emErrs",i._`[]`);e.forOf("err",f.default.vErrors,(n=>e.if(function(n){return r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,r.or(i._`${n}.instancePath === ${p}`,r.and(i._`${n}.instancePath.indexOf(${p}) === 0`,i._`${n}.instancePath[${p}.length] === "/"`)),i._`${n}.schemaPath.indexOf(${H.errSchemaPath}) === 0`,i._`${n}.schemaPath[${H.errSchemaPath}.length] === "/"`)}(n),(()=>e.code(i._`${a}.push(${n})`).assign(i._`${n}.${h}`,!0))))),e.if(i._`${a}.length`,(()=>o.reportError(t,{message:T(n),params:i._`{errors: ${a}}`})))}(a),n.keepErrors||function(){const n=e.const("emErrs",i._`[]`);e.forOf("err",f.default.vErrors,(t=>e.if(i._`!${t}.${h}`,(()=>e.code(i._`${n}.push(${t})`))))),e.assign(f.default.vErrors,n).assign(f.default.errors,i._`${n}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=g,n.exports=g,n.exports.default=g},5128:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=e(7159),r=e(7299),a=e(1240),s=e(4087),o="https://json-schema.org/draft/2020-12/schema";class f extends i.default{constructor(n={}){super({...n,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach((n=>this.addVocabulary(n))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:n,meta:t}=this.opts;t&&(s.default.call(this,n),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}n.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var d=e(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=e(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var u=e(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var c=e(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return c.default}})},1581:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=e(7159),r=e(3924),a=e(1240),s=e(98),o=["/properties"],f="http://json-schema.org/draft-07/schema";class d extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((n=>this.addVocabulary(n))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const n=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(n,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}n.exports=t=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var h=e(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var u=e(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var c=e(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return c.default}});var b=e(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return b.default}})},7023:(n,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(n){if(super(),!t.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(n){super(),this._items="string"==typeof n?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return""===n||'""'===n}get str(){var n;return null!==(n=this._str)&&void 0!==n?n:this._str=this._items.reduce(((n,t)=>`${n}${t}`),"")}get names(){var n;return null!==(n=this._names)&&void 0!==n?n:this._names=this._items.reduce(((n,t)=>(t instanceof i&&(n[t.str]=(n[t.str]||0)+1),n)),{})}}function a(n,...t){const e=[n[0]];let i=0;for(;i<t.length;)f(e,t[i]),e.push(n[++i]);return new r(e)}t._Code=r,t.nil=new r(""),t._=a;const s=new r("+");function o(n,...t){const e=[h(n[0])];let i=0;for(;i<t.length;)e.push(s),f(e,t[i]),e.push(s,h(n[++i]));return function(n){let t=1;for(;t<n.length-1;){if(n[t]===s){const e=d(n[t-1],n[t+1]);if(void 0!==e){n.splice(t-1,3,e);continue}n[t++]="+"}t++}}(e),new r(e)}function f(n,t){var e;t instanceof r?n.push(...t._items):t instanceof i?n.push(t):n.push("number"==typeof(e=t)||"boolean"==typeof e||null===e?e:h(Array.isArray(e)?e.join(","):e))}function d(n,t){if('""'===t)return n;if('""'===n)return t;if("string"==typeof n){if(t instanceof i||'"'!==n[n.length-1])return;return"string"!=typeof t?`${n.slice(0,-1)}${t}"`:'"'===t[0]?n.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||n instanceof i?void 0:`"${n}${t.slice(1)}`}function h(n){return JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=f,t.strConcat=function(n,t){return t.emptyStr()?n:n.emptyStr()?t:o`${n}${t}`},t.stringify=function(n){return new r(h(n))},t.safeStringify=h,t.getProperty=function(n){return"string"==typeof n&&t.IDENTIFIER.test(n)?new r(`.${n}`):a`[${n}]`},t.getEsmExportName=function(n){if("string"==typeof n&&t.IDENTIFIER.test(n))return new r(`${n}`);throw new Error(`CodeGen: invalid export name: ${n}, use explicit $id name mapping`)},t.regexpCode=function(n){return new r(n.toString())}},3487:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=e(7023),r=e(8490);var a=e(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}});var s=e(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class o{optimizeNodes(){return this}optimizeNames(n,t){return this}}class f extends o{constructor(n,t,e){super(),this.varKind=n,this.name=t,this.rhs=e}render({es5:n,_n:t}){const e=n?r.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${e} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,n,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class d extends o{constructor(n,t,e){super(),this.lhs=n,this.rhs=t,this.sideEffects=e}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof i.Name)||n[this.lhs.str]||this.sideEffects)return this.rhs=B(this.rhs,n,t),this}get names(){return U(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class h extends d{constructor(n,t,e,i){super(n,e,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}}class u extends o{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}}class c extends o{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}}class b extends o{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}}class l extends o{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=B(this.code,n,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class g extends o{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce(((t,e)=>t+e.render(n)),"")}optimizeNodes(){const{nodes:n}=this;let t=n.length;for(;t--;){const e=n[t].optimizeNodes();Array.isArray(e)?n.splice(t,1,...e):e?n[t]=e:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){const{nodes:e}=this;let i=e.length;for(;i--;){const r=e[i];r.optimizeNames(n,t)||(R(n,r.names),e.splice(i,1))}return e.length>0?this:void 0}get names(){return this.nodes.reduce(((n,t)=>L(n,t.names)),{})}}class D extends g{render(n){return"{"+n._n+super.render(n)+"}"+n._n}}class j extends g{}class H extends D{}H.kind="else";class A extends D{constructor(n,t){super(t),this.condition=n}render(n){let t=`if(${this.condition})`+super.render(n);return this.else&&(t+="else "+this.else.render(n)),t}optimizeNodes(){super.optimizeNodes();const n=this.condition;if(!0===n)return this.nodes;let t=this.else;if(t){const n=t.optimizeNodes();t=this.else=Array.isArray(n)?new H(n):n}return t?!1===n?t instanceof A?t:t.nodes:this.nodes.length?this:new A(C(n),t instanceof A?[t]:t.nodes):!1!==n&&this.nodes.length?this:void 0}optimizeNames(n,t){var e;if(this.else=null===(e=this.else)||void 0===e?void 0:e.optimizeNames(n,t),super.optimizeNames(n,t)||this.else)return this.condition=B(this.condition,n,t),this}get names(){const n=super.names;return U(n,this.condition),this.else&&L(n,this.else.names),n}}A.kind="if";class p extends D{}p.kind="for";class I extends p{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=B(this.iteration,n,t),this}get names(){return L(super.names,this.iteration.names)}}class M extends p{constructor(n,t,e,i){super(),this.varKind=n,this.name=t,this.from=e,this.to=i}render(n){const t=n.es5?r.varKinds.var:this.varKind,{name:e,from:i,to:a}=this;return`for(${t} ${e}=${i}; ${e}<${a}; ${e}++)`+super.render(n)}get names(){const n=U(super.names,this.from);return U(n,this.to)}}class T extends p{constructor(n,t,e,i){super(),this.loop=n,this.varKind=t,this.name=e,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=B(this.iterable,n,t),this}get names(){return L(super.names,this.iterable.names)}}class m extends D{constructor(n,t,e){super(),this.name=n,this.args=t,this.async=e}render(n){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(n)}}m.kind="func";class J extends g{render(n){return"return "+super.render(n)}}J.kind="return";class P extends D{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),null===(n=this.catch)||void 0===n||n.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(n,t){var e,i;return super.optimizeNames(n,t),null===(e=this.catch)||void 0===e||e.optimizeNames(n,t),null===(i=this.finally)||void 0===i||i.optimizeNames(n,t),this}get names(){const n=super.names;return this.catch&&L(n,this.catch.names),this.finally&&L(n,this.finally.names),n}}class N extends D{constructor(n){super(),this.error=n}render(n){return`catch(${this.error})`+super.render(n)}}N.kind="catch";class w extends D{render(n){return"finally"+super.render(n)}}function L(n,t){for(const e in t)n[e]=(n[e]||0)+(t[e]||0);return n}function U(n,t){return t instanceof i._CodeOrName?L(n,t.names):n}function B(n,t,e){return n instanceof i.Name?a(n):(r=n)instanceof i._Code&&r._items.some((n=>n instanceof i.Name&&1===t[n.str]&&void 0!==e[n.str]))?new i._Code(n._items.reduce(((n,t)=>(t instanceof i.Name&&(t=a(t)),t instanceof i._Code?n.push(...t._items):n.push(t),n)),[])):n;var r;function a(n){const i=e[n.str];return void 0===i||1!==t[n.str]?n:(delete t[n.str],i)}}function R(n,t){for(const e in t)n[e]=(n[e]||0)-(t[e]||0)}function C(n){return"boolean"==typeof n||"number"==typeof n||null===n?!n:i._`!${k(n)}`}w.kind="finally",t.CodeGen=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=n,this._scope=new r.Scope({parent:n}),this._nodes=[new j]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){const e=this._extScope.value(n,t);return(this._values[e.prefix]||(this._values[e.prefix]=new Set)).add(e),e}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,e,i){const r=this._scope.toName(t);return void 0!==e&&i&&(this._constants[r.str]=e),this._leafNode(new f(n,r,e)),r}const(n,t,e){return this._def(r.varKinds.const,n,t,e)}let(n,t,e){return this._def(r.varKinds.let,n,t,e)}var(n,t,e){return this._def(r.varKinds.var,n,t,e)}assign(n,t,e){return this._leafNode(new d(n,t,e))}add(n,e){return this._leafNode(new h(n,t.operators.ADD,e))}code(n){return"function"==typeof n?n():n!==i.nil&&this._leafNode(new l(n)),this}object(...n){const t=["{"];for(const[e,r]of n)t.length>1&&t.push(","),t.push(e),(e!==r||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,r));return t.push("}"),new i._Code(t)}if(n,t,e){if(this._blockNode(new A(n)),t&&e)this.code(t).else().code(e).endIf();else if(t)this.code(t).endIf();else if(e)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new A(n))}else(){return this._elseNode(new H)}endIf(){return this._endBlockNode(A,H)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new I(n),t)}forRange(n,t,e,i,a=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const s=this._scope.toName(n);return this._for(new M(a,s,t,e),(()=>i(s)))}forOf(n,t,e,a=r.varKinds.const){const s=this._scope.toName(n);if(this.opts.es5){const n=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${n}.length`,(t=>{this.var(s,i._`${n}[${t}]`),e(s)}))}return this._for(new T("of",a,s,t),(()=>e(s)))}forIn(n,t,e,a=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(n,i._`Object.keys(${t})`,e);const s=this._scope.toName(n);return this._for(new T("in",a,s,t),(()=>e(s)))}endFor(){return this._endBlockNode(p)}label(n){return this._leafNode(new u(n))}break(n){return this._leafNode(new c(n))}return(n){const t=new J;if(this._blockNode(t),this.code(n),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(J)}try(n,t,e){if(!t&&!e)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new P;if(this._blockNode(i),this.code(n),t){const n=this.name("e");this._currNode=i.catch=new N(n),t(n)}return e&&(this._currNode=i.finally=new w,this.code(e)),this._endBlockNode(N,w)}throw(n){return this._leafNode(new b(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const e=this._nodes.length-t;if(e<0||void 0!==n&&e!==n)throw new Error(`CodeGen: wrong number of nodes: ${e} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=i.nil,e,r){return this._blockNode(new m(n,t,e)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){const e=this._currNode;if(e instanceof n||t&&e instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){const t=this._currNode;if(!(t instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){const n=this._nodes;return n[n.length-1]}set _currNode(n){const t=this._nodes;t[t.length-1]=n}},t.not=C;const y=Q(t.operators.AND);t.and=function(...n){return n.reduce(y)};const E=Q(t.operators.OR);function Q(n){return(t,e)=>t===i.nil?e:e===i.nil?t:i._`${k(t)} ${n} ${k(e)}`}function k(n){return n instanceof i.Name?n:i._`(${n})`}t.or=function(...n){return n.reduce(E)}},8490:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=e(7023);class r extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}}var a;!function(n){n[n.Started=0]="Started",n[n.Completed=1]="Completed"}(a=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class s{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof i.Name?n:this.name(n)}name(n){return new i.Name(this._newName(n))}_newName(n){return`${n}${(this._names[n]||this._nameGroup(n)).index++}`}_nameGroup(n){var t,e;if((null===(e=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===e?void 0:e.has(n))||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}}t.Scope=s;class o extends i.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:e}){this.value=n,this.scopePath=i._`.${new i.Name(t)}[${e}]`}}t.ValueScopeName=o;const f=i._`\n`;t.ValueScope=class extends s{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts={...n,_n:n.lines?f:i.nil}}get(){return this._scope}name(n){return new o(n,this._newName(n))}value(n,t){var e;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(n),{prefix:r}=i,a=null!==(e=t.key)&&void 0!==e?e:t.ref;let s=this._values[r];if(s){const n=s.get(a);if(n)return n}else s=this._values[r]=new Map;s.set(a,i);const o=this._scope[r]||(this._scope[r]=[]),f=o.length;return o[f]=t.ref,i.setValue(t,{property:r,itemIndex:f}),i}getValue(n,t){const e=this._values[n];if(e)return e.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${n}${t.scopePath}`}))}scopeCode(n=this._values,t,e){return this._reduceValues(n,(n=>{if(void 0===n.value)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code}),t,e)}_reduceValues(n,e,s={},o){let f=i.nil;for(const d in n){const h=n[d];if(!h)continue;const u=s[d]=s[d]||new Map;h.forEach((n=>{if(u.has(n))return;u.set(n,a.Started);let s=e(n);if(s){const e=this.opts.es5?t.varKinds.var:t.varKinds.const;f=i._`${f}${e} ${n} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(n)))throw new r(n);f=i._`${f}${s}${this.opts._n}`}u.set(n,a.Completed)}))}return f}}},4181:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=e(3487),r=e(6776),a=e(2141);function s(n,t){const e=n.const("err",t);n.if(i._`${a.default.vErrors} === null`,(()=>n.assign(a.default.vErrors,i._`[${e}]`)),i._`${a.default.vErrors}.push(${e})`),n.code(i._`${a.default.errors}++`)}function o(n,t){const{gen:e,validateName:r,schemaEnv:a}=n;a.$async?e.throw(i._`new ${n.ValidationError}(${t})`):(e.assign(i._`${r}.errors`,t),e.return(!1))}t.keywordError={message:({keyword:n})=>i.str`must pass "${n}" keyword validation`},t.keyword$DataError={message:({keyword:n,schemaType:t})=>t?i.str`"${n}" keyword must be ${t} ($data)`:i.str`"${n}" keyword is invalid ($data)`},t.reportError=function(n,e=t.keywordError,r,a){const{it:f}=n,{gen:h,compositeRule:u,allErrors:c}=f,b=d(n,e,r);(null!=a?a:u||c)?s(h,b):o(f,i._`[${b}]`)},t.reportExtraError=function(n,e=t.keywordError,i){const{it:r}=n,{gen:f,compositeRule:h,allErrors:u}=r;s(f,d(n,e,i)),h||u||o(r,a.default.vErrors)},t.resetErrorsCount=function(n,t){n.assign(a.default.errors,t),n.if(i._`${a.default.vErrors} !== null`,(()=>n.if(t,(()=>n.assign(i._`${a.default.vErrors}.length`,t)),(()=>n.assign(a.default.vErrors,null)))))},t.extendErrors=function({gen:n,keyword:t,schemaValue:e,data:r,errsCount:s,it:o}){if(void 0===s)throw new Error("ajv implementation error");const f=n.name("err");n.forRange("i",s,a.default.errors,(s=>{n.const(f,i._`${a.default.vErrors}[${s}]`),n.if(i._`${f}.instancePath === undefined`,(()=>n.assign(i._`${f}.instancePath`,(0,i.strConcat)(a.default.instancePath,o.errorPath)))),n.assign(i._`${f}.schemaPath`,i.str`${o.errSchemaPath}/${t}`),o.opts.verbose&&(n.assign(i._`${f}.schema`,e),n.assign(i._`${f}.data`,r))}))};const f={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function d(n,t,e){const{createErrors:r}=n.it;return!1===r?i._`{}`:function(n,t,e={}){const{gen:r,it:s}=n,o=[h(s,e),u(n,e)];return function(n,{params:t,message:e},r){const{keyword:s,data:o,schemaValue:d,it:h}=n,{opts:u,propertyName:c,topSchemaRef:b,schemaPath:l}=h;r.push([f.keyword,s],[f.params,"function"==typeof t?t(n):t||i._`{}`]),u.messages&&r.push([f.message,"function"==typeof e?e(n):e]),u.verbose&&r.push([f.schema,d],[f.parentSchema,i._`${b}${l}`],[a.default.data,o]),c&&r.push([f.propertyName,c])}(n,t,o),r.object(...o)}(n,t,e)}function h({errorPath:n},{instancePath:t}){const e=t?i.str`${n}${(0,r.getErrorPath)(t,r.Type.Str)}`:n;return[a.default.instancePath,(0,i.strConcat)(a.default.instancePath,e)]}function u({keyword:n,it:{errSchemaPath:t}},{schemaPath:e,parentSchema:a}){let s=a?t:i.str`${t}/${n}`;return e&&(s=i.str`${s}${(0,r.getErrorPath)(e,r.Type.Str)}`),[f.schemaPath,s]}},5173:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=e(3487),r=e(7426),a=e(2141),s=e(2531),o=e(6776),f=e(4815);class d{constructor(n){var t;let e;this.refs={},this.dynamicAnchors={},"object"==typeof n.schema&&(e=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(t=n.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==e?void 0:e[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=null==e?void 0:e.$async,this.refs={}}}function h(n){const t=c.call(this,n);if(t)return t;const e=(0,s.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:o,lines:d}=this.opts.code,{ownProperties:h}=this.opts,u=new i.CodeGen(this.scope,{es5:o,lines:d,ownProperties:h});let b;n.$async&&(b=u.scopeValue("Error",{ref:r.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const l=u.scopeName("validate");n.validateName=l;const g={gen:u,allErrors:this.opts.allErrors,data:a.default.data,parentData:a.default.parentData,parentDataProperty:a.default.parentDataProperty,dataNames:[a.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:n.schema,code:(0,i.stringify)(n.schema)}:{ref:n.schema}),validateName:l,ValidationError:b,schema:n.schema,schemaEnv:n,rootId:e,baseId:n.baseId||e,schemaPath:i.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let D;try{this._compilations.add(n),(0,f.validateFunctionCode)(g),u.optimize(this.opts.code.optimize);const t=u.toString();D=`${u.scopeRefs(a.default.scope)}return ${t}`,this.opts.code.process&&(D=this.opts.code.process(D,n));const e=new Function(`${a.default.self}`,`${a.default.scope}`,D)(this,this.scope.get());if(this.scope.value(l,{ref:e}),e.errors=null,e.schema=n.schema,e.schemaEnv=n,n.$async&&(e.$async=!0),!0===this.opts.code.source&&(e.source={validateName:l,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:n,items:t}=g;e.evaluated={props:n instanceof i.Name?void 0:n,items:t instanceof i.Name?void 0:t,dynamicProps:n instanceof i.Name,dynamicItems:t instanceof i.Name},e.source&&(e.source.evaluated=(0,i.stringify)(e.evaluated))}return n.validate=e,n}catch(t){throw delete n.validate,delete n.validateName,D&&this.logger.error("Error compiling schema, function code:",D),t}finally{this._compilations.delete(n)}}function u(n){return(0,s.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:h.call(this,n)}function c(n){for(const i of this._compilations)if(e=n,(t=i).schema===e.schema&&t.root===e.root&&t.baseId===e.baseId)return i;var t,e}function b(n,t){let e;for(;"string"==typeof(e=this.refs[t]);)t=e;return e||this.schemas[t]||l.call(this,n,t)}function l(n,t){const e=this.opts.uriResolver.parse(t),i=(0,s._getFullPath)(this.opts.uriResolver,e);let r=(0,s.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&i===r)return D.call(this,e,n);const a=(0,s.normalizeId)(i),o=this.refs[a]||this.schemas[a];if("string"==typeof o){const t=l.call(this,n,o);if("object"!=typeof(null==t?void 0:t.schema))return;return D.call(this,e,t)}if("object"==typeof(null==o?void 0:o.schema)){if(o.validate||h.call(this,o),a===(0,s.normalizeId)(t)){const{schema:t}=o,{schemaId:e}=this.opts,i=t[e];return i&&(r=(0,s.resolveUrl)(this.opts.uriResolver,r,i)),new d({schema:t,schemaId:e,root:n,baseId:r})}return D.call(this,e,o)}}t.SchemaEnv=d,t.compileSchema=h,t.resolveRef=function(n,t,e){var i;e=(0,s.resolveUrl)(this.opts.uriResolver,t,e);const r=n.refs[e];if(r)return r;let a=b.call(this,n,e);if(void 0===a){const r=null===(i=n.localRefs)||void 0===i?void 0:i[e],{schemaId:s}=this.opts;r&&(a=new d({schema:r,schemaId:s,root:n,baseId:t}))}return void 0!==a?n.refs[e]=u.call(this,a):void 0},t.getCompilingSchema=c,t.resolveSchema=l;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function D(n,{baseId:t,schema:e,root:i}){var r;if("/"!==(null===(r=n.fragment)||void 0===r?void 0:r[0]))return;for(const i of n.fragment.slice(1).split("/")){if("boolean"==typeof e)return;const n=e[(0,o.unescapeFragment)(i)];if(void 0===n)return;const r="object"==typeof(e=n)&&e[this.opts.schemaId];!g.has(i)&&r&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,r))}let a;if("boolean"!=typeof e&&e.$ref&&!(0,o.schemaHasRulesButRef)(e,this.RULES)){const n=(0,s.resolveUrl)(this.opts.uriResolver,t,e.$ref);a=l.call(this,i,n)}const{schemaId:f}=this.opts;return a=a||new d({schema:e,schemaId:f,root:i,baseId:t}),a.schema!==a.root.schema?a:void 0}},2141:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(3487),r={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=r},6646:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(2531);class r extends Error{constructor(n,t,e,r){super(r||`can't resolve reference ${e} from id ${t}`),this.missingRef=(0,i.resolveUrl)(n,t,e),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(n,this.missingRef))}}t.default=r},2531:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=e(6776),r=e(4063),a=e(9461),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(n,t=!0){return"boolean"==typeof n||(!0===t?!f(n):!!t&&d(n)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function f(n){for(const t in n){if(o.has(t))return!0;const e=n[t];if(Array.isArray(e)&&e.some(f))return!0;if("object"==typeof e&&f(e))return!0}return!1}function d(n){let t=0;for(const e in n){if("$ref"===e)return 1/0;if(t++,!s.has(e)&&("object"==typeof n[e]&&(0,i.eachItem)(n[e],(n=>t+=d(n))),t===1/0))return 1/0}return t}function h(n,t="",e){!1!==e&&(t=b(t));const i=n.parse(t);return u(n,i)}function u(n,t){return n.serialize(t).split("#")[0]+"#"}t.getFullPath=h,t._getFullPath=u;const c=/#\/?$/;function b(n){return n?n.replace(c,""):""}t.normalizeId=b,t.resolveUrl=function(n,t,e){return e=b(e),n.resolve(t,e)};const l=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(n,t){if("boolean"==typeof n)return{};const{schemaId:e,uriResolver:i}=this.opts,s=b(n[e]||t),o={"":s},f=h(i,s,!1),d={},u=new Set;return a(n,{allKeys:!0},((n,t,i,r)=>{if(void 0===r)return;const a=f+t;let s=o[r];function h(t){const e=this.opts.uriResolver.resolve;if(t=b(s?e(s,t):t),u.has(t))throw g(t);u.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?c(n,i.schema,t):t!==b(a)&&("#"===t[0]?(c(n,d[t],t),d[t]=n):this.refs[t]=a),t}function D(n){if("string"==typeof n){if(!l.test(n))throw new Error(`invalid anchor "${n}"`);h.call(this,`#${n}`)}}"string"==typeof n[e]&&(s=h.call(this,n[e])),D.call(this,n.$anchor),D.call(this,n.$dynamicAnchor),o[t]=s})),d;function c(n,t,e){if(void 0!==t&&!r(n,t))throw g(e)}function g(n){return new Error(`reference "${n}" resolves to more than one schema`)}}},3141:(n,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(n){return"string"==typeof n&&e.has(n)},t.getRules=function(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}},6776:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=e(3487),r=e(7023);function a(n,t=n.schema){const{opts:e,self:i}=n;if(!e.strictSchema)return;if("boolean"==typeof t)return;const r=i.RULES.keywords;for(const e in t)r[e]||l(n,`unknown keyword: "${e}"`)}function s(n,t){if("boolean"==typeof n)return!n;for(const e in n)if(t[e])return!0;return!1}function o(n){return"number"==typeof n?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}function f(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:n,mergeToName:t,mergeValues:e,resultToName:r}){return(a,s,o,f)=>{const d=void 0===o?s:o instanceof i.Name?(s instanceof i.Name?n(a,s,o):t(a,s,o),o):s instanceof i.Name?(t(a,o,s),s):e(s,o);return f!==i.Name||d instanceof i.Name?d:r(a,d)}}function h(n,t){if(!0===t)return n.var("props",!0);const e=n.var("props",i._`{}`);return void 0!==t&&u(n,e,t),e}function u(n,t,e){Object.keys(e).forEach((e=>n.assign(i._`${t}${(0,i.getProperty)(e)}`,!0)))}t.toHash=function(n){const t={};for(const e of n)t[e]=!0;return t},t.alwaysValidSchema=function(n,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(a(n,t),!s(t,n.self.RULES.all))},t.checkUnknownRules=a,t.schemaHasRules=s,t.schemaHasRulesButRef=function(n,t){if("boolean"==typeof n)return!n;for(const e in n)if("$ref"!==e&&t.all[e])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:n,schemaPath:t},e,r,a){if(!a){if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e)return i._`${e}`}return i._`${n}${t}${(0,i.getProperty)(r)}`},t.unescapeFragment=function(n){return f(decodeURIComponent(n))},t.escapeFragment=function(n){return encodeURIComponent(o(n))},t.escapeJsonPointer=o,t.unescapeJsonPointer=f,t.eachItem=function(n,t){if(Array.isArray(n))for(const e of n)t(e);else t(n)},t.mergeEvaluated={props:d({mergeNames:(n,t,e)=>n.if(i._`${e} !== true && ${t} !== undefined`,(()=>{n.if(i._`${t} === true`,(()=>n.assign(e,!0)),(()=>n.assign(e,i._`${e} || {}`).code(i._`Object.assign(${e}, ${t})`)))})),mergeToName:(n,t,e)=>n.if(i._`${e} !== true`,(()=>{!0===t?n.assign(e,!0):(n.assign(e,i._`${e} || {}`),u(n,e,t))})),mergeValues:(n,t)=>!0===n||{...n,...t},resultToName:h}),items:d({mergeNames:(n,t,e)=>n.if(i._`${e} !== true && ${t} !== undefined`,(()=>n.assign(e,i._`${t} === true ? true : ${e} > ${t} ? ${e} : ${t}`))),mergeToName:(n,t,e)=>n.if(i._`${e} !== true`,(()=>n.assign(e,!0===t||i._`${e} > ${t} ? ${e} : ${t}`))),mergeValues:(n,t)=>!0===n||Math.max(n,t),resultToName:(n,t)=>n.var("items",t)})},t.evaluatedPropsToName=h,t.setEvaluated=u;const c={};var b;function l(n,t,e=n.opts.strictSchema){if(e){if(t=`strict mode: ${t}`,!0===e)throw new Error(t);n.self.logger.warn(t)}}t.useFunc=function(n,t){return n.scopeValue("func",{ref:t,code:c[t.code]||(c[t.code]=new r._Code(t.code))})},function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"}(b=t.Type||(t.Type={})),t.getErrorPath=function(n,t,e){if(n instanceof i.Name){const r=t===b.Num;return e?r?i._`"[" + ${n} + "]"`:i._`"['" + ${n} + "']"`:r?i._`"/" + ${n}`:i._`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return e?(0,i.getProperty)(n).toString():"/"+o(n)},t.checkStrictMode=l},8876:(n,t)=>{"use strict";function e(n,t){return t.rules.some((t=>i(n,t)))}function i(n,t){var e;return void 0!==n[t.keyword]||(null===(e=t.definition.implements)||void 0===e?void 0:e.some((t=>void 0!==n[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:n,self:t},i){const r=t.RULES.types[i];return r&&!0!==r&&e(n,r)},t.shouldUseGroup=e,t.shouldUseRule=i},5667:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=e(4181),r=e(3487),a=e(2141),s={message:"boolean schema is false"};function o(n,t){const{gen:e,data:r}=n,a={gen:e,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,i.reportError)(a,s,void 0,t)}t.topBoolOrEmptySchema=function(n){const{gen:t,schema:e,validateName:i}=n;!1===e?o(n,!1):"object"==typeof e&&!0===e.$async?t.return(a.default.data):(t.assign(r._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(n,t){const{gen:e,schema:i}=n;!1===i?(e.var(t,!1),o(n)):e.var(t,!0)}},453:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=e(3141),r=e(8876),a=e(4181),s=e(3487),o=e(6776);var f;function d(n){const t=Array.isArray(n)?n:n?[n]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"}(f=t.DataType||(t.DataType={})),t.getSchemaTypes=function(n){const t=d(n.type);if(t.includes("null")){if(!1===n.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==n.nullable)throw new Error('"nullable" cannot be used without "type"');!0===n.nullable&&t.push("null")}return t},t.getJSONTypes=d,t.coerceAndCheckDataType=function(n,t){const{gen:e,data:i,opts:a}=n,o=function(n,t){return t?n.filter((n=>h.has(n)||"array"===t&&"array"===n)):[]}(t,a.coerceTypes),d=t.length>0&&!(0===o.length&&1===t.length&&(0,r.schemaHasRulesForType)(n,t[0]));if(d){const r=c(t,i,a.strictNumbers,f.Wrong);e.if(r,(()=>{o.length?function(n,t,e){const{gen:i,data:r,opts:a}=n,o=i.let("dataType",s._`typeof ${r}`),f=i.let("coerced",s._`undefined`);"array"===a.coerceTypes&&i.if(s._`${o} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>i.assign(r,s._`${r}[0]`).assign(o,s._`typeof ${r}`).if(c(t,r,a.strictNumbers),(()=>i.assign(f,r))))),i.if(s._`${f} !== undefined`);for(const n of e)(h.has(n)||"array"===n&&"array"===a.coerceTypes)&&d(n);function d(n){switch(n){case"string":return void i.elseIf(s._`${o} == "number" || ${o} == "boolean"`).assign(f,s._`"" + ${r}`).elseIf(s._`${r} === null`).assign(f,s._`""`);case"number":return void i.elseIf(s._`${o} == "boolean" || ${r} === null
2
+ var bio;(()=>{var n={2012:(n,t,e)=>{"use strict";e.d(t,{f:()=>r});var i=e(9976);class r extends i.B{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,r)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,r)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new r({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(n){const t=n in r.aaSynonyms?r.aaSynonyms[n]:n;return super.get(t)}}r.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class a{static getPalette(n="grok"){switch(n){case"grok":return r.GrokGroups;case"lesk":return r.Lesk;default:throw new Error(`ChemPalette: scheme \`${n}\` does not exist`)}}static getInnerOuter(n){let t=0,e="",i="";for(const r of n)"("==r?t++:")"==r?t--:t?e+=r:i+=r;return isNaN(parseInt(e))?[i,e]:[i,""]}static getColorAAPivot(n="",t="grok"){const e=this.getPalette(t);let[i,r]=this.getInnerOuter(n);if(i=i.length>6?`${i.slice(0,3)}...`:i,r=r.length>6?`${r.slice(0,3)}...`:r,1==n.length||"("==n[1]){const t=n[0]?.toUpperCase();return t in e?[e.get(t),t,r,1]:[this.undefinedColor,i,r,1]}if("d"==n[0]&&n[1]in e&&(2==n.length||"("==n[2])){const t=n[1]?.toUpperCase();return t in e?[e.get(t),t,r,2]:[this.undefinedColor,i,r,2]}if(n.substring(0,3)in this.AAFullNames&&(3==n.length||"("==n[3])){const t=this.AAFullNames[n.substring(0,3)];return t in e?[e.get(t),t,r,3]:[this.undefinedColor,i,r,3]}if(n[0]?.toLowerCase()==n[0]&&n.substring(1,3)in this.AAFullNames&&(4==n.length||"("==n[4])){const t=this.AAFullNames[n.substring(1,3)];return t in e?[e.get(t),t,r,4]:[this.undefinedColor,i,r,4]}return[this.undefinedColor,i,r,0]}}a.SemType="Aminoacids",a.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",a.undefinedColor="rgb(100,100,100)",a.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},a.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},a.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},a.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"}},6584:(n,t,e)=>{"use strict";e.d(t,{BX:()=>a,nW:()=>o,tW:()=>f});var i=e(4469);const r="Libraries",a="System:AppData/Bio/monomer-libraries/";let s=Promise.resolve();async function o(){let n;return s=s.then((async()=>{const t=await i.dapi.userDataStorage.getValue(r,"Settings",!0);n=t?JSON.parse(t):{exclude:[],explicit:[]},n.exclude=n.exclude instanceof Array?n.exclude:[],n.explicit=n.explicit instanceof Array?n.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(n,void 0,2)}`)})),await s,n}async function f(n){s=s.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(n,void 0,2)}`),await i.dapi.userDataStorage.postValue(r,"Settings",JSON.stringify(n),!0)})),await s}},7228:(n,t,e)=>{"use strict";e.d(t,{GR:()=>b,JN:()=>h,Qx:()=>u,Xk:()=>d});var i=e(976),r=e(4469),a=e(1047),s=e(6286),o=(e(8260),e(8457)),f=e(5697);function d(n){const t=[];for(let e=0;e<n.rowCount;e++){const i={};Object.keys(a.K4).forEach((t=>{if("symbol"===t){const r=n.get(a.K4[t],e);i[t]="."===r?n.get(a.At,e):r}else if("rgroups"===t){const r=n.get(a.K4[t],e).split("\n"),s=[];r.forEach((n=>{const t={},e=n.substring(n.lastIndexOf("]")+1),i=n.match(/\[R(\d+)\]/)[1];t.capGroupSMILES="H"===e?`[*:${i}][H]`:`O[*:${i}]`,t.alternateId="H"===e?`R${i}-H`:`R${i}-OH`,t.capGroupName="H"===e?"H":"OH",t.label=`R${i}`,s.push(t)})),i[t]=s}else a.K4[t]&&(i[t]=n.get(a.K4[t],e))})),i.author??(i.author=""),i.id??(i.id=0),i.smiles??(i.smiles=""),i.monomerType??(i.monomerType="Backbone"),i.createDate??(i.createDate=null),t.push(i)}return t}async function h(){const n=i.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===n.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await n[0].prepare().call()).getOutputParamValue()}async function u(n,t){n instanceof i.Column&&(n=(0,o.O)(n).columns.toList());const e=(await h()).getBioLib(),a=new Array(n.length),f=n[0].length,d=new Float32Array(f);for(let o=0;o<n.length;++o){const h=t.getCanonical(o),u=e.getMonomer("PEPTIDE",h)?.smiles??"",c=n[o],b=c.getRawData(),l=c.categories,g=l.indexOf("");if(a[o]={categories:l,data:b,emptyIndex:g},void 0===h)continue;const D=i.Column.fromStrings("smiles",l.map((n=>e.getMonomer("PEPTIDE",n)?.smiles??""))),j=(i.DataFrame.fromColumns([D]),(await r.chem.getSimilarities(D,u)).getRawData());for(let n=0;n<f;++n){const t=b[n];d[n]+=h!==s.G2&&t!==g?j[t]:h===s.G2&&t===g?1:0}}for(let e=0;e<d.length;++e){let r=d[e]/t.length;for(let s=0;s<n.length;++s){const n=a[s];if(s>=t.length&&n.data[e]!==n.emptyIndex||n.data[e]===n.emptyIndex&&s<t.length){r=i.FLOAT_NULL;break}}d[e]=r}return i.Column.fromFloat32Array("Similarity",d)}async function c(n){const t=(await h()).getBioLib(),e=[],a={},s=n.map((n=>t.getMonomer("PEPTIDE",n)?.smiles??"")),o=i.Column.fromStrings("smiles",s);for(let t=0;t<s.length;++t){a[n[t]]=t;const i=s[t],f=""===i?new Array(s.length).fill(0):(await r.chem.getSimilarities(o,i)).getRawData();f[t]=1,e[t]=Array.from(f)}return{scoringMatrix:e,alphabetIndexes:a}}async function b(n,t="Morgan"){const e=(await h()).getBioLib(),r=new Array(n.length).fill(0).map((()=>new Array(n.length).fill(0))),a={},s=n.map((n=>e.getMonomer("PEPTIDE",n)?.smiles??"")),o=i.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!o)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await c(n);const d=i.Column.fromStrings("smiles",s),u=(i.DataFrame.fromColumns([d]),(await o.apply({col:d,fingerprintType:t}))?.entries);if(!u)return console.warn(`${t} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await c(n);for(let t=0;t<u.length;++t)if(r[t][t]=1,a[n[t]]=t,u[t])for(let n=t+1;n<u.length;++n)u[n]&&(r[t][n]=r[n][t]=(0,f.Z3)(u[t],u[n]));return{scoringMatrix:r,alphabetIndexes:a}}},8601:(n,t,e)=>{"use strict";e.d(t,{i0:()=>c});var i=e(4469),r=e(976),a=e(6414),s=e.n(a),o=e(1821),f=e(8260);const d={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:"d",RIBOSE:"r",PHOSPHATE:"p",OXYGEN:"O",HYDROGEN:"H"};var h=e(1047);function u(n){return Math.round(d.PRECISION_FACTOR*n)/d.PRECISION_FACTOR}async function c(n,t,a){if(0===r.Func.find({package:"Chem",name:"getRdKitModule"}).length)return{col:null,warnings:['Transformation to atomic level requires the package "Chem" installed.']};if(t.semType!==r.SEMTYPE.MACROMOLECULE)return{col:null,warnings:[`Only the ${r.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${t.semType}'`]};let u=t;const c=f.g.forColumn(t);c.isHelm()&&(u=c.convert(o.r2.SEPARATOR,"."),u.name=t.name);const l=f.g.forColumn(u).alphabet;let g;if("PT"===l||"UN"===l)g="PEPTIDE";else{if("RNA"!==l&&"DNA"!==l)return{col:null,warnings:[`Unexpected column's '${u.name}' alphabet '${l}'.`]};g="RNA"}const D=function(n){const t=n.length,e=new Array(t),r=f.g.forColumn(n);let a=!1;for(let n=0;n<t;++n){const t=r.getSplitted(n);a||(a=0===t.length),e[n]=s()(t.canonicals).filter((n=>!r.isGap(n))).map((n=>n)).toArray()}return a&&i.shell.warning(`Some values in the "${n.name}" column are empty`),e}(u),j=await async function(n,t,e,r){const a=function(n,t,e){const i=new Map;for(const r of n.getMonomerSymbolsByType(t)){const a=n.getMonomer(t,r);if("RNA"===t&&("Branch"===a.monomerType||"DNA"===e&&a.symbol===d.DEOXYRIBOSE||"RNA"===e&&a.symbol===d.RIBOSE||a.symbol===d.PHOSPHATE)||"PEPTIDE"===t&&"Branch"!==a.monomerType){const n={};h.rx.forEach((t=>{n[t]=a[t]})),i.set(a.symbol,n)}}return i}(t,e,r),s=new Map,o=await i.functions.call("Chem:getRdKitModule"),f={value:null};if("RNA"===e){const n="RNA"===r?[d.RIBOSE,d.PHOSPHATE]:[d.DEOXYRIBOSE,d.PHOSPHATE];for(const t of n)b(s,t,a,o,e,f)}for(let t=0;t<n.length;++t){const i=n[t];for(const n of i)if(""!==n)try{b(s,n,a,o,e,f)}catch(t){const e=t instanceof Error?t.message:t.toString(),i=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${n}', error:\n${e}\n${i}`),new Error(`Can't get monomer '${n}' from library: ${e}`)}}return s}(D,a,g,l),H=u.length,{molfileList:A,molfileWarningList:p}=await async function(n,t,i,r,a){const s=Math.max(navigator.hardwareConcurrency-2,1),o=new Array(s).fill(null).map((()=>new Worker(new URL(e.p+e.u(79),e.b)))),f=a/s;let d=[],h=[];const u=new Array(s);for(let e=0;e<s;e++){const d=Math.floor(e*f),h=e===s-1?a:Math.floor((e+1)*f);o[e].postMessage({monomerSequencesArray:n,monomersDict:t,alphabet:i,polymerType:r,start:d,end:h}),u[e]=new Promise((n=>{o[e].onmessage=({data:{molfileList:t,molfileWarningList:e}})=>{n({molfileList:t,molfileWarningList:e})}}))}return(await Promise.all(u)).forEach((n=>{d=d.concat(...n.molfileList),h=h.concat(...n.molfileWarningList)})),setTimeout((()=>{o.forEach((n=>{n.terminate()}))}),0),{molfileList:d,molfileWarningList:h}}(D,j,l,g,H);if(p.length>.05*H)throw new Error("Too many errors getting molfiles.");const I=`molfile(${u.name})`,M=n.columns.getUnusedName(I),T=r.Column.fromStrings(M,A);return T.semType=r.SEMTYPE.MOLECULE,T.setTag(r.TAGS.UNITS,r.UNITS.Molecule.MOLBLOCK),{col:T,warnings:p}}function b(n,t,e,i,r,a){if(!n.has(t)){const s=function(n,t,e,i,r){if(t.has(n)){const s=t.get(n),o=function(n){const t=[];for(const e of n){let n=e.capGroupSMILES;n||(n=e.capGroupSMILES),n=n.replace(/(\[|\]|\*|:|\d)/g,""),t.push(n)}return t}(s.rgroups),f=(a=s.molfile).includes("V3000")?function(n){const t=new Map,e=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let i;for(;null!==(i=e.exec(n));)i.index===e.lastIndex&&e.lastIndex++,t.set(parseInt(i[1]),parseInt(i[3]));return t}(a):function(n){const t=new Map;let e=n.indexOf(d.V2K_A_LINE,0),i=e;for(;-1!==e;){i=n.indexOf("\n",e);const r=parseInt(n.substring(e,i).replace(/^A\s+/,""));e=n.indexOf("R",i),i=n.indexOf("\n",e);const a=parseInt(n.substring(e,i).replace(/^R/,""));t.set(r,a),e=n.indexOf(d.V2K_A_LINE,i)}for(e=n.indexOf(d.V2K_RGP_LINE,0),i=n.indexOf("\n",e);-1!==e;){e+=d.V2K_RGP_SHIFT,i=n.indexOf("\n",e);const r=n.substring(e,i).replaceAll(/\s+/g," ").split(" ").map((n=>parseInt(n))).slice(1);for(let n=0;n<r.length;n+=2){if(t.has(r[n])&&t.get(r[n])!==r[n+1])throw new Error(`r-group index ${r[n]} has already been added with a different value`);t.set(r[n],r[n+1])}e=n.indexOf(d.V2K_RGP_LINE,i)}return t}(a),h=s.molfile.includes("V3000")?s.molfile:function(n,t){const e=t.get_mol(n),i=e.get_v3Kmolblock();return e.delete(),i}(function(n){let t=n.indexOf(d.V2K_A_LINE,0);-1===t&&(t=n.indexOf(d.V2K_RGP_LINE));const e=n.indexOf(d.V3K_END,t);return n.substring(0,t)+n.substring(e)}(s.molfile),e),c=function(n){let t=(n=n.replaceAll("\r","")).indexOf(d.V3K_BEGIN_COUNTS_LINE)+d.V3K_COUNTS_SHIFT,e=n.indexOf(" ",t+1);const i=parseInt(n.substring(t,e));return t=e+1,e=n.indexOf(" ",t+1),{atomCount:i,bondCount:parseInt(n.substring(t,e))}}(h),b=function(n,t){const e=new Array(t),i=new Float32Array(t),r=new Float32Array(t),a=new Array(t);let s=n.indexOf(d.V3K_BEGIN_ATOM_BLOCK);s=n.indexOf("\n",s);let o=s;for(let f=0;f<t;f++){s=n.indexOf(d.V3K_BEGIN_DATA_LINE,s)+d.V3K_IDX_SHIFT,o=n.indexOf(" ",s),s=o+1,o=n.indexOf(" ",s),e[f]=n.substring(s,o);const t=new Array(2);for(let e=0;e<2;++e)s=o+1,o=n.indexOf(" ",s),t[e]=parseFloat(n.substring(s,o));i[f]=t[0],r[f]=t[1],s=o,o=n.indexOf("\n",s)+1,a[f]=n.slice(s,o),s=o}return{atomTypes:e,x:i,y:r,kwargs:a}}(h,c.atomCount),D=function(n,t){const e=new Uint32Array(t),i=new Array(t),r=new Map,a=new Map;let s=n.indexOf(d.V3K_BEGIN_BOND_BLOCK);s=n.indexOf("\n",s);let o=s;for(let f=0;f<t;++f){const t=new Array(3);s=n.indexOf(d.V3K_BEGIN_DATA_LINE,o)+d.V3K_IDX_SHIFT,o=n.indexOf(" ",s);for(let e=0;e<3;++e)s=o+1,o=Math.min(n.indexOf("\n",s),n.indexOf(" ",s)),t[e]=parseInt(n.slice(s,o));e[f]=t[0],i[f]=t.slice(1);const h=n.indexOf("\n",s);let u=n.slice(o,h),c=u.indexOf(d.V3K_BOND_CONFIG);if(-1!==c){c=u.indexOf("=",c)+1;let n=u.indexOf(" ",c);-1===n&&(n=u.length);const t=parseInt(u.slice(c,n));r.set(f,t);const e=d.V3K_BOND_CONFIG+t.toString();u=u.replace(e,"")}u||a.set(f,u)}return{bondTypes:e,atomPairs:i,bondConfiguration:r,kwargs:a}}(h,c.bondCount),H=function(n,t,e,i){const r={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};return function(n,t,e){for(const[i,r]of e)n.atomTypes[i-1]=t[r-1]}(n,e,i),function(n,t){t.rNodes=Array.from(n.keys());for(let e=0;e<t.rNodes.length;e++)for(const i of[1,2])if(n.get(t.rNodes[e])===i){const n=t.rNodes[i-1];t.rNodes[i-1]=t.rNodes[e],t.rNodes[e]=n}}(i,r),l(t,r),r}(b,D,o,f),T=function(n){let t=[],e=n.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==e;){e+=28;const i=n.indexOf(")",e);t=t.concat(n.substring(e,i).split(" ").slice(1).map((n=>parseInt(n)))),e=i,e=n.indexOf("M V30 MDLV30/STEABS ATOMS=(",e)}return t}(h),m={atoms:b,bonds:D,meta:H,stereoAtoms:T};return"PEPTIDE"===i?function(n){const t=n.meta.terminalNodes[0]-1,e=n.meta.rNodes[0]-1,i=n.atoms.x,r=n.atoms.y;M(n,-i[t],-r[t]);const a=A(i[e],r[e]);p(n.atoms,-a),i[n.meta.rNodes[1]-1]<0&&function(n){I(n,!1)}(n);const s=function(n){const t=function(n){const t=new Map;for(const e of n.bonds.atomPairs)for(let n=0;n<2;n++){const i=e[n],r=e[(n+1)%2];t.has(i)?t.get(i)?.push(r):t.set(i,new Array(1).fill(r))}return t}(n);let e=0;const i=n.atoms.atomTypes.length;let r=0;for(;0===e;){const a=t.get(n.meta.terminalNodes[1])[r];if(n.atoms.atomTypes[a-1]===d.OXYGEN&&a!==n.meta.rNodes[1]&&(e=a),r++,r>i)throw new Error(`Search for double-bonded Oxygen in ${n} has exceeded the limit of ${i}`)}return e}(n);!function(n,t){n.atoms.y[n.meta.rNodes[1]-1]<0&&n.atoms.y[t-1]<0&&(function(n){I(n,!0)}(n),p(n.atoms,-function(n,t){return A(n,t)+Math.PI/2}(n.atoms.x[n.meta.terminalNodes[1]-1],n.atoms.y[n.meta.terminalNodes[1]-1])))}(n,s),function(n,t){const e=n.atoms.x;e[n.meta.rNodes[1]-1]>e[t-1]&&function(n,t,e){const i=t-1,r=e-1,a=n.atoms.x,s=n.atoms.y,o=a[i],f=s[i];a[i]=a[r],s[i]=s[r],a[r]=o,s[r]=f}(n,t,n.meta.rNodes[1])}(n,s)}(m):n===d.RIBOSE||n===d.DEOXYRIBOSE?function(n,t){const e=n.atoms.x,i=n.atoms.y;let r=n.meta.terminalNodes[0]-1;const a=n.meta.rNodes[1]-1;M(n,-e[r],-i[r]);const s=A(e[a],i[a]);p(n.atoms,3*Math.PI/2-s),t.value=function(n){const t=n.atoms.x,e=n.atoms.y,i=n.meta.rNodes[2]-1,r=n.meta.terminalNodes[2]-1,a=t[i]-t[r],s=e[i]-e[r];return Math.atan(s/a)+Math.PI/2}(n),r=n.meta.terminalNodes[0]-1,M(n,-e[r],-i[r])}(m,r):n===d.PHOSPHATE?function(n){const t=n.meta.terminalNodes[0]-1,e=n.meta.rNodes[0]-1,i=n.atoms.x,r=n.atoms.y;M(n,-i[t],-r[t]);const a=A(i[e],r[e]);p(n.atoms,Math.PI/2-a)}(m):function(n,t){const e=n.atoms.x,i=n.atoms.y,r=n.meta.terminalNodes[0]-1,a=n.meta.rNodes[0]-1;M(n,-e[r],-i[r]);const s=A(e[a],i[a]),o=t.value;if(!o)throw new Error("The value of sugarBranchToOYAngle is null");p(n.atoms,Math.PI-s+o);const f=function(n,t){return u(Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2))}({x:e[n.meta.rNodes[0]-1],y:i[n.meta.rNodes[0]-1]},{x:e[n.meta.terminalNodes[0]-1],y:i[n.meta.terminalNodes[0]-1]});if(1!=f)for(let n=0;n<e.length;++n)e[n]=u(e[n]/f),i[n]=u(i[n]/f)}(m,r),function(n,t,e){"PEPTIDE"===n?(g(t,n),j(t,t.meta.rNodes[1])):e===d.RIBOSE||e===d.DEOXYRIBOSE?(j(t,t.meta.rNodes[1]),t.meta.rNodes[1]=t.meta.terminalNodes[1],l(t.bonds,t.meta),g(t,n),j(t,t.meta.rNodes[1]),j(t,t.meta.rNodes[0]),j(t,t.meta.rNodes[2])):e===d.PHOSPHATE&&(t.meta.terminalNodes[0]=t.meta.rNodes[0],M(t,-t.atoms.x[t.meta.terminalNodes[0]-1],-t.atoms.y[t.meta.terminalNodes[0]-1]),g(t,n),j(t,t.meta.rNodes[1]))}(i,m,n),function(n){let t=0;for(;t<n.atoms.atomTypes.length;)n.atoms.atomTypes[t]===d.HYDROGEN&&(j(n,t+1),--t),++t}(m),m}var a;return null}(t,e,i,r,a);if(!s)throw new Error(`Monomer with symbol '${t}' is absent the monomer library`);n.set(t,s)}}function l(n,t){const e=t.rNodes;t.terminalNodes=new Array(e.length).fill(0);const i=t.terminalNodes,r=n.atomPairs;let a=0,s=0;for(;a<r.length&&s<i.length;){for(let n=0;n<i.length;++n)for(let t=0;t<2;++t)r[a][t]===e[n]&&(i[n]=r[a][(t+1)%2],e.length,++s);++a}}function g(n,t){n.meta.rNodes.length>1&&(n.meta.backboneShift=D(n,n.meta.rNodes[1]-1,n.meta.terminalNodes[0]-1)),"RNA"===t&&n.meta.rNodes.length>2&&(n.meta.branchShift=D(n,n.meta.rNodes[2]-1,n.meta.terminalNodes[0]-1))}function D(n,t,e){return[u(n.atoms.x[t]-n.atoms.x[e]),u(n.atoms.y[t]-n.atoms.y[e])]}function j(n,t){if(void 0!==t){const e=t-1,i=n.atoms,r=n.bonds,a=n.meta;i.atomTypes.splice(e,1),i.x=H(Float32Array,i.x,e,1),i.y=H(Float32Array,i.y,e,1),i.kwargs.splice(e,1);for(let n=0;n<a.terminalNodes.length;++n)a.terminalNodes[n]>t?--a.terminalNodes[n]:a.terminalNodes[n]===t&&(a.terminalNodes[n]=-1);for(let n=0;n<a.rNodes.length;++n)a.rNodes[n]>t?--a.rNodes[n]:a.rNodes[n]===t&&(a.rNodes[n]=-1);let s=0;for(;s<r.atomPairs.length;){const n=r.atomPairs[s][0],e=r.atomPairs[s][1];n===t||e===t?(r.atomPairs.splice(s,1),r.bondTypes=H(Uint32Array,r.bondTypes,s,1),r.bondConfiguration.has(s)&&r.bondConfiguration.delete(s),r.kwargs.has(s)&&r.kwargs.delete(s),--s):(r.atomPairs[s][0]=n>t?n-1:n,r.atomPairs[s][1]=e>t?e-1:e),++s}let o=Array.from(r.bondConfiguration.keys());o.forEach((n=>{if(r.bondConfiguration.has(n)&&n>e){const t=r.bondConfiguration.get(n);r.bondConfiguration.delete(n),r.bondConfiguration.set(n-1,t)}})),o=Array.from(r.kwargs.keys()),o.forEach((n=>{if(r.kwargs.has(n)&&n>e){const t=r.kwargs.get(n);r.kwargs.delete(n),r.kwargs.set(n-1,t)}}))}}function H(n,t,e,i){const r=new n(t.length-i);let a=0,s=0;for(;a<t.length;)a===e&&(a+=i),r[s]=t[a],++s,++a;return r}function A(n,t){let e;if(0===n)e=t>0?0:Math.PI;else if(0===t)e=n>0?-Math.PI/2:Math.PI/2;else{const i=t/n,r=Math.atan(i);e=n<0?Math.PI/2+r:-Math.PI/2+r}return e}function p(n,t){if(0!==t){const e=n.x,i=n.y,r=Math.cos(t),a=Math.sin(t);for(let n=0;n<e.length;++n){const t=e[n];e[n]=u(t*r-i[n]*a),i[n]=u(t*a+i[n]*r)}}}function I(n,t){if(t){const t=n.atoms.y;for(let n=0;n<t.length;n++)t[n]=-t[n]}else{const t=n.atoms.x;for(let n=0;n<t.length;n++)t[n]=-t[n]}const e=n.bonds.bondConfiguration;for(const[n,t]of e){const i=1===t?3:1;e.set(n,i)}}function M(n,t,e){const i=n.atoms.x,r=n.atoms.y;for(let n=0;n<i.length;++n)i[n]=u(i[n]+t),void 0!==e&&(r[n]=u(r[n]+e))}},6137:(n,t,e)=>{"use strict";e.d(t,{J:()=>r});var i=e(9976);class r extends i.B{static get Chromatogram(){return void 0===this.chromatogram&&(this.chromatogram=new r({A:"green",C:"blue",G:"black",T:"red",U:"red",others:"gray"})),this.chromatogram}}class a{}a.SemType="Nucleotides",a.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",a.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},9976:(n,t,e)=>{"use strict";e.d(t,{B:()=>i});class i{static makePalette(n,t=!1,e=i){const r={};return n.forEach((n=>{const e=n[0],i=n[1];e.forEach(((n,e)=>{r[n]=this.colourPalette[i][t?0:e]}))})),new e(r)}constructor(n){this._palette=n}get(n){return this._palette[n]}}i.undefinedColor="rgb(100,100,100)",i.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]}},7331:(n,t,e)=>{"use strict";e.d(t,{UE:()=>d});var i=e(976),r=e(9976);class a{static hashCode(n){let t=0;if(0===n.length)return t;for(let e=0;e<n.length;e++)t=(t<<5)-t+n.charCodeAt(e),t|=0;return t}}class s{}class o extends s{get(n){return"#666666"}}class f extends s{static buildPalette(){return[].concat(...Object.values(r.B.colourPalette))}get(n){const t=a.hashCode(n)%f.palette.length;return function(n){if(null==n)return"rgb(100,100,100)";const t=i.Color.fromHtml(n),e=i.Color.g(t),r=i.Color.r(t),a=i.Color.b(t),s=Math.sqrt(Math.pow(0-r,2)+Math.pow(0-e,2)+Math.pow(0-a,2));return s>210?`rgb(${r/s*210},${e/s*210},${a/s*210})`:i.Color.toRgb(t)}(f.palette[t])}}f.palette=f.buildPalette();class d extends r.B{static get Gray(){return void 0===this.gray&&(this.gray=new o),this.gray}static get Color(){return void 0===this.color&&(this.color=new f),this.color}}},9611:(n,t,e)=>{"use strict";e.d(t,{A:()=>d});var i=e(4469),r=e(976),a=e(6414),s=e.n(a),o=e(8260);const f={DNA:"RNA",RNA:"RNA",PT:"PEPTIDE",UN:"PEPTIDE"};class d{get updated(){return this._updated}constructor(n,t,e){this.grid=n,this.col=t,this.propsProvider=e,this._monomerLengthList=null,this.separatorWidth=5,this._updated=!1,this._monomerLengthMap={},this._monomerStructureMap={},this.subs=[],this.props=this.propsProvider(),this._rowsProcessed=r.BitSet.create(this.col.length),this.grid&&(this.subs.push(t.dataFrame.onDataChanged.subscribe((()=>{try{this.props=this.propsProvider(),this._monomerLengthList=null,this._rowsProcessed=r.BitSet.create(this.col.length)}catch(n){console.error(n)}}))),this.subs.push(i.events.onViewRemoved.subscribe((n=>{try{this.grid?.view?.id===n.id&&this.destroy()}catch(n){console.error(n)}}))))}destroy(){for(const n of this.subs)n.unsubscribe()}getCellMonomerLengths(n){const t=this.props.seqHandler.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(n),e=new Array(t.length+1);e[0]=5;for(let n=1;n<e.length;n++)e[n]=e[n-1]+t[n-1];return[t,e]}getCellMonomerLengthsForSeq(n){null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.col.length).fill(null),this._updated=!0);let t=this._monomerLengthList[n];if(null===t){const e=o.g.forColumn(this.col).getSplitted(n).originals;t=this._monomerLengthList[n]=new Array(e.length);for(const[n,i]of s().enumerate(e)){const e=this.props.monomerToShort(n,this.props.monomerLengthLimit),r=(this.props.seqHandler.isSeparator()?this.separatorWidth:this.props.separatorWidth)+e.length*this.props.monomerCharWidth;t[i]=r}this._updated=!0}return t}getCellMonomerLengthsForSeqMsa(){var n;null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null),this._updated=!0),(n=this._monomerLengthList)[0]??(n[0]=new Array(0));const t=this._monomerLengthList[0],{startIdx:e,endIdx:i}=(()=>{try{return this.grid&&this.grid.dart?{startIdx:Math.max(Math.floor((this.grid?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((this.grid?.vertScroll.max??0)+10),this.col.length)}:{startIdx:0,endIdx:Math.min(this.col.length,10)}}catch(n){return{startIdx:0,endIdx:Math.min(this.col.length,10)}}})();for(let n=e;n<i;n++){if(this._rowsProcessed.get(n))continue;const e=o.g.forColumn(this.col).getSplitted(n).originals;e.length>t.length&&t.push(...new Array(e.length-t.length).fill(0));for(const[n,i]of s().enumerate(e)){const e=this.props.monomerToShort(n,this.props.monomerLengthLimit),r=this.props.separatorWidth+e.length*this.props.monomerCharWidth;t[i]=Math.max(t[i]??0,r)}this._updated=!0}return t}getPosition(n,t){const[e,i]=this.getCellMonomerLengths(n),r=o.g.forColumn(this.col),a=s()(r.getSplitted(n).originals).toArray();if(0===a.length)return null;let f=100,d=null,h=a.length,u=!1,c=0;if(i[0]<=t&&t<i.slice(-1)[0])for(;!u;)if(c=Math.floor((h+(d??0))/2),t>=i[c]&&t<=i[c+1]?(d=c,u=!0):t<i[c]?h=c-1:t>i[c+1]&&(d=c+1),d==h&&(u=!0),--f<=0)throw new Error(`Get position for pointer x = ${t} searching has not converged on ${JSON.stringify(i)}. `);return d}getMonomer(n){const t=this.props.seqHandler.alphabet??"UN",e=f[t];return this.props.monomerLib?.getMonomer(e,n)??null}setMonomerLengthLimit(n){this.props.monomerLengthLimit=n,this._updated=!0}setSeparatorWidth(n){this.props.separatorWidth=n,this._updated=!0}isMsa(){return this.props.seqHandler.isMsa()}}},1047:(n,t,e)=>{"use strict";e.d(t,{$3:()=>o,At:()=>r,K4:()=>a,Z2:()=>s,pU:()=>f,rx:()=>i});const i=["symbol","molfile","rgroups","name"],r="MonomerName",a={monomerType:null,smiles:null,name:"Name",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerName"},s={monomerType:"Backbone",smiles:"",name:"",author:"Datagrok",molfile:"",naturalAnalog:"",rgroups:[],createDate:null,id:0,polymerType:"PEPTIDE",symbol:""},o="p",f=new RegExp(`[rd]\\((\\w)\\)${o}?`,"g")},7945:(n,t,e)=>{"use strict";function i(n){return"string"==typeof n||n instanceof String?n:"StateError"===n.constructor.name?n.message:"StateError"===n.constructor.name&&"$thrownJsError"in n?i(n.$thrownJsError):n instanceof Error?n.message:n.toString()}function r(n){return n instanceof Error?n.stack:"StateError"===n.constructor.name&&"$thrownJsError"in n?r(n.$thrownJsError):void 0}function a(n){return[i(n),r(n)]}e.d(t,{yf:()=>a})},5226:(n,t,e)=>{"use strict";e.d(t,{i:()=>s});var i=e(976),r=e(8260),a=e(1821);class s{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(n,t){return this._fileContent.slice(n,t).split(/\s/).join("")}parseColumns(){const n=/^>(.*)$/gm;let t,e=0;for(;t=n.exec(this._fileContent);){const i=this._fileContent.substring(t.index+1,n.lastIndex);this._descriptionsArray.push(i),0!==e&&this._sequencesArray.push(this.parseMacromolecule(e,t.index)),e=n.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(e,-1))}importFasta(){const n=i.Column.fromStrings("description",this.descriptionsArray),t=i.Column.fromStrings("sequence",this.sequencesArray);return t.semType=i.SEMTYPE.MACROMOLECULE,t.setTag(i.TAGS.UNITS,a.r2.FASTA),r.g.forColumn(t),[i.DataFrame.fromColumns([n,t])]}constructor(n){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=n,this.parseColumns()}}},1821:(n,t,e)=>{"use strict";e.d(t,{BM:()=>s,CI:()=>a,XS:()=>f,r2:()=>i});var i,r=e(6286);!function(n){n.FASTA="fasta",n.SEPARATOR="separator",n.HELM="helm"}(i||(i={}));const a=", ",s=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,o=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}},f=[new r.LA("PT",o.fasta.peptide,.5),new r.LA("DNA",o.fasta.dna,.55),new r.LA("RNA",o.fasta.rna,.55)]},8447:(n,t,e)=>{"use strict";e.d(t,{Ar:()=>r.Ar,CI:()=>i.CI,GU:()=>r.GU,XS:()=>i.XS,dQ:()=>r.dQ,gP:()=>r.gP,kB:()=>r.kB,py:()=>r.py,r2:()=>i.r2,up:()=>r.up});var i=e(1821),r=e(2583)},6286:(n,t,e)=>{"use strict";e.d(t,{G2:()=>i,LA:()=>r,dJ:()=>a});const i="";class r{constructor(n,t,e){this.name=n,this.alphabet=t,this.cutoff=e}}class a extends r{constructor(n,t,e){super(n.name,n.alphabet,n.cutoff),this.freq=t,this.similarity=e}}},2583:(n,t,e)=>{"use strict";e.d(t,{wx:()=>l,w4:()=>J,py:()=>N,vU:()=>M,Ar:()=>H,GU:()=>m,dQ:()=>P,up:()=>w,kB:()=>D,FJ:()=>j,gP:()=>I});var i=e(976),r=e(6414),a=e.n(r),s=e(6286),o=e(1821),f=e(8260);class d extends Float32Array{}var h=e(850),u=e(2012),c=e(6137),b=e(7331);class l{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(n){return this.getOriginal(n)===this.gapOriginalMonomer}getCanonical(n){if(this.length<=n)throw new Error("Index out of bounds");return this.mList[n]}getOriginal(n){if(this.length<=n)throw new Error("Index out of bounds");return this.mList[n]}constructor(n,t){this.mList=n,this.gapOriginalMonomer=t}}class g{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(n){return this.getOriginal(n)===f.lh[o.r2.FASTA]}getCanonical(n){if(this.length<=n)throw new Error("Index out of bounds");return this.isGap(n)?s.G2:this.seqS[n]}getOriginal(n){if(this.length<=n)throw new Error("Index out of bounds");return this.seqS[n]}constructor(n){this.seqS=n}}const D=n=>{const t=a()(n.toString().matchAll(o.BM)).map((n=>n[2]??n[1])).toArray();return new l(t,f.lh[o.r2.FASTA])},j=n=>n?new g(n):new l([],f.lh[o.r2.FASTA]);function H(n,t=undefined){return e=>{if(e){const i=e.replaceAll('"-"',"").replaceAll("'-'","").split(n,t);return new l(i,f.lh[o.r2.SEPARATOR])}return new l([],f.lh[o.r2.SEPARATOR])}}const A=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,p=/\[([^\[\]]+)]/g,I=n=>{A.lastIndex=0;const t=A.exec(n.toString()),e=t?t[2]:null,i=e?e.split("."):[];return new l(i.map((n=>{p.lastIndex=0;const t=p.exec(n);return t&&t.length>=2?t[1]:n})),f.lh[o.r2.HELM])};function M(n,t,e=undefined){if(n.toLowerCase().startsWith(o.r2.FASTA))return D;if(n.toLowerCase().startsWith(o.r2.SEPARATOR))return H(t,e);if(n.toLowerCase().startsWith(o.r2.HELM))return I;throw new Error(`Unexpected units ${n} .`)}const T=/([^\W_]+)/g;function m(n,t){if(n.length<=t)return n;const e=n.match(T),i=n.length>t||(e?.length??0)>1,r=e?.[0]??" ";return i?r.substring(0,t-1)+"…":r}function J(n,t,e="-"){const i=t.map((t=>{const i=function(n,t,e="-"){const i=new Set([...new Set(Object.keys(n)),...t]);i.delete(e);const r=[],a=[];for(const e of i)r.push(e in n?n[e]:0),a.push(t.has(e)?1:0);const s=new d(r),o=new d(a);return(0,h.MA)(s,o)/((0,h.$G)(s)*(0,h.$G)(o))}(n,t.alphabet,e);return new s.dJ(t,n,i)}));let r;const a=Math.max(...i.map((n=>n.similarity>n.cutoff?n.similarity:-1)));return r=a>0?i.find((n=>n.similarity===a)).name:"UN",r}function P(n,t=5){let e;if(n.semType==i.SEMTYPE.MACROMOLECULE)e=f.g.forColumn(n).alphabet;else{const i=function(n,t,e){const i=n.categories;return function(n,t){const e={};let i=!0,r=null;for(const a of n)if(null==r?r=a.length:a.length!==r&&(i=!1),a.length>=t)for(const n of a.canonicals)n in e||(e[n]=0),e[n]+=1;return{freq:e,sameLength:i}}(a().enumerate(n.getRawData()).map((([n,t])=>e(i[n]))),t)}(n,t,D);e=J(i.freq,o.XS)}return N(e)}function N(n){switch(n){case"PT":return u.f.GrokGroups;case"DNA":case"RNA":return c.J.Chromatogram;default:return b.UE.Color}}function w(n){const t=n.columns.bySemTypeAll(i.SEMTYPE.MACROMOLECULE);let e=t.find((n=>{const t=n.getTag(i.TAGS.UNITS);return!!t&&-1!==t.indexOf("MSA")}))??null;return!e&&t.length>0&&(e=t[0]),e}},8260:(n,t,e)=>{"use strict";e.d(t,{dm:()=>c,g:()=>l,lh:()=>b});var i=e(976),r=e(6414),a=e.n(r),s=e(8447),o=e(6286),f=e(2583),d=e(708),h=e(7228),u=e(1047);const c=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},b={[s.r2.FASTA]:"-",[s.r2.SEPARATOR]:"",[s.r2.HELM]:"*"};class l{constructor(n){if(this._splitter=null,this.cached=!0,this._splitted=null,this.columnVersion=null,this._stats=null,this._maxLength=null,this._posList=null,this._joiner=void 0,n.type!==i.TYPE.STRING)throw new Error(`Unexpected column type '${n.type}', must be '${i.TYPE.STRING}'.`);this._column=n;const t=this._column.getTag(i.TAGS.UNITS);if(null==t)throw new Error("Units are not specified in column");if(this._units=t,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?b[s.r2.FASTA]:this.isHelm()?b[s.r2.HELM]:b[s.r2.SEPARATOR],!this.column.tags.has("aligned")||!this.column.tags.has("alphabet")||!this.column.tags.has(".alphabetIsMultichar")&&!this.isHelm()&&"UN"===this.alphabet)if(this.isFasta())l.setUnitsToFastaColumn(this);else if(this.isSeparator()){const t=n.getTag("separator");l.setUnitsToSeparatorColumn(this,t)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(i.TAGS.UNITS)}'.`);l.setUnitsToHelmColumn(this)}if(!this.column.tags.has(".alphabetIsMultichar"))if(this.isHelm())this.column.setTag(".alphabetIsMultichar","true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '.alphabetIsMultichar' is mandatory.`);this.notationProvider=this.column.temp[c.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(n){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE||n.column.getTag(i.TAGS.UNITS)!==s.r2.FASTA)throw new Error(`The column of notation '${s.r2.FASTA}' must be '${i.SEMTYPE.MACROMOLECULE}'.`);n.column.setTag(i.TAGS.UNITS,s.r2.FASTA),l.setTags(n)}static setUnitsToSeparatorColumn(n,t){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE||n.column.getTag(i.TAGS.UNITS)!==s.r2.SEPARATOR)throw new Error(`The column of notation '${s.r2.SEPARATOR}' must be '${i.SEMTYPE.MACROMOLECULE}'.`);if(!t)throw new Error(`The column of notation '${s.r2.SEPARATOR}' must have the separator tag.`);n.column.setTag(i.TAGS.UNITS,s.r2.SEPARATOR),n.column.setTag("separator",t),l.setTags(n)}static setUnitsToHelmColumn(n){if(n.column.semType!==i.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${s.r2.HELM}' must be '${i.SEMTYPE.MACROMOLECULE}'`);n.column.setTag(i.TAGS.UNITS,s.r2.HELM),l.setTags(n)}static setTags(n){const t=n.column.getTag(i.TAGS.UNITS),e=n.stats;if(Object.keys(e.freq).some((n=>n.length>1)),[s.r2.FASTA,s.r2.SEPARATOR].includes(t)){if(!n.column.getTag("alphabet")&&0===Object.keys(e.freq).length)throw new Error("Alphabet is empty and not annotated.");let t=n.column.getTag("aligned");null===t&&(t=e.sameLength?"SEQ.MSA":"SEQ",n.column.setTag("aligned",t));let i=n.column.getTag("alphabet");if(null===i&&(i=(0,f.w4)(e.freq,s.XS),n.column.setTag("alphabet",i)),"UN"===i){const t=Object.keys(e.freq).length,i=Object.keys(e.freq).some((n=>n.length>1));n.column.setTag(".alphabetSize",t.toString()),n.column.setTag(".alphabetIsMultichar",i?"true":"false")}}}get column(){return this._column}get length(){return this._column.length}get units(){return this._units}get notation(){return this._notation}get defaultGapOriginal(){return this._defaultGapOriginal}get separator(){const n=this.column.getTag("separator")??void 0;if(this.notation===s.r2.SEPARATOR&&void 0===n)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return n}get aligned(){const n=this.column.getTag("aligned");if(!n&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return n}get alphabet(){const n=this.column.getTag("alphabet");if(!n&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return n}get helmCompatible(){return this.column.getTag(".isHelmCompatible")}getAlphabetSize(){if(this.notation==s.r2.HELM||"UN"==this.alphabet){const n=this.column.getTag(".alphabetSize");let t;if(n)t=parseInt(n);else{const n=this.stats;t=Object.keys(n.freq).length}return t}switch(this.alphabet){case"PT":return 20;case"DNA":case"RNA":return 4;case"NT":return console.warn("Unexpected alphabet 'NT'."),4;default:throw new Error(`Unexpected alphabet '${this.alphabet}'.`)}}getAlphabetIsMultichar(){return this.notation===s.r2.HELM||"UN"===this.alphabet&&"true"===this.column.getTag(".alphabetIsMultichar")}getSplitted(n){if(this.cached){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let t=this._splitted[n]?this._splitted[n].deref():void 0;if(!t){const e=this.column.get(n);t=this.splitter(e),this._splitted[n]=new WeakRef(t)}return t}{const t=this.column.get(n);return this.splitter(t)}}get stats(){if(null===this._stats){const n={};let t=!0,e=null;const i=this.column.length;for(let r=0;r<i;++r){const i=this.getSplitted(r);null==e?e=i.length:i.length!==e&&(t=!1);for(const t of i.canonicals)t in n||(n[t]=0),n[t]+=1}this._stats={freq:n,sameLength:t}}return this._stats}get maxLength(){return null===this._maxLength&&(this._maxLength=0===this.column.length?0:Math.max(...a().count(0).take(this.column.length).map((n=>this.getSplitted(n).length)))),this._maxLength}get posList(){if(null===this._posList){const n=this.column.getTag(".positionNames");this._posList=n?n.split(s.CI).map((n=>n.trim())):a().count(1).take(this.maxLength).map((n=>n.toString())).toArray()}return this._posList}isFasta(){return this.notation===s.r2.FASTA}isSeparator(){return this.notation===s.r2.SEPARATOR}isHelm(){return this.notation===s.r2.HELM}isRna(){return"RNA"===this.alphabet}isDna(){return"DNA"===this.alphabet}isPeptide(){return"PT"===this.alphabet}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(n){return!n||n===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(s.r2.FASTA))return s.r2.FASTA;if(this.units.toLowerCase().startsWith(s.r2.SEPARATOR))return s.r2.SEPARATOR;if(this.units.toLowerCase().startsWith(s.r2.HELM))return s.r2.HELM;throw new Error(`Column '${this.column.name}' has unexpected notation '${this.units}'.`)}getHelmWrappers(){return[this.isDna()||this.isRna()||this.isHelmCompatible()?"RNA1{":"PEPTIDE1{",this.isDna()?"d(":this.isRna()?"r(":"",this.isDna()||this.isRna()?")p":"","}$$$$"]}getNewColumn(n,t,e,r){const a=this.column,o=n.toLowerCase()+"("+a.name+")",f=e??a.dataFrame.columns.getUnusedName(o),d=i.Column.fromList("string",f,r??new Array(this.column.length).fill(""));if(d.semType=i.SEMTYPE.MACROMOLECULE,d.setTag(i.TAGS.UNITS,n),n===s.r2.SEPARATOR){if(!t)throw new Error(`Notation '${s.r2.SEPARATOR}' requires separator value.`);d.setTag("separator",t)}d.setTag(i.TAGS.CELL_RENDERER,"sequence");const h=a.getTag("aligned");h&&d.setTag("aligned",h);let u=a.getTag("alphabet");u||this.notation!==s.r2.HELM||n===s.r2.HELM||(u="UN"),null!=u&&d.setTag("alphabet",u);let c=a.getTag(".alphabetSize");null!=u&&c&&d.setTag(".alphabetSize",c);const b=a.getTag(".alphabetIsMultichar");return null!=u&&void 0!==b&&d.setTag(".alphabetIsMultichar",b),n==s.r2.HELM&&(c=this.getAlphabetSize().toString(),d.setTag(".alphabetSize",c)),d}getNewColumnFromList(n,t){return this.getNewColumn(this.notation,this.separator,n,t)}static getNewColumn(n){const t=l.forColumn(n),e=t.notation;return t.getNewColumn(e)}static unitsStringIsValid(n){return n=n.toLowerCase(),[s.r2.FASTA,s.r2.SEPARATOR,s.r2.HELM].some((t=>n.startsWith(t.toLowerCase())))}static getNewColumnFromParams(n,t,e){if(!l.unitsStringIsValid(e))throw new Error("Invalid format of 'units' parameter");const r=i.Column.fromList("string",t,new Array(n).fill(""));return r.semType=i.SEMTYPE.MACROMOLECULE,r.setTag(i.TAGS.UNITS,e),r}getSplitter(n){let t=null;if(t=this.notationProvider?this.notationProvider.splitter:null,t)return t;if(this.units.toLowerCase().startsWith(s.r2.FASTA))return null===this.column.getTag("alphabet")||this.getAlphabetIsMultichar()?s.kB:f.FJ;if(this.units.toLowerCase().startsWith(s.r2.SEPARATOR))return(0,s.Ar)(this.separator,n);if(this.units.toLowerCase().startsWith(s.r2.HELM))return s.gP;throw new Error(`Unexpected units ${this.units} .`)}split(n){return this.splitter(n)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");return this.isMsa()?d.U.HAMMING:(this.alphabet,d.U.LEVENSHTEIN)}getDistanceFunction(){return d.o[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const n=(await(0,h.JN)()).getBioLib().getMonomerSymbolsByType("PEPTIDE".toString()),t=new Set(n),e=((0,s.Ar)(this.separator),new Set),i=this.column.length,r=this.column.getRawData();for(let n=0;n<i;++n){const i=r[n];if(!(i in e)){e.add(i);const r=this.getSplitted(n);for(const n of r.canonicals)if(!t.has(n))return this.column.setTag(".isHelmCompatible","false"),!1}}return this.column.setTag(".isHelmCompatible","true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(n){return n===s.r2.FASTA}toSeparator(n){return n===s.r2.SEPARATOR}toHelm(n){return n===s.r2.HELM}convertHelmToFastaSeparator(n,t,e,i){i||(i=this.toFasta(t)?b[s.r2.FASTA]:b[s.r2.SEPARATOR]),e||(e=this.toFasta(t)?"":this.separator);const r=n.startsWith("RNA"),a=this.splitter(n),o=[];for(let n=0;n<a.length;++n){let e=a.getOriginal(n);if(r&&(e=e.replace(u.pU,"")),e===b[s.r2.HELM])o.push(i);else if(this.toFasta(t)&&e.length>1){const n="["+e+"]";o.push(n)}else o.push(e)}return o.join(e)}convert(n,t){const e=this.getJoiner({notation:n,separator:t}),i=this.getNewColumn(n,t);return i.init((n=>{const t=this.getSplitted(n);return e(t)})),i}getRegion(n,t,e){const i=this.getNewColumn(this.notation,this.separator);i.name=e;const r=n??0,a=t??this.maxLength-1,o=this.getJoiner(),d=a-r+1,h=b[this.notation];i.init((n=>{const t=this.getSplitted(n),e=new Array(d);for(let n=0;n<d;++n){const i=r+n;e[n]=i<t.length?t.getOriginal(i):h}return o(new f.wx(e,h))}));const u=n=>{const t=n.split(",").map((n=>n.trim())),e=new Array(d);for(let n=0;n<d;++n){const i=r+n;e[n]=i<t.length?t[i]:"?"}return e.join(s.CI)},c=this.column.getTag(".positionNames");c&&i.setTag(".positionNames",u(c));const l=this.column.getTag(".positionLabels");return l&&i.setTag(".positionLabels",u(l)),i}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(n){const t=n?n.notation:this.notation,e=n?n.separator:this.separator;let i;const r=this;switch(t){case s.r2.FASTA:i=function(n){return r.joinToFasta(n,r.isHelm())};break;case s.r2.SEPARATOR:if(!e)throw new Error(`Separator is mandatory for notation '${t}'.`);i=function(n){return g(n,e,r.isHelm())};break;case s.r2.HELM:{const n="DNA"===r.alphabet||"RNA"===r.alphabet,t=r.getHelmWrappers();i=function(e){return D(e,t,n)};break}default:throw new Error(`Unexpected notation '${t}'.`)}return i}getConverter(n,t=undefined){if(n===s.r2.SEPARATOR&&!t)throw new Error(`Target separator is not specified for target units '${s.r2.SEPARATOR}'.`);const e=this;if(n===s.r2.FASTA)return function(n){return e.convertToFasta(n)};if(n===s.r2.HELM)return function(n){return e.convertToHelm(n)};if(n===s.r2.SEPARATOR)return function(n){return e.convertToSeparator(n,t)};throw new Error}static forColumn(n){let t=n.temp[c.seqHandler];return t&&t.columnVersion===n.version||(t=n.temp[c.seqHandler]=new l(n)),t}joinToFasta(n,t){const e=new Array(n.length);for(let i=0;i<n.length;++i){const r=n.getOriginal(i);let a=n.getOriginal(i);t&&(a=a.replace(u.pU,"$1")),r===o.G2?a=b[s.r2.FASTA]:r===u.$3?a="":a.length>1&&(a="["+a+"]"),e[i]=a}return e.join("")}convertToFasta(n){const t=this.splitter,e=this.isHelm()?this.splitterAsHelmNucl(n):t(n);return this.joinToFasta(e,this.isHelm())}convertToSeparator(n,t){return g(this.isHelm()?this.splitterAsHelmNucl(n):this.splitter(n),t,this.isHelm())}convertToHelm(n){const t=this.getHelmWrappers(),e=n.startsWith("DNA")||n.startsWith("RNA");return D(this.splitter(n),t,e)}splitterAsHelmNucl(n){const t=this.splitter(n),e=new Array(t.length),i=n.startsWith("DNA"),r=n.startsWith("RNA");for(let n=0;n<t.length;++n){let a=t.getOriginal(n);(i||r)&&(a=a.replace(u.pU,"$1"),a=a===u.$3?null:a),e[n]=a||null}return new f.wx(e.filter((n=>!!n)),b[s.r2.HELM])}}function g(n,t,e){const i=new Array(n.length);for(let t=0;t<n.length;++t){const r=n.getCanonical(t);let a=n.getOriginal(t);e&&(a=a.replace(u.pU,"$1")),r===o.G2?a=b[s.r2.SEPARATOR]:r===u.$3&&(a=""),i[t]=a}return i.join(t)}function D(n,t,e){const[i,r,a,f]=t,d=new Array(n.length);for(let t=0;t<n.length;++t){const i=n.getCanonical(t);let f=n.getOriginal(t);i===o.G2?f=b[s.r2.HELM]:(e&&(f=f.replace(u.pU,"$1")),f=1===f.length?`${r}${f}${a}`:`${r}[${f}]${a}`),d[t]=f}return`${i}${d.join(".")}${f}`}},8457:(n,t,e)=>{"use strict";e.d(t,{O:()=>a});var i=e(976),r=e(8260);function a(n){const t=n=>{const t=s.columns.addNewString((n+1).toString());return e.push(t),t},e=[],a=n.length,s=i.DataFrame.create(a),o=r.g.forColumn(n);for(let n=0;n<a;++n){const i=o.getSplitted(n);for(let r=0;r<i.length;++r){const a=i.getOriginal(r);((e[r]??null)||t(r)).set(n,a,!1)}}return s}},172:(n,t,e)=>{"use strict";e.d(t,{c:()=>a});var i,r=e(7945);!function(n){n[n.error=0]="error",n[n.warning=1]="warning",n[n.info=2]="info",n[n.debug=3]="debug"}(i||(i={}));class a{constructor(n){this.logger=n,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(n,t){const e=++this.syncCounter;this.logger.debug(`${n}, SYNC syncId = ${e}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${n}, SYNC syncId = ${e}, START `),await t(),this.logger.debug(`${n}, SYNC syncId = ${e}, END `)})).catch((t=>{const[i,a]=(0,r.yf)(t);this.logger.error(`${n}, SYNC syncId = ${e}, ERROR:\n${i}`,void 0,a),this.errors.push(t)}))}resetErrors(){const n=this.errors;return this.errors=[],n}}},9298:(n,t,e)=>{"use strict";e.d(t,{Ct:()=>f,DX:()=>i,ES:()=>r,dE:()=>o,iD:()=>s,vS:()=>h,vw:()=>a});var i,r,a,s,o,f,d=e(976);!function(n){n.tooltipWebLogo=".tooltipWebLogo"}(i||(i={})),function(n){n.Entropy="Entropy",n.full="100%"}(r||(r={})),function(n){n.TOP="top",n.MIDDLE="middle",n.BOTTOM="bottom"}(a||(a={})),function(n){n.LEFT="left",n.CENTER="center",n.RIGHT="right"}(s||(s={})),function(n){n.AUTO="auto",n.ON="on",n.OFF="off"}(o||(o={})),function(n){n.Filtered="Filtered",n.Selected="Selected"}(f||(f={}));const h=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=d.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=r.Entropy,this.positionWidth=16,this.verticalAlignment=a.MIDDLE,this.horizontalAlignment=s.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=50,this.maxHeight=100,this.showPositionLabels=!0,this.positionMarginState=o.AUTO,this.positionMargin=0,this.filterSource=f.Filtered}}},922:(n,t,e)=>{"use strict";e.d(t,{_:()=>f});class i{constructor(n){this.init(n)}init(n){this.fileContent=n.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var n;return null!==(n=this.xyzAtomCoordinates)&&void 0!==n||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var n;return null!==(n=this._atomTypes)&&void 0!==n||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var n;return null!==(n=this._pairsOfBondedAtoms)&&void 0!==n||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var n;return null!==(n=this._bondTypes)&&void 0!==n||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:n,bondCount:t}=this.parseAtomAndBondCounts();this._atomCount=n,this._bondCount=t}getNextColumnIdx(n){for(;!this.isWhitespace(n);)++n;for(;this.isWhitespace(n);)++n;return n}shiftIdxToSpecifiedColumn(n,t){let e=n;const i=this.isWhitespace(e)?t:t-1;for(let n=0;n<i;n++)e=this.getNextColumnIdx(e);return e}parseAtomTypes(){const n=this.atomCount,t=new Array(n);let e=this.getAtomBlockIdx();for(let i=0;i<n;i++)e=this.shiftIdxToAtomType(e),t[i]=this.parseAtomType(e),e=this.getNextLineIdx(e);return t}parseAtomCoordinates(){const n=new Float32Array(this.atomCount),t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount);let i=this.getAtomBlockIdx();for(let r=0;r<this.atomCount;r++){i=this.shiftIdxToXColumn(i);for(const a of[n,t,e])a[r]=this.parseFloatValue(i),i=this.getNextColumnIdx(i);i=this.getNextLineIdx(i)}return{x:n,y:t,z:e}}parseBondedAtomPairs(){const n=new Array(this.bondCount);let t=this.getBondBlockIdx();for(let e=0;e<this.bondCount;e++){t=this.shiftIdxToBondedAtomsPair(t);const i=new Uint16Array(2);i[0]=this.parseIntValue(t),t=this.getNextColumnIdx(t),i[1]=this.parseIntValue(t),n[e]=i,t=this.getNextLineIdx(t)}return n}parseBondTypes(){const n=this.bondCount,t=new Uint16Array(n);let e=this.getBondBlockIdx();for(let i=0;i<n;i++)e=this.shiftIdxToBondType(e),t[i]=this.parseIntValue(e),e=this.getNextLineIdx(e);return t}isWhitespace(n){const t=this.fileContent[n];return" "===t||"\t"===t}getNextLineIdx(n){return"\n"!==this.fileContent[n]?this.fileContent.indexOf("\n",n)+1:n+1}parseFloatValue(n){return this.parseNumericValue(parseFloat,n)}parseIntValue(n){return this.parseNumericValue(parseInt,n)}parseNumericValue(n,t){let e=t+1;for(;!this.isWhitespace(e);)++e;return n(this.fileContent.substring(t,e))}}class r extends i{constructor(n){super(n),this.init(n)}init(n){super.init(n)}parseAtomType(n){let t=n,e=t;return this.isQuote(t)?(e=this.getNextIdenticalChar(t),t++):e=this.fileContent.indexOf(" ",e),this.fileContent.substring(t,e)}isQuote(n){const t=this.fileContent[n].charCodeAt(0);return 39===t||34===t}getNextIdenticalChar(n){const t=this.fileContent[n];return t?this.fileContent.indexOf(t,n+1):-1}isQuery(){return this.isQueryOrFragment(((n,t)=>{return 39===n||34===n||76===n&&!((e=this.fileContent.charCodeAt(t+1))>64&&e<91||e>96&&e<123);var e}))}isFragment(){return this.isQueryOrFragment((n=>82===n||42===n))}isQueryOrFragment(n){const t=this.atomCount;let e=this.getAtomBlockIdx();for(let i=0;i<t;i++){if(e=this.shiftIdxToAtomType(e),n(this.fileContent.charCodeAt(e),e))return!0;e=this.getNextLineIdx(e)}return!1}}var a;!function(n){n.HEADER="V2000",n[n.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",n[n.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",n[n.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",n[n.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",n[n.BOND_TYPE_COL=3]="BOND_TYPE_COL",n[n.RGP_SHIFT=8]="RGP_SHIFT",n.RGP_LINE="M RGP",n.A_LINE="A ",n.END="M END"}(a||(a={}));class s extends r{constructor(n){super(n)}static validate(n){return-1!==n.indexOf(a.HEADER)&&-1!==n.indexOf(a.END)}shiftIdxToAtomType(n){return this.shiftIdxToSpecifiedColumn(n,a.ATOM_TYPE_COL)}getCountsLineIdx(){let n=0;for(let t=0;t<a.NUM_OF_HEADER_LINES;++t)n=this.getNextLineIdx(n);return n}getAtomBlockIdx(){let n=this.getCountsLineIdx();return n=this.getNextLineIdx(n),n}shiftIdxToXColumn(n){return this.getNextColumnIdx(n)}shiftIdxToBondedAtomsPair(n){return this.shiftIdxToSpecifiedColumn(n,a.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(n){return this.shiftIdxToSpecifiedColumn(n,a.BOND_TYPE_COL)}getBondBlockIdx(){let n=this.getAtomBlockIdx();for(let t=0;t<this.atomCount;t++)n=this.getNextLineIdx(n);return n}parseAtomAndBondCounts(){let n=this.getCountsLineIdx(),t=n+a.NUM_OF_COUNTS_DIGITS;const e=parseInt(this.fileContent.substring(n,t));return n=t,t+=a.NUM_OF_COUNTS_DIGITS,{atomCount:e,bondCount:parseInt(this.fileContent.substring(n,t))}}}class o extends r{constructor(n){super(n),this.init(n)}shiftIdxToAtomType(n){return this.shiftIdxToSpecifiedColumn(n,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let n=this.fileContent.indexOf("M V30 BEGIN ATOM");return n=this.getNextLineIdx(n),n}shiftIdxToXColumn(n){let t=this.shiftIdxToAtomType(n);return this.isQuote(t)?(t=this.getNextIdenticalChar(t),t=this.getNextColumnIdx(t),t):this.shiftIdxToSpecifiedColumn(n,5)}shiftIdxToBondedAtomsPair(n){return this.shiftIdxToSpecifiedColumn(n,5)}shiftIdxToBondType(n){return this.shiftIdxToSpecifiedColumn(n,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static validate(n){return-1!==n.indexOf("V3000")&&-1!==n.indexOf("M END")}parseAtomAndBondCounts(){let n=this.fileContent.indexOf("M V30 COUNTS ")+14,t=this.fileContent.indexOf(" ",n+1);const e=parseInt(this.fileContent.substring(n,t));return n=t+1,t=this.fileContent.indexOf(" ",n+1),{atomCount:e,bondCount:parseInt(this.fileContent.substring(n,t))}}}class f{constructor(){}static getInstance(n){if(s.validate(n))return new s(n);if(o.validate(n))return new o(n);throw new Error("Malformed molfile")}}},7905:(n,t,e)=>{"use strict";n=e.hmd(n);var i,r=(i="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(n={}){var t,e,r=void 0!==n?n:{};r.ready=new Promise((function(n,i){t=n,e=i}));var a,s=Object.assign({},r),o="object"==typeof window,f="function"==typeof importScripts,d=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(o||f)&&(f?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),i&&(d=i),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f&&(a=n=>{var t=new XMLHttpRequest;return t.open("GET",n,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),r.print||console.log.bind(console);var h,u,c=r.printErr||console.warn.bind(console);Object.assign(r,s),s=null,r.arguments&&r.arguments,r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(h=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&m("no native wasm support detected");var b,l,g,D=!1;function j(){var n=u.buffer;r.HEAP8=b=new Int8Array(n),r.HEAP16=new Int16Array(n),r.HEAP32=new Int32Array(n),r.HEAPU8=l=new Uint8Array(n),r.HEAPU16=new Uint16Array(n),r.HEAPU32=g=new Uint32Array(n),r.HEAPF32=new Float32Array(n),r.HEAPF64=new Float64Array(n)}var H=[],A=[],p=[],I=0,M=null,T=null;function m(n){r.onAbort&&r.onAbort(n),c(n="Aborted("+n+")"),D=!0,n+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(n);throw e(t),t}var J,P,N="data:application/octet-stream;base64,";function w(n){return n.startsWith(N)}function L(n){try{if(n==J&&h)return new Uint8Array(h);if(a)return a(n);throw"both async and sync fetching of the wasm failed"}catch(n){m(n)}}function U(n,t,e){return function(n){return h||!o&&!f||"function"!=typeof fetch?Promise.resolve().then((function(){return L(n)})):fetch(n,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+n+"'";return t.arrayBuffer()})).catch((function(){return L(n)}))}(n).then((function(n){return WebAssembly.instantiate(n,t)})).then((function(n){return n})).then(e,(function(n){c("failed to asynchronously prepare wasm: "+n),m(n)}))}function B(n){for(;n.length>0;)n.shift()(r)}function R(n){this.excPtr=n,this.ptr=n-24,this.set_type=function(n){g[this.ptr+4>>2]=n},this.get_type=function(){return g[this.ptr+4>>2]},this.set_destructor=function(n){g[this.ptr+8>>2]=n},this.get_destructor=function(){return g[this.ptr+8>>2]},this.set_caught=function(n){n=n?1:0,b[this.ptr+12>>0]=n},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(n){n=n?1:0,b[this.ptr+13>>0]=n},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(n,t){this.set_adjusted_ptr(0),this.set_type(n),this.set_destructor(t)},this.set_adjusted_ptr=function(n){g[this.ptr+16>>2]=n},this.get_adjusted_ptr=function(){return g[this.ptr+16>>2]},this.get_exception_ptr=function(){if(v(this.get_type()))return g[this.excPtr>>2];var n=this.get_adjusted_ptr();return 0!==n?n:this.excPtr}}function C(n){var t=u.buffer;try{return u.grow(n-t.byteLength+65535>>>16),j(),1}catch(n){}}function y(n){return r["_"+n]}w(J="wasmDbscan.wasm")||(P=J,J=r.locateFile?r.locateFile(P,d):d+P);var E="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function Q(n,t,e,i,r){var a={string:n=>{var t=0;return null!=n&&0!==n&&(t=function(n){var t=function(n){for(var t=0,e=0;e<n.length;++e){var i=n.charCodeAt(e);i<=127?t++:i<=2047?t+=2:i>=55296&&i<=57343?(t+=4,++e):t+=3}return t}(n)+1,e=Y(t);return function(n,t,e){!function(n,t,e,i){if(!(i>0))return 0;for(var r=e+i-1,a=0;a<n.length;++a){var s=n.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&n.charCodeAt(++a)),s<=127){if(e>=r)break;t[e++]=s}else if(s<=2047){if(e+1>=r)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=r)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=r)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}t[e]=0}(n,l,t,e)}(n,e,t),e}(n)),t},array:n=>{var t,e,i=Y(n.length);return t=n,e=i,b.set(t,e),i}},s=y(n),o=[],f=0;if(i)for(var d=0;d<i.length;d++){var h=a[e[d]];h?(0===f&&(f=S()),o[d]=h(i[d])):o[d]=i[d]}var u=s.apply(null,o);return function(n){return 0!==f&&x(f),function(n){return"string"===t?(e=n)?function(n,t,e){for(var i=t+e,r=t;n[r]&&!(r>=i);)++r;if(r-t>16&&n.buffer&&E)return E.decode(n.subarray(t,r));for(var a="";t<r;){var s=n[t++];if(128&s){var o=63&n[t++];if(192!=(224&s)){var f=63&n[t++];if((s=224==(240&s)?(15&s)<<12|o<<6|f:(7&s)<<18|o<<12|f<<6|63&n[t++])<65536)a+=String.fromCharCode(s);else{var d=s-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}(l,e,i):"":"boolean"===t?Boolean(n):n;var e,i}(n)}(u)}var k,F={__cxa_throw:function(n,t,e){throw new R(n).init(t,e),n},abort:function(){m("")},emscripten_memcpy_big:function(n,t,e){l.copyWithin(n,t,t+e)},emscripten_resize_heap:function(n){var t,e=l.length,i=2147483648;if((n>>>=0)>i)return!1;for(var r=1;r<=4;r*=2){var a=e*(1+.2/r);if(a=Math.min(a,n+100663296),C(Math.min(i,(t=Math.max(n,a))+(65536-t%65536)%65536)))return!0}return!1}},S=(function(){var n,t,i,a,s={env:F,wasi_snapshot_preview1:F};function o(n,t){var e,i=n.exports;return r.asm=i,u=r.asm.memory,j(),r.asm.__indirect_function_table,e=r.asm.__wasm_call_ctors,A.unshift(e),function(n){if(I--,r.monitorRunDependencies&&r.monitorRunDependencies(I),0==I&&(null!==M&&(clearInterval(M),M=null),T)){var t=T;T=null,t()}}(),i}if(I++,r.monitorRunDependencies&&r.monitorRunDependencies(I),r.instantiateWasm)try{return r.instantiateWasm(s,o)}catch(n){c("Module.instantiateWasm callback failed with error: "+n),e(n)}(n=h,t=J,i=s,a=function(n){o(n.instance)},n||"function"!=typeof WebAssembly.instantiateStreaming||w(t)||"function"!=typeof fetch?U(t,i,a):fetch(t,{credentials:"same-origin"}).then((function(n){return WebAssembly.instantiateStreaming(n,i).then(a,(function(n){return c("wasm streaming compile failed: "+n),c("falling back to ArrayBuffer instantiation"),U(t,i,a)}))}))).catch(e)}(),r._dbscan=function(){return(r._dbscan=r.asm.dbscan).apply(null,arguments)},r._malloc=function(){return(r._malloc=r.asm.malloc).apply(null,arguments)},r._free=function(){return(r._free=r.asm.free).apply(null,arguments)},function(){return(S=r.asm.stackSave).apply(null,arguments)}),x=function(){return(x=r.asm.stackRestore).apply(null,arguments)},Y=function(){return(Y=r.asm.stackAlloc).apply(null,arguments)},v=function(){return(v=r.asm.__cxa_is_pointer_type).apply(null,arguments)};function z(){function n(){k||(k=!0,r.calledRun=!0,D||(B(A),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)n=r.postRun.shift(),p.unshift(n);var n;B(p)}()))}I>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)n=r.preRun.shift(),H.unshift(n);var n;B(H)}(),I>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.ccall=Q,r.cwrap=function(n,t,e,i){var r=!e||e.every((n=>"number"===n||"boolean"===n));return"string"!==t&&r&&!i?y(n):function(){return Q(n,t,e,arguments)}},T=function n(){k||z(),k||(T=n)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return z(),n.ready});"object"==typeof exports?n.exports=r:"function"==typeof define&&e.amdO?define([],(function(){return r})):"object"==typeof exports&&(exports.exportCppDbscanLib=r)},6254:(n,t,e)=>{"use strict";function i(n){return(t,e)=>n*t+e-Math.floor((t+2)*(t+1)/2)}e.d(t,{y:()=>i})},5697:(n,t,e)=>{"use strict";e.d(t,{Dz:()=>H,FV:()=>d,Jv:()=>T,KR:()=>f,MI:()=>p,NB:()=>l,UX:()=>b,WI:()=>c,Z3:()=>o,Zd:()=>u,_h:()=>h,aW:()=>D,bX:()=>M,fX:()=>A,kg:()=>s,s:()=>g,yU:()=>j});var i=e(9657),r=e(1040),a=e(708);r.gk.Tanimoto,r.gk.Dice,r.gk.Asymmetric,r.gk.BraunBlanquet,r.gk.Cosine,r.gk.Kulczynski,r.gk.McConnaughey,r.gk.RogotGoldberg,r.gk.Russel,r.gk.Sokal,r.gk.Hamming,r.gk.Euclidean,r.gk.Tanimoto,r.gk.Dice,r.gk.Asymmetric,r.gk.BraunBlanquet,r.gk.Cosine,r.gk.Kulczynski,r.gk.McConnaughey,r.gk.RogotGoldberg,r.gk.Russel,r.gk.Sokal,r.gk.Hamming,r.gk.Euclidean;const s=[r.gk.Tanimoto,r.gk.Dice,r.gk.Cosine];function o(n,t){const e=n.trueCount()+t.trueCount();if(0==e)return 1;const i=n.andWithCountBits(t,!0);return i/(e-i)}function f(n,t){return 1-o(n,t)}function d(n,t){return I(o(new i.Z(n,32*n.length),new i.Z(t,32*t.length)))}function h(n,t){return 1-function(n,t){const e=n.trueCount()+t.trueCount();return 0==e?0:2*n.andWithCountBits(t,!0)/e}(n,t)}function u(n,t){return 1-function(n,t){const e=n.trueCount()*t.trueCount();return 0==e?0:n.andWithCountBits(t,!0)/Math.sqrt(e)}(n,t)}function c(n,t){return Math.sqrt(n.trueCount()+t.trueCount()-2*n.andWithCountBits(t,!0))}function b(n,t){return n.trueCount()+t.trueCount()-2*n.andWithCountBits(t,!0)}function l(n,t){return 1-function(n,t){const e=n.trueCount()+t.trueCount(),i=n.andWithCountBits(t,!0);return i/(2*e-3*i)}(n,t)}function g(n,t){return I(function(n,t){const e=n.trueCount()+t.trueCount(),i=n.trueCount()*t.trueCount();return 0==i?0:n.andWithCountBits(t,!0)*e/(2*i)}(n,t))}function D(n,t){return I(function(n,t){const e=n.trueCount()+t.trueCount(),i=n.trueCount()*t.trueCount();return 0==i?0:(n.andWithCountBits(t,!0)*e-i)/i}(n,t))}function j(n,t){return 1-function(n,t){const e=Math.min(n.trueCount(),t.trueCount());return 0==e?0:n.andWithCountBits(t,!0)/e}(n,t)}function H(n,t){return I(function(n,t){const e=Math.max(n.trueCount(),t.trueCount());return 0==e?0:n.andWithCountBits(t,!0)/e}(n,t))}function A(n,t){return I(function(n,t){return 0==n.length?0:n.andWithCountBits(t,!0)/n.length}(n,t))}function p(n,t){return I(function(n,t){const e=n.andWithCountBits(t,!0),i=n.countBits(!0)+t.countBits(!0),r=n.length,a=r-i+e;return e==r||a==r?1:e/i+a/(2*r-i)}(n,t))}function I(n){return 0===n?3402823e32:1/n-1}function M(n){if(n&&null!=n.range&&n.range>0){const t=n.range;return(n,e)=>Math.abs(n-e)/t}return(n,t)=>Math.abs(n-t)}function T(n){const t=function(n){const t=n?.mostCommon??new Set;return(n,e)=>{const i=n.length,r=e.length;let a=0,s=0,o=0;for(;s<i&&o<r;)n[s]===e[o]?(t?.has(n[s])||++a,++s,++o):n[s]<e[o]?++s:++o;return a}}(n);return(n,e)=>0===e.length||0===n.length?1e4:Math.min(n.length,e.length)/(t(n,e)+1e-4)}r.gk.Tanimoto,r.gk.Asymmetric,r.gk.Cosine,r.gk.Sokal,a.U.HAMMING,a.U.LEVENSHTEIN,a.U.MONOMER_CHEMICAL_DISTANCE,a.U.NEEDLEMANN_WUNSCH},3277:(n,t,e)=>{"use strict";e.d(t,{Ec:()=>d,dB:()=>o,n3:()=>i,q6:()=>s,sS:()=>f,ts:()=>a,vO:()=>r});const i="dim-red-preprocessing-function",r="supportedSemTypes",a="supportedTypes",s="supportedUnits",o="supportedDistanceFunctions",f="bypassLargeDataWarning",d="show-scatterplot-progress"},708:(n,t,e)=>{"use strict";function i(n={}){const t=function(){if(!n||!n.scoringMatrix||!n.alphabetIndexes)return(n,t)=>n===t?0:1;if(n.scoringMatrix.length!==Object.keys(n.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const t=n.alphabetIndexes,e=n.scoringMatrix,i=Math.min(...Object.keys(t).map((n=>n.charCodeAt(0))))+1,r=new Float32Array((e.length+i)*(e.length+i));return Object.entries(t).forEach((([n,i])=>{const a=e[i];Object.entries(t).forEach((([t,i])=>{r[n.charCodeAt(0)*e.length+t.charCodeAt(0)]=a[i]}))})),(n,t)=>1-r[n.charCodeAt(0)*e.length+t.charCodeAt(0)]}(),e=n?.threshold??0;return(n,i)=>{let r=0;const a=n.length,s=i.length,o=Math.max(a,s)*(1-e);a!==s&&(r=Math.abs(a-s));let f=0;for(let e=0;e<Math.min(a,s);e++)if(n[e]!==i[e]&&(f+=t(n[e],i[e]),f>o))return 1;return f+=r,f/=Math.max(a,s),f}}e.d(t,{U:()=>s,o:()=>o});var r=e(1811);const a={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var s;!function(n){n.HAMMING="Hamming",n.LEVENSHTEIN="Levenshtein",n.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",n.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(s||(s={}));const o={[s.HAMMING]:i,[s.LEVENSHTEIN]:function(){return(n,t)=>(0,r.T)(n,t)/Math.max(n.length,t.length)},[s.NEEDLEMANN_WUNSCH]:function(n){const t=new Uint16Array(65536),{gapOpen:e,gapExtend:i,scoringMatrix:r,alphabetIndexes:s}={...a,...n};Object.entries(s).forEach((([n,e])=>t[n.charCodeAt(0)]=e));const o=[new Float32Array(1e4),new Float32Array(1e4)];return(n,a)=>{const s=new Array(n.length+1).fill(!1),f=new Array(n.length+1).fill(!1);let d=0,h=1;for(let t=1;t<n.length+1;t++)o[0][t]=-e-(t-1)*i,o[1][t]=0;o[0][0]=0;for(let u=1;u<a.length+1;u++){o[h][0]=-e-(u-1)*i;for(let c=1;c<n.length+1;c++){const b=o[d][c-1]+r[t[n.charCodeAt(c-1)]][t[a.charCodeAt(u-1)]],l=o[d][c]-(s[c]?i:e),g=o[h][c-1]-(f[c-1]?i:e);o[h][c]=Math.max(b,g,l),o[h][c]===b?(s[c]=!1,f[c]=!1):o[h][c]===g?(s[c]=!1,f[c]=!0):(s[c]=!0,f[c]=!1)}d=h,h=(h+1)%2}const u=Math.max(n.length,a.length);return(u-o[d][n.length])/u}},[s.MONOMER_CHEMICAL_DISTANCE]:i}},4628:(n,t,e)=>{"use strict";var i;e.d(t,{A:()=>i}),function(n){n.UMAP="UMAP",n.T_SNE="t-SNE"}(i||(i={}))},1040:(n,t,e)=>{"use strict";var i,r,a,s,o,f,d;e.d(t,{CF:()=>r,Qe:()=>o,W:()=>i,Yc:()=>f,gd:()=>s,gj:()=>d,gk:()=>a}),function(n){n.Levenshtein="Levenshtein",n.JaroWinkler="Jaro-Winkler",n.Manhattan="Manhattan",n.Onehot="One-Hot"}(i||(i={})),function(n){n.Euclidean="Euclidean"}(r||(r={})),function(n){n.Tanimoto="Tanimoto",n.Dice="Dice",n.Asymmetric="Asymmetric",n.BraunBlanquet="Braun-Blanquet",n.Cosine="Cosine",n.Kulczynski="Kulczynski",n.McConnaughey="Mc-Connaughey",n.RogotGoldberg="Rogot-Goldberg",n.Russel="Russel",n.Sokal="Sokal",n.Hamming="Hamming",n.Euclidean="Euclidean"}(a||(a={})),function(n){n.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(n){n.Vector="Vector",n.String="String",n.BitArray="BitArray",n.MacroMolecule="MacroMolecule",n.Number="Number",n.IntArray="IntArray",n.NumberArray="NumberArray"}(o||(o={})),function(n){n.Difference="Difference"}(f||(f={})),function(n){n.CommonItems="Common Items"}(d||(d={}))},6361:(n,t,e)=>{"use strict";e.d(t,{W:()=>i.W});var i=e(1040);e(7861)},7861:(n,t,e)=>{"use strict";var i=e(1811),r=e(3979),a=e(5697),s=e(850),o=e(708),f=e(1040);const d={[f.CF.Euclidean]:s.dP},h={[f.W.Levenshtein]:i.T,[f.W.JaroWinkler]:r.H$,[f.W.Manhattan]:function(n,t){if(n.length!==t.length)return 1;{let e=0;for(let i=1;i<n.length;i++)e+=n[i]==t[i]?0:1;return e/n.length}},[f.W.Onehot]:function(n,t){return n===t?0:1}},u={[f.gk.Tanimoto]:a.KR,[f.gk.Dice]:a._h,[f.gk.Asymmetric]:a.yU,[f.gk.BraunBlanquet]:a.Dz,[f.gk.Cosine]:a.Zd,[f.gk.Kulczynski]:a.s,[f.gk.McConnaughey]:a.aW,[f.gk.RogotGoldberg]:a.MI,[f.gk.Russel]:a.fX,[f.gk.Sokal]:a.NB,[f.gk.Hamming]:a.UX,[f.gk.Euclidean]:a.WI},c={[f.gd.TanimotoIntArray]:a.FV},b={[f.Yc.Difference]:a.bX},l={[f.gj.CommonItems]:a.Jv},g={[f.Qe.Vector]:{[f.CF.Euclidean]:d[f.CF.Euclidean]},[f.Qe.String]:{[f.W.Levenshtein]:h[f.W.Levenshtein],[f.W.JaroWinkler]:h[f.W.JaroWinkler],[f.W.Manhattan]:h[f.W.Manhattan],[f.W.Onehot]:h[f.W.Onehot]},[f.Qe.BitArray]:{[f.gk.Tanimoto]:u[f.gk.Tanimoto],[f.gk.Dice]:u[f.gk.Dice],[f.gk.Asymmetric]:u[f.gk.Asymmetric],[f.gk.BraunBlanquet]:u[f.gk.BraunBlanquet],[f.gk.Cosine]:u[f.gk.Cosine],[f.gk.Kulczynski]:u[f.gk.Kulczynski],[f.gk.McConnaughey]:u[f.gk.McConnaughey],[f.gk.RogotGoldberg]:u[f.gk.RogotGoldberg],[f.gk.Russel]:u[f.gk.Russel],[f.gk.Sokal]:u[f.gk.Sokal]},[f.Qe.MacroMolecule]:{[o.U.HAMMING]:o.o[o.U.HAMMING],[o.U.LEVENSHTEIN]:o.o[o.U.LEVENSHTEIN],[o.U.NEEDLEMANN_WUNSCH]:o.o[o.U.NEEDLEMANN_WUNSCH],[o.U.MONOMER_CHEMICAL_DISTANCE]:o.o[o.U.MONOMER_CHEMICAL_DISTANCE]},[f.Qe.Number]:{[f.Yc.Difference]:b[f.Yc.Difference]},[f.Qe.IntArray]:{[f.gd.TanimotoIntArray]:c[f.gd.TanimotoIntArray]},[f.Qe.NumberArray]:{[f.gj.CommonItems]:l[f.gj.CommonItems]}};Object.keys(g).reduce(((n,t)=>{for(const e of Object.keys(g[t]))n[e]=t;return n}),{})},9657:(n,t,e)=>{"use strict";e.d(t,{Z:()=>i});class i{constructor(n,t=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof n){const e=n,r=i._createBuffer(e);if(t)for(let n=0;n<r.length;n++)r[n]=-1;this._data=r,this._length=e}else{if(!(n instanceof Uint32Array))throw new Error("Invalid constructor");this._data=n,this._length=t}}getRawData(){return this._data}assureGoez(n,t){if(n<0)throw new Error(`${t} should be greater than zero`)}assureInRange(n,t,e,i){if(n<t||n>e)throw new Error(`Argument ${i} (${n}) out of range (${t}, ${e})`)}copy(n,t,e){for(let i=0;i<e;i++)t[i]=n[i]}copyFrom(n){if(this._length!=n._length)throw new Error(`Lengths differ (${this._length} != ${n._length})`);this.copy(n._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(n){this._data=n,this._version++}get version(){return this._version}set version(n){this._version=n}incrementVersion(n=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(n){this._versionedName=n,this._versionedNameVersion=this._version}get self(){return this}setLength(n){if(n<0)throw new Error("should be >= 0");if(n==this._length)return;const t=Math.floor((n+31)/32);if(t>this._data.length||t+this.SHRINK_THRESHOLD<this._data.length){const n=new Uint32Array(t);this.copy(this._data,n,t>this._data.length?this._data.length:t),this._data=n}n>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,t)),this._length=n,this._version++}static fromAnd(n,t){if(n._length!=t._length)throw new Error(`Lengths differ (${n._length} != ${t._length})`);const e=new i(n._length);e._length=n._length,e._data=i._createBuffer(e._length),e._version=0;const r=n.lengthInInts;for(let i=0;i<r;i++)e._data[i]=n._data[i]&t._data[i];return e}static _createBuffer(n){return new Uint32Array(Math.floor((n+31)/32))}static fromValues(n){const t=new i(n.length);t._version=0;for(let e=0;e<t._length;e++)n[e]&&(t._data[Math.floor(e/32)]|=1<<(e%32&31));return t}static fromSeq(n,t){const e=new i(n);for(let i=0;i<n;++i)e.setBit(i,t(i));return e._version=0,e}static fromString(n){return i.fromSeq(n.length,(t=>"1"==n.charAt(t)))}static fromUint32Array(n,t){const e=new i(n);return e._data=t,e}static fromBytes(n){const t=n.length,e=new i(8*t);e._data=new Uint32Array(Math.floor((t+3)/4)),e._length=8*t;let r=0,a=0;for(;t-a>=4;)e._data[r++]=255&n[a]|(255&n[a+1])<<8|(255&n[a+2])<<16|(255&n[a+3])<<24,a+=4;return t-a==3&&(e._data[r]=(255&n[a+2])<<16),t-a==2&&(e._data[r]|=(255&n[a+1])<<8),t-a==1&&(e._data[r]|=255&n[a]),e._version=0,e}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(n){if(this==n)return!0;if(null==n)return!1;if(this._length!=n._length)return!1;if(0==this._length)return!0;for(let t=0;t<this._data.length-1;t++)if(this._data[t]!=n._data[t])return!1;for(let t=8*(this._data.length-1);t<this._length;t++)if(this.getBit(t)!=n.getBit(t))return!1;return!0}clone(){const n=new i(0,!1);return n._data=Uint32Array.from(this._data),n._length=this._length,n._version=this._version,n}init(n,t){this.setAll(!1,!1);for(let t=0;t<this._length;t++)n(t)&&(this._data[Math.floor(t/32)]|=1<<(t%32&31));return this.incrementVersion(t),this}invert(n=!0){for(let n=0;n<this._data.length;n++)this._data[n]^=-1;this.incrementVersion(n)}setAll(n,t=!1){const e=n?-1:0,i=this.lengthInInts;for(let n=0;n<i;n++)this._data[n]=e;this.incrementVersion(t)}setIndexes(n,t=!0,e=!0,i=!0){e&&this.setAll(!t,!1);for(const e of n)this.setFast(e,t);this.incrementVersion(i)}everyIndex(n,t=!0){for(const e of n)if(this.getBit(e)!=t)return!1;return!0}anyIndex(n,t=!0){for(const e of n)if(this.getBit(e)==t)return!0;return!1}setWhere(n,t=!0,e=!0,i=!0,r=!0){if(e&&r&&this.setAll(!t,!1),r)for(let e=0;e<this._length;e++)n(e)&&this.setFast(e,t);else for(let e=0;e<this._length;e++)this.setFast(e,n(e)?t:!t);this.incrementVersion(i)}getRange(n,t){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const e=[];for(let i=n;i<t;++i)e.push(this.getBit(i));return i.fromValues(e)}getRangeAsList(n,t){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const e=[];for(let i=n;i<t;++i)e.push(this.getBit(i));return e}setRange(n,t,e,i=!0){this.assureInRange(n,0,this._length-1,"from"),this.assureInRange(t,0,this._length-1,"to");const r=Math.min(n,t),a=Math.max(n,t);if(e)for(let n=r;n<=a;n++)this.setTrue(n);else for(let n=r;n<=a;n++)this.setFalse(n);return this.incrementVersion(i),this}setRandom(n,t,e=!0){if(n<0||n>this._length)throw new Error("n must be >= 0 && <= Count");n>this._length/2&&this.setRandom(this._length-n,!t),this.setAll(!t);for(let e=0;e<n;){const n=Math.floor(Math.random()*this._length);this.getBit(n)!=t&&(this.setFast(n,t),e++)}this.incrementVersion(e)}and(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]&=n._data[t];return this.incrementVersion(t),this}andNot(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");const e=this.lengthInInts;for(let t=0;t<e;t++)this._data[t]&=~n._data[t];return this.incrementVersion(t),this}notAnd(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t]&n._data[t];return this.incrementVersion(t),this}not(n=!0){for(let n=0,t=this.lengthInInts;n<t;n++)this._data[n]=~this._data[n];return this.incrementVersion(n),this}or(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]|=n._data[t];return this.incrementVersion(t),this}xor(n,t=!0){if(this._length!=n._length)throw new Error("Array lengths differ.");for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]^=n._data[t];return this.incrementVersion(t),this}insertAt(n,t,e=!1){if(this.assureInRange(n,0,this._length,"pos"),0==t)return;const i=this._length;this.setLength(this._length+t);for(let e=i-1;e>=n;e--)this.setBit(e+t,this.getBit(e));for(let i=n;i<n+t;i++)this.setBit(i,e)}removeAt(n,t=1){if(t<0)throw new Error("n cannot be negative");if(this.assureInRange(n,0,this._length-t,"pos"),this.contains(!0))for(let e=n;e<this._length-t;e++)this.setBit(e,this.getBit(e+t));this.setLength(this._length-t)}removeByMask(n,t=!0){if(this._length!=n.length)throw new Error("length != mask.length");if(n==this)this.setLength(n.countBits(!t)),this.setAll(!t);else{let e=0;for(let i=-1;-1!=(i=n.findNext(i,!t));)this.setFast(e++,this.getBit(i));this._length=e,this._version++}return this}getBit(n){return 0!=(this._data[Math.floor(n/32)]&1<<(31&n))}setBit(n,t,e=!0){this.setFast(n,t),this._version++}setFast(n,t){t?this._data[Math.floor(n/32)]|=1<<(31&n):this._data[Math.floor(n/32)]&=~(1<<(31&n))}setTrue(n){this._data[Math.floor(n/32)]|=1<<(31&n)}setFalse(n){this._data[Math.floor(n/32)]&=~(1<<(31&n))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(n){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const n=this.lengthInInts;let t=0;for(;t<n-1;t++)for(let n=this._data[t];0!=n;n>>>=8)this._selectedCount+=i._onBitCount[255&n];let e=this._data[t];const r=31&this._length;for(0!=r&&(e&=~(4294967295<<r));0!=e;e>>>=8)this._selectedCount+=i._onBitCount[255&e];this._selectedCountVersion=this._version}return n?this._selectedCount:this._length-this._selectedCount}countWhere(n){let t=0;if(this.trueCount()==this._length)for(let e=0;e<this._length;e++)t+=n(e)?1:0;else for(let e=-1;-1!=(e=this.findNext(e,!0));)t+=n(e)?1:0;return t}andWithCountBits(n,t){if(0==this._length)return 0;let e=0;const r=this.lengthInInts;let a=0;for(;a<r-1;a++)for(let t=this._data[a]&n._data[a];0!=t;t>>>=8)e+=i._onBitCount[255&t];let s=this._data[a]&n._data[a];const o=31&this._length;for(0!=o&&(s&=~(4294967295<<o));0!=s;s>>>=8)e+=i._onBitCount[255&s];return t?e:this._length-e}clear(){this.setLength(0)}contains(n){return this.findNext(-1,n)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(n,t=!0){if(this.assureInRange(n,-1,this._length,"index"),n>=this._length-1)return-1;let e=31&(n=n<0?0:n+1);const r=this.lengthInInts;for(let a=Math.floor(n/32);a<r;a++){let r=t?this._data[a]:~this._data[a];if(0!=e)r&=4294967295<<e&4294967295,e=0;else if(!t&&-4294967296==r)continue;for(let t=0;0!=r;t+=8,r>>>=8){const e=i._firstOnBit[255&r];if(e>=0)return(n=e+32*a+t)>=this._length?-1:n}}return-1}findPrev(n,t=!0){if(0==n)return-1;this.assureInRange(n,-1,this._length,"index");let e=1+(n=n<0?this._length-1:n-1)&31;for(let r=Math.floor(n/32);r>=0;r--){let n=t?this._data[r]:~this._data[r];0!=e&&(n&=~(4294967295<<e),e=0);for(let t=24;0!=n;t-=8,n<<=8){const e=i._lastOnBit[n>>>24];if(e>=0)return e+32*r+t}}return-1}}i._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),i._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),i._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7])},279:(n,t,e)=>{"use strict";function i(n,t,e){function i(n,t){let e=null,i=null;for(const r of n){const n=t(r);(null==i||n>i)&&(e=r,i=n)}return e}const r=[(s=n-1,Math.floor(function(n){return Math.random()*n}(s)))],a=new Set;var s;for(let t=0;t<n;++t)r.includes(t)||a.add(t);for(;r.length<t;){const n=i(a.values(),(n=>Math.min.apply(Math,r.map((function(t,i){return e(n,t)})))));null!=n&&(r.push(n),a.delete(n))}return r}e.d(t,{L:()=>i})},8467:(n,t,e)=>{"use strict";e.d(t,{gw:()=>o,zg:()=>s}),e(4469);var i=e(976);e(9133),i.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,').columns.add(i.Column.fromList(i.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r,a=function(n,t,e,i){return new(e||(e=Promise))((function(r,a){function s(n){try{f(i.next(n))}catch(n){a(n)}}function o(n){try{f(i.throw(n))}catch(n){a(n)}}function f(n){var t;n.done?r(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(s,o)}f((i=i.apply(n,t||[])).next())}))};function s(n,t,e,i=0,r="timeout"){return a(this,void 0,void 0,(function*(){return new Promise(((a,s)=>{const o=n.subscribe((n=>{try{t(n),a("OK")}catch(n){s(n)}o.unsubscribe(),clearTimeout(f)})),f=setTimeout((()=>{o.unsubscribe(),s(r)}),i);e()}))}))}function o(n){return a(this,void 0,void 0,(function*(){yield new Promise((t=>setTimeout(t,n)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(n){n.notNull=function(n,t){if(null==n)throw new Error(`${null==t?"Value":t} not defined`)}}(r||(r={})),i.DataFrame.fromColumns([i.Column.fromStrings("col",["val1","val2","val3"])])},850:(n,t,e)=>{"use strict";function i(n=!1,t="Assertion error."){if(!n)throw new Error(t)}function r(n){let t=0;for(let e=0;e<n.length;e++)t+=n[e]*n[e];return Math.sqrt(t)}function a(n,t){if(n.length!=t.length)throw new Error("The dimensionality of the vectors must match");let e=0;for(let i=0;i<n.length;i++)e+=n[i]*t[i];return e}function s(n,t){let e=0;const i=n.length;if(i!==t.length)throw new Error("The dimensionality of the vectors must match");for(let r=0;r<i;++r)e+=Math.pow(n[r]-t[r],2);return Math.sqrt(e)}function o(n){const t=n.length;let e=0,i=0;for(let r=0;r<t;++r)e+=n[r],i+=Math.pow(n[r],2);const r=e/t,a=1/Math.sqrt(i/t-Math.pow(r,2));for(let e=0;e<t;++e)n[e]=(n[e]-r)*a;return n}e.d(t,{$G:()=>r,Fv:()=>o,MA:()=>a,dP:()=>s,hu:()=>i})},3351:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(1581),r=e(3487),a=e(7023),s=e(4815),o=e(4181),f=e(2141),d="errorMessage",h=new i.Name("emUsed"),u={required:"missingProperty",dependencies:"property",dependentRequired:"property"},c=/\$\{[^}]+\}/,b=/\$\{([^}]+)\}/g,l=/^""\s*\+\s*|\s*\+\s*""$/g;const g=(n,t={})=>{if(!n.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(n.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return n.addKeyword(function(n){return{keyword:d,schemaType:["string","object"],post:!0,code(t){const{gen:e,data:g,schema:D,schemaValue:j,it:H}=t;if(!1===H.createErrors)return;const A=D,p=r.strConcat(f.default.instancePath,H.errorPath);function I(n,t){return r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,i._`${n}.instancePath === ${p}`,i._`${n}.keyword in ${t}`,i._`${n}.schemaPath.indexOf(${H.errSchemaPath}) === 0`,i._`/^\\/[^\\/]*$/.test(${n}.schemaPath.slice(${H.errSchemaPath.length}))`)}function M(n,t){const i=[];for(const e in n){const n=t[e];c.test(n)&&i.push([e,m(n)])}return e.object(...i)}function T(n){return c.test(n)?new a._Code(a.safeStringify(n).replace(b,((n,t)=>`" + JSON.stringify(${s.getData(t,H)}) + "`)).replace(l,"")):i.stringify(n)}function m(n){return i._`function(){return ${T(n)}}`}e.if(i._`${f.default.errors} > 0`,(()=>{if("object"==typeof A){const[a,s]=function(n){let t,e;for(const i in n){if("properties"===i||"items"===i)continue;const r=n[i];if("object"==typeof r){t||(t={});const n=t[i]={};for(const t in r)n[t]=[]}else e||(e={}),e[i]=[]}return[t,e]}(A);s&&function(r){const a=e.const("emErrors",i.stringify(r)),s=e.const("templates",M(r,D));e.forOf("err",f.default.vErrors,(n=>e.if(I(n,a),(()=>e.code(i._`${a}[${n}.keyword].push(${n})`).assign(i._`${n}.${h}`,!0)))));const{singleError:d}=n;if(d){const n=e.let("message",i._`""`),r=e.let("paramsErrors",i._`[]`);u((t=>{e.if(n,(()=>e.code(i._`${n} += ${"string"==typeof d?d:";"}`))),e.code(i._`${n} += ${c(t)}`),e.assign(r,i._`${r}.concat(${a}[${t}])`)})),o.reportError(t,{message:n,params:i._`{errors: ${r}}`})}else u((n=>o.reportError(t,{message:c(n),params:i._`{errors: ${a}[${n}]}`})));function u(n){e.forIn("key",a,(t=>e.if(i._`${a}[${t}].length`,(()=>n(t)))))}function c(n){return i._`${n} in ${s} ? ${s}[${n}]() : ${j}[${n}]`}}(s),a&&function(n){const r=e.const("emErrors",i.stringify(n)),a=[];for(const t in n)a.push([t,M(n[t],D[t])]);const s=e.const("templates",e.object(...a)),d=e.scopeValue("obj",{ref:u,code:i.stringify(u)}),c=e.let("emPropParams"),b=e.let("emParamsErrors");e.forOf("err",f.default.vErrors,(n=>e.if(I(n,r),(()=>{e.assign(c,i._`${d}[${n}.keyword]`),e.assign(b,i._`${r}[${n}.keyword][${n}.params[${c}]]`),e.if(b,(()=>e.code(i._`${b}.push(${n})`).assign(i._`${n}.${h}`,!0)))})))),e.forIn("key",r,(n=>e.forIn("keyProp",i._`${r}[${n}]`,(a=>{e.assign(b,i._`${r}[${n}][${a}]`),e.if(i._`${b}.length`,(()=>{const r=e.const("tmpl",i._`${s}[${n}] && ${s}[${n}][${a}]`);o.reportError(t,{message:i._`${r} ? ${r}() : ${j}[${n}][${a}]`,params:i._`{errors: ${b}}`})}))}))))}(a),function(n){const{props:a,items:s}=n;if(!a&&!s)return;const u=i._`typeof ${g} == "object"`,c=i._`Array.isArray(${g})`,b=e.let("emErrors");let l,H;const A=e.let("templates");function I(n,t){e.assign(b,i.stringify(n)),e.assign(A,M(n,t))}a&&s?(l=e.let("emChildKwd"),e.if(u),e.if(c,(()=>{I(s,D.items),e.assign(l,i.str`items`)}),(()=>{I(a,D.properties),e.assign(l,i.str`properties`)})),H=i._`[${l}]`):s?(e.if(c),I(s,D.items),H=i._`.items`):a&&(e.if(r.and(u,r.not(c))),I(a,D.properties),H=i._`.properties`),e.forOf("err",f.default.vErrors,(n=>function(n,t,a){e.if(r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,i._`${n}.instancePath.indexOf(${p}) === 0`),(()=>{const r=e.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:i._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=e.const("emMatches",i._`${r}.exec(${n}.instancePath.slice(${p}.length))`),o=e.const("emChild",i._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);e.if(i._`${o} !== undefined && ${o} in ${t}`,(()=>a(o)))}))}(n,b,(t=>e.code(i._`${b}[${t}].push(${n})`).assign(i._`${n}.${h}`,!0))))),e.forIn("key",b,(n=>e.if(i._`${b}[${n}].length`,(()=>{o.reportError(t,{message:i._`${n} in ${A} ? ${A}[${n}]() : ${j}${H}[${n}]`,params:i._`{errors: ${b}[${n}]}`}),e.assign(i._`${f.default.vErrors}[${f.default.errors}-1].instancePath`,i._`${p} + "/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),e.endIf()}(function({properties:n,items:t}){const e={};if(n){e.props={};for(const t in n)e.props[t]=[]}if(t){e.items={};for(let n=0;n<t.length;n++)e.items[n]=[]}return e}(A))}const a="string"==typeof A?A:A._;a&&function(n){const a=e.const("emErrs",i._`[]`);e.forOf("err",f.default.vErrors,(n=>e.if(function(n){return r.and(i._`${n}.keyword !== ${d}`,i._`!${n}.${h}`,r.or(i._`${n}.instancePath === ${p}`,r.and(i._`${n}.instancePath.indexOf(${p}) === 0`,i._`${n}.instancePath[${p}.length] === "/"`)),i._`${n}.schemaPath.indexOf(${H.errSchemaPath}) === 0`,i._`${n}.schemaPath[${H.errSchemaPath}.length] === "/"`)}(n),(()=>e.code(i._`${a}.push(${n})`).assign(i._`${n}.${h}`,!0))))),e.if(i._`${a}.length`,(()=>o.reportError(t,{message:T(n),params:i._`{errors: ${a}}`})))}(a),n.keepErrors||function(){const n=e.const("emErrs",i._`[]`);e.forOf("err",f.default.vErrors,(t=>e.if(i._`!${t}.${h}`,(()=>e.code(i._`${n}.push(${t})`))))),e.assign(f.default.vErrors,n).assign(f.default.errors,i._`${n}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=g,n.exports=g,n.exports.default=g},5128:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=e(7159),r=e(7299),a=e(1240),s=e(4087),o="https://json-schema.org/draft/2020-12/schema";class f extends i.default{constructor(n={}){super({...n,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach((n=>this.addVocabulary(n))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:n,meta:t}=this.opts;t&&(s.default.call(this,n),this.refs["http://json-schema.org/schema"]=o)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}n.exports=t=f,Object.defineProperty(t,"__esModule",{value:!0}),t.default=f;var d=e(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var h=e(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var u=e(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var c=e(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return c.default}})},1581:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const i=e(7159),r=e(3924),a=e(1240),s=e(98),o=["/properties"],f="http://json-schema.org/draft-07/schema";class d extends i.default{_addVocabularies(){super._addVocabularies(),r.default.forEach((n=>this.addVocabulary(n))),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const n=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(n,f,!1),this.refs["http://json-schema.org/schema"]=f}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(f)?f:void 0)}}n.exports=t=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var h=e(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var u=e(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var c=e(7426);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return c.default}});var b=e(6646);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return b.default}})},7023:(n,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class i extends e{constructor(n){if(super(),!t.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=i;class r extends e{constructor(n){super(),this._items="string"==typeof n?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const n=this._items[0];return""===n||'""'===n}get str(){var n;return null!==(n=this._str)&&void 0!==n?n:this._str=this._items.reduce(((n,t)=>`${n}${t}`),"")}get names(){var n;return null!==(n=this._names)&&void 0!==n?n:this._names=this._items.reduce(((n,t)=>(t instanceof i&&(n[t.str]=(n[t.str]||0)+1),n)),{})}}function a(n,...t){const e=[n[0]];let i=0;for(;i<t.length;)f(e,t[i]),e.push(n[++i]);return new r(e)}t._Code=r,t.nil=new r(""),t._=a;const s=new r("+");function o(n,...t){const e=[h(n[0])];let i=0;for(;i<t.length;)e.push(s),f(e,t[i]),e.push(s,h(n[++i]));return function(n){let t=1;for(;t<n.length-1;){if(n[t]===s){const e=d(n[t-1],n[t+1]);if(void 0!==e){n.splice(t-1,3,e);continue}n[t++]="+"}t++}}(e),new r(e)}function f(n,t){var e;t instanceof r?n.push(...t._items):t instanceof i?n.push(t):n.push("number"==typeof(e=t)||"boolean"==typeof e||null===e?e:h(Array.isArray(e)?e.join(","):e))}function d(n,t){if('""'===t)return n;if('""'===n)return t;if("string"==typeof n){if(t instanceof i||'"'!==n[n.length-1])return;return"string"!=typeof t?`${n.slice(0,-1)}${t}"`:'"'===t[0]?n.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||n instanceof i?void 0:`"${n}${t.slice(1)}`}function h(n){return JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=o,t.addCodeArg=f,t.strConcat=function(n,t){return t.emptyStr()?n:n.emptyStr()?t:o`${n}${t}`},t.stringify=function(n){return new r(h(n))},t.safeStringify=h,t.getProperty=function(n){return"string"==typeof n&&t.IDENTIFIER.test(n)?new r(`.${n}`):a`[${n}]`},t.getEsmExportName=function(n){if("string"==typeof n&&t.IDENTIFIER.test(n))return new r(`${n}`);throw new Error(`CodeGen: invalid export name: ${n}, use explicit $id name mapping`)},t.regexpCode=function(n){return new r(n.toString())}},3487:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const i=e(7023),r=e(8490);var a=e(7023);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}});var s=e(8490);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new i._Code(">"),GTE:new i._Code(">="),LT:new i._Code("<"),LTE:new i._Code("<="),EQ:new i._Code("==="),NEQ:new i._Code("!=="),NOT:new i._Code("!"),OR:new i._Code("||"),AND:new i._Code("&&"),ADD:new i._Code("+")};class o{optimizeNodes(){return this}optimizeNames(n,t){return this}}class f extends o{constructor(n,t,e){super(),this.varKind=n,this.name=t,this.rhs=e}render({es5:n,_n:t}){const e=n?r.varKinds.var:this.varKind,i=void 0===this.rhs?"":` = ${this.rhs}`;return`${e} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,n,t)),this}get names(){return this.rhs instanceof i._CodeOrName?this.rhs.names:{}}}class d extends o{constructor(n,t,e){super(),this.lhs=n,this.rhs=t,this.sideEffects=e}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof i.Name)||n[this.lhs.str]||this.sideEffects)return this.rhs=B(this.rhs,n,t),this}get names(){return U(this.lhs instanceof i.Name?{}:{...this.lhs.names},this.rhs)}}class h extends d{constructor(n,t,e,i){super(n,e,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}}class u extends o{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}}class c extends o{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}}class b extends o{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}}class l extends o{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=B(this.code,n,t),this}get names(){return this.code instanceof i._CodeOrName?this.code.names:{}}}class g extends o{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce(((t,e)=>t+e.render(n)),"")}optimizeNodes(){const{nodes:n}=this;let t=n.length;for(;t--;){const e=n[t].optimizeNodes();Array.isArray(e)?n.splice(t,1,...e):e?n[t]=e:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){const{nodes:e}=this;let i=e.length;for(;i--;){const r=e[i];r.optimizeNames(n,t)||(R(n,r.names),e.splice(i,1))}return e.length>0?this:void 0}get names(){return this.nodes.reduce(((n,t)=>L(n,t.names)),{})}}class D extends g{render(n){return"{"+n._n+super.render(n)+"}"+n._n}}class j extends g{}class H extends D{}H.kind="else";class A extends D{constructor(n,t){super(t),this.condition=n}render(n){let t=`if(${this.condition})`+super.render(n);return this.else&&(t+="else "+this.else.render(n)),t}optimizeNodes(){super.optimizeNodes();const n=this.condition;if(!0===n)return this.nodes;let t=this.else;if(t){const n=t.optimizeNodes();t=this.else=Array.isArray(n)?new H(n):n}return t?!1===n?t instanceof A?t:t.nodes:this.nodes.length?this:new A(C(n),t instanceof A?[t]:t.nodes):!1!==n&&this.nodes.length?this:void 0}optimizeNames(n,t){var e;if(this.else=null===(e=this.else)||void 0===e?void 0:e.optimizeNames(n,t),super.optimizeNames(n,t)||this.else)return this.condition=B(this.condition,n,t),this}get names(){const n=super.names;return U(n,this.condition),this.else&&L(n,this.else.names),n}}A.kind="if";class p extends D{}p.kind="for";class I extends p{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=B(this.iteration,n,t),this}get names(){return L(super.names,this.iteration.names)}}class M extends p{constructor(n,t,e,i){super(),this.varKind=n,this.name=t,this.from=e,this.to=i}render(n){const t=n.es5?r.varKinds.var:this.varKind,{name:e,from:i,to:a}=this;return`for(${t} ${e}=${i}; ${e}<${a}; ${e}++)`+super.render(n)}get names(){const n=U(super.names,this.from);return U(n,this.to)}}class T extends p{constructor(n,t,e,i){super(),this.loop=n,this.varKind=t,this.name=e,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=B(this.iterable,n,t),this}get names(){return L(super.names,this.iterable.names)}}class m extends D{constructor(n,t,e){super(),this.name=n,this.args=t,this.async=e}render(n){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(n)}}m.kind="func";class J extends g{render(n){return"return "+super.render(n)}}J.kind="return";class P extends D{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),null===(n=this.catch)||void 0===n||n.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(n,t){var e,i;return super.optimizeNames(n,t),null===(e=this.catch)||void 0===e||e.optimizeNames(n,t),null===(i=this.finally)||void 0===i||i.optimizeNames(n,t),this}get names(){const n=super.names;return this.catch&&L(n,this.catch.names),this.finally&&L(n,this.finally.names),n}}class N extends D{constructor(n){super(),this.error=n}render(n){return`catch(${this.error})`+super.render(n)}}N.kind="catch";class w extends D{render(n){return"finally"+super.render(n)}}function L(n,t){for(const e in t)n[e]=(n[e]||0)+(t[e]||0);return n}function U(n,t){return t instanceof i._CodeOrName?L(n,t.names):n}function B(n,t,e){return n instanceof i.Name?a(n):(r=n)instanceof i._Code&&r._items.some((n=>n instanceof i.Name&&1===t[n.str]&&void 0!==e[n.str]))?new i._Code(n._items.reduce(((n,t)=>(t instanceof i.Name&&(t=a(t)),t instanceof i._Code?n.push(...t._items):n.push(t),n)),[])):n;var r;function a(n){const i=e[n.str];return void 0===i||1!==t[n.str]?n:(delete t[n.str],i)}}function R(n,t){for(const e in t)n[e]=(n[e]||0)-(t[e]||0)}function C(n){return"boolean"==typeof n||"number"==typeof n||null===n?!n:i._`!${k(n)}`}w.kind="finally",t.CodeGen=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=n,this._scope=new r.Scope({parent:n}),this._nodes=[new j]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){const e=this._extScope.value(n,t);return(this._values[e.prefix]||(this._values[e.prefix]=new Set)).add(e),e}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,e,i){const r=this._scope.toName(t);return void 0!==e&&i&&(this._constants[r.str]=e),this._leafNode(new f(n,r,e)),r}const(n,t,e){return this._def(r.varKinds.const,n,t,e)}let(n,t,e){return this._def(r.varKinds.let,n,t,e)}var(n,t,e){return this._def(r.varKinds.var,n,t,e)}assign(n,t,e){return this._leafNode(new d(n,t,e))}add(n,e){return this._leafNode(new h(n,t.operators.ADD,e))}code(n){return"function"==typeof n?n():n!==i.nil&&this._leafNode(new l(n)),this}object(...n){const t=["{"];for(const[e,r]of n)t.length>1&&t.push(","),t.push(e),(e!==r||this.opts.es5)&&(t.push(":"),(0,i.addCodeArg)(t,r));return t.push("}"),new i._Code(t)}if(n,t,e){if(this._blockNode(new A(n)),t&&e)this.code(t).else().code(e).endIf();else if(t)this.code(t).endIf();else if(e)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new A(n))}else(){return this._elseNode(new H)}endIf(){return this._endBlockNode(A,H)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new I(n),t)}forRange(n,t,e,i,a=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const s=this._scope.toName(n);return this._for(new M(a,s,t,e),(()=>i(s)))}forOf(n,t,e,a=r.varKinds.const){const s=this._scope.toName(n);if(this.opts.es5){const n=t instanceof i.Name?t:this.var("_arr",t);return this.forRange("_i",0,i._`${n}.length`,(t=>{this.var(s,i._`${n}[${t}]`),e(s)}))}return this._for(new T("of",a,s,t),(()=>e(s)))}forIn(n,t,e,a=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(n,i._`Object.keys(${t})`,e);const s=this._scope.toName(n);return this._for(new T("in",a,s,t),(()=>e(s)))}endFor(){return this._endBlockNode(p)}label(n){return this._leafNode(new u(n))}break(n){return this._leafNode(new c(n))}return(n){const t=new J;if(this._blockNode(t),this.code(n),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(J)}try(n,t,e){if(!t&&!e)throw new Error('CodeGen: "try" without "catch" and "finally"');const i=new P;if(this._blockNode(i),this.code(n),t){const n=this.name("e");this._currNode=i.catch=new N(n),t(n)}return e&&(this._currNode=i.finally=new w,this.code(e)),this._endBlockNode(N,w)}throw(n){return this._leafNode(new b(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const e=this._nodes.length-t;if(e<0||void 0!==n&&e!==n)throw new Error(`CodeGen: wrong number of nodes: ${e} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=i.nil,e,r){return this._blockNode(new m(n,t,e)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(m)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){const e=this._currNode;if(e instanceof n||t&&e instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){const t=this._currNode;if(!(t instanceof A))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){const n=this._nodes;return n[n.length-1]}set _currNode(n){const t=this._nodes;t[t.length-1]=n}},t.not=C;const y=Q(t.operators.AND);t.and=function(...n){return n.reduce(y)};const E=Q(t.operators.OR);function Q(n){return(t,e)=>t===i.nil?e:e===i.nil?t:i._`${k(t)} ${n} ${k(e)}`}function k(n){return n instanceof i.Name?n:i._`(${n})`}t.or=function(...n){return n.reduce(E)}},8490:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const i=e(7023);class r extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}}var a;!function(n){n[n.Started=0]="Started",n[n.Completed=1]="Completed"}(a=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new i.Name("const"),let:new i.Name("let"),var:new i.Name("var")};class s{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof i.Name?n:this.name(n)}name(n){return new i.Name(this._newName(n))}_newName(n){return`${n}${(this._names[n]||this._nameGroup(n)).index++}`}_nameGroup(n){var t,e;if((null===(e=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===e?void 0:e.has(n))||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}}t.Scope=s;class o extends i.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:e}){this.value=n,this.scopePath=i._`.${new i.Name(t)}[${e}]`}}t.ValueScopeName=o;const f=i._`\n`;t.ValueScope=class extends s{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts={...n,_n:n.lines?f:i.nil}}get(){return this._scope}name(n){return new o(n,this._newName(n))}value(n,t){var e;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const i=this.toName(n),{prefix:r}=i,a=null!==(e=t.key)&&void 0!==e?e:t.ref;let s=this._values[r];if(s){const n=s.get(a);if(n)return n}else s=this._values[r]=new Map;s.set(a,i);const o=this._scope[r]||(this._scope[r]=[]),f=o.length;return o[f]=t.ref,i.setValue(t,{property:r,itemIndex:f}),i}getValue(n,t){const e=this._values[n];if(e)return e.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return i._`${n}${t.scopePath}`}))}scopeCode(n=this._values,t,e){return this._reduceValues(n,(n=>{if(void 0===n.value)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code}),t,e)}_reduceValues(n,e,s={},o){let f=i.nil;for(const d in n){const h=n[d];if(!h)continue;const u=s[d]=s[d]||new Map;h.forEach((n=>{if(u.has(n))return;u.set(n,a.Started);let s=e(n);if(s){const e=this.opts.es5?t.varKinds.var:t.varKinds.const;f=i._`${f}${e} ${n} = ${s};${this.opts._n}`}else{if(!(s=null==o?void 0:o(n)))throw new r(n);f=i._`${f}${s}${this.opts._n}`}u.set(n,a.Completed)}))}return f}}},4181:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const i=e(3487),r=e(6776),a=e(2141);function s(n,t){const e=n.const("err",t);n.if(i._`${a.default.vErrors} === null`,(()=>n.assign(a.default.vErrors,i._`[${e}]`)),i._`${a.default.vErrors}.push(${e})`),n.code(i._`${a.default.errors}++`)}function o(n,t){const{gen:e,validateName:r,schemaEnv:a}=n;a.$async?e.throw(i._`new ${n.ValidationError}(${t})`):(e.assign(i._`${r}.errors`,t),e.return(!1))}t.keywordError={message:({keyword:n})=>i.str`must pass "${n}" keyword validation`},t.keyword$DataError={message:({keyword:n,schemaType:t})=>t?i.str`"${n}" keyword must be ${t} ($data)`:i.str`"${n}" keyword is invalid ($data)`},t.reportError=function(n,e=t.keywordError,r,a){const{it:f}=n,{gen:h,compositeRule:u,allErrors:c}=f,b=d(n,e,r);(null!=a?a:u||c)?s(h,b):o(f,i._`[${b}]`)},t.reportExtraError=function(n,e=t.keywordError,i){const{it:r}=n,{gen:f,compositeRule:h,allErrors:u}=r;s(f,d(n,e,i)),h||u||o(r,a.default.vErrors)},t.resetErrorsCount=function(n,t){n.assign(a.default.errors,t),n.if(i._`${a.default.vErrors} !== null`,(()=>n.if(t,(()=>n.assign(i._`${a.default.vErrors}.length`,t)),(()=>n.assign(a.default.vErrors,null)))))},t.extendErrors=function({gen:n,keyword:t,schemaValue:e,data:r,errsCount:s,it:o}){if(void 0===s)throw new Error("ajv implementation error");const f=n.name("err");n.forRange("i",s,a.default.errors,(s=>{n.const(f,i._`${a.default.vErrors}[${s}]`),n.if(i._`${f}.instancePath === undefined`,(()=>n.assign(i._`${f}.instancePath`,(0,i.strConcat)(a.default.instancePath,o.errorPath)))),n.assign(i._`${f}.schemaPath`,i.str`${o.errSchemaPath}/${t}`),o.opts.verbose&&(n.assign(i._`${f}.schema`,e),n.assign(i._`${f}.data`,r))}))};const f={keyword:new i.Name("keyword"),schemaPath:new i.Name("schemaPath"),params:new i.Name("params"),propertyName:new i.Name("propertyName"),message:new i.Name("message"),schema:new i.Name("schema"),parentSchema:new i.Name("parentSchema")};function d(n,t,e){const{createErrors:r}=n.it;return!1===r?i._`{}`:function(n,t,e={}){const{gen:r,it:s}=n,o=[h(s,e),u(n,e)];return function(n,{params:t,message:e},r){const{keyword:s,data:o,schemaValue:d,it:h}=n,{opts:u,propertyName:c,topSchemaRef:b,schemaPath:l}=h;r.push([f.keyword,s],[f.params,"function"==typeof t?t(n):t||i._`{}`]),u.messages&&r.push([f.message,"function"==typeof e?e(n):e]),u.verbose&&r.push([f.schema,d],[f.parentSchema,i._`${b}${l}`],[a.default.data,o]),c&&r.push([f.propertyName,c])}(n,t,o),r.object(...o)}(n,t,e)}function h({errorPath:n},{instancePath:t}){const e=t?i.str`${n}${(0,r.getErrorPath)(t,r.Type.Str)}`:n;return[a.default.instancePath,(0,i.strConcat)(a.default.instancePath,e)]}function u({keyword:n,it:{errSchemaPath:t}},{schemaPath:e,parentSchema:a}){let s=a?t:i.str`${t}/${n}`;return e&&(s=i.str`${s}${(0,r.getErrorPath)(e,r.Type.Str)}`),[f.schemaPath,s]}},5173:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const i=e(3487),r=e(7426),a=e(2141),s=e(2531),o=e(6776),f=e(4815);class d{constructor(n){var t;let e;this.refs={},this.dynamicAnchors={},"object"==typeof n.schema&&(e=n.schema),this.schema=n.schema,this.schemaId=n.schemaId,this.root=n.root||this,this.baseId=null!==(t=n.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==e?void 0:e[n.schemaId||"$id"]),this.schemaPath=n.schemaPath,this.localRefs=n.localRefs,this.meta=n.meta,this.$async=null==e?void 0:e.$async,this.refs={}}}function h(n){const t=c.call(this,n);if(t)return t;const e=(0,s.getFullPath)(this.opts.uriResolver,n.root.baseId),{es5:o,lines:d}=this.opts.code,{ownProperties:h}=this.opts,u=new i.CodeGen(this.scope,{es5:o,lines:d,ownProperties:h});let b;n.$async&&(b=u.scopeValue("Error",{ref:r.default,code:i._`require("ajv/dist/runtime/validation_error").default`}));const l=u.scopeName("validate");n.validateName=l;const g={gen:u,allErrors:this.opts.allErrors,data:a.default.data,parentData:a.default.parentData,parentDataProperty:a.default.parentDataProperty,dataNames:[a.default.data],dataPathArr:[i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:n.schema,code:(0,i.stringify)(n.schema)}:{ref:n.schema}),validateName:l,ValidationError:b,schema:n.schema,schemaEnv:n,rootId:e,baseId:n.baseId||e,schemaPath:i.nil,errSchemaPath:n.schemaPath||(this.opts.jtd?"":"#"),errorPath:i._`""`,opts:this.opts,self:this};let D;try{this._compilations.add(n),(0,f.validateFunctionCode)(g),u.optimize(this.opts.code.optimize);const t=u.toString();D=`${u.scopeRefs(a.default.scope)}return ${t}`,this.opts.code.process&&(D=this.opts.code.process(D,n));const e=new Function(`${a.default.self}`,`${a.default.scope}`,D)(this,this.scope.get());if(this.scope.value(l,{ref:e}),e.errors=null,e.schema=n.schema,e.schemaEnv=n,n.$async&&(e.$async=!0),!0===this.opts.code.source&&(e.source={validateName:l,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:n,items:t}=g;e.evaluated={props:n instanceof i.Name?void 0:n,items:t instanceof i.Name?void 0:t,dynamicProps:n instanceof i.Name,dynamicItems:t instanceof i.Name},e.source&&(e.source.evaluated=(0,i.stringify)(e.evaluated))}return n.validate=e,n}catch(t){throw delete n.validate,delete n.validateName,D&&this.logger.error("Error compiling schema, function code:",D),t}finally{this._compilations.delete(n)}}function u(n){return(0,s.inlineRef)(n.schema,this.opts.inlineRefs)?n.schema:n.validate?n:h.call(this,n)}function c(n){for(const i of this._compilations)if(e=n,(t=i).schema===e.schema&&t.root===e.root&&t.baseId===e.baseId)return i;var t,e}function b(n,t){let e;for(;"string"==typeof(e=this.refs[t]);)t=e;return e||this.schemas[t]||l.call(this,n,t)}function l(n,t){const e=this.opts.uriResolver.parse(t),i=(0,s._getFullPath)(this.opts.uriResolver,e);let r=(0,s.getFullPath)(this.opts.uriResolver,n.baseId,void 0);if(Object.keys(n.schema).length>0&&i===r)return D.call(this,e,n);const a=(0,s.normalizeId)(i),o=this.refs[a]||this.schemas[a];if("string"==typeof o){const t=l.call(this,n,o);if("object"!=typeof(null==t?void 0:t.schema))return;return D.call(this,e,t)}if("object"==typeof(null==o?void 0:o.schema)){if(o.validate||h.call(this,o),a===(0,s.normalizeId)(t)){const{schema:t}=o,{schemaId:e}=this.opts,i=t[e];return i&&(r=(0,s.resolveUrl)(this.opts.uriResolver,r,i)),new d({schema:t,schemaId:e,root:n,baseId:r})}return D.call(this,e,o)}}t.SchemaEnv=d,t.compileSchema=h,t.resolveRef=function(n,t,e){var i;e=(0,s.resolveUrl)(this.opts.uriResolver,t,e);const r=n.refs[e];if(r)return r;let a=b.call(this,n,e);if(void 0===a){const r=null===(i=n.localRefs)||void 0===i?void 0:i[e],{schemaId:s}=this.opts;r&&(a=new d({schema:r,schemaId:s,root:n,baseId:t}))}return void 0!==a?n.refs[e]=u.call(this,a):void 0},t.getCompilingSchema=c,t.resolveSchema=l;const g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function D(n,{baseId:t,schema:e,root:i}){var r;if("/"!==(null===(r=n.fragment)||void 0===r?void 0:r[0]))return;for(const i of n.fragment.slice(1).split("/")){if("boolean"==typeof e)return;const n=e[(0,o.unescapeFragment)(i)];if(void 0===n)return;const r="object"==typeof(e=n)&&e[this.opts.schemaId];!g.has(i)&&r&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,r))}let a;if("boolean"!=typeof e&&e.$ref&&!(0,o.schemaHasRulesButRef)(e,this.RULES)){const n=(0,s.resolveUrl)(this.opts.uriResolver,t,e.$ref);a=l.call(this,i,n)}const{schemaId:f}=this.opts;return a=a||new d({schema:e,schemaId:f,root:i,baseId:t}),a.schema!==a.root.schema?a:void 0}},2141:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(3487),r={data:new i.Name("data"),valCxt:new i.Name("valCxt"),instancePath:new i.Name("instancePath"),parentData:new i.Name("parentData"),parentDataProperty:new i.Name("parentDataProperty"),rootData:new i.Name("rootData"),dynamicAnchors:new i.Name("dynamicAnchors"),vErrors:new i.Name("vErrors"),errors:new i.Name("errors"),this:new i.Name("this"),self:new i.Name("self"),scope:new i.Name("scope"),json:new i.Name("json"),jsonPos:new i.Name("jsonPos"),jsonLen:new i.Name("jsonLen"),jsonPart:new i.Name("jsonPart")};t.default=r},6646:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(2531);class r extends Error{constructor(n,t,e,r){super(r||`can't resolve reference ${e} from id ${t}`),this.missingRef=(0,i.resolveUrl)(n,t,e),this.missingSchema=(0,i.normalizeId)((0,i.getFullPath)(n,this.missingRef))}}t.default=r},2531:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const i=e(6776),r=e(4063),a=e(9461),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(n,t=!0){return"boolean"==typeof n||(!0===t?!f(n):!!t&&d(n)<=t)};const o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function f(n){for(const t in n){if(o.has(t))return!0;const e=n[t];if(Array.isArray(e)&&e.some(f))return!0;if("object"==typeof e&&f(e))return!0}return!1}function d(n){let t=0;for(const e in n){if("$ref"===e)return 1/0;if(t++,!s.has(e)&&("object"==typeof n[e]&&(0,i.eachItem)(n[e],(n=>t+=d(n))),t===1/0))return 1/0}return t}function h(n,t="",e){!1!==e&&(t=b(t));const i=n.parse(t);return u(n,i)}function u(n,t){return n.serialize(t).split("#")[0]+"#"}t.getFullPath=h,t._getFullPath=u;const c=/#\/?$/;function b(n){return n?n.replace(c,""):""}t.normalizeId=b,t.resolveUrl=function(n,t,e){return e=b(e),n.resolve(t,e)};const l=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(n,t){if("boolean"==typeof n)return{};const{schemaId:e,uriResolver:i}=this.opts,s=b(n[e]||t),o={"":s},f=h(i,s,!1),d={},u=new Set;return a(n,{allKeys:!0},((n,t,i,r)=>{if(void 0===r)return;const a=f+t;let s=o[r];function h(t){const e=this.opts.uriResolver.resolve;if(t=b(s?e(s,t):t),u.has(t))throw g(t);u.add(t);let i=this.refs[t];return"string"==typeof i&&(i=this.refs[i]),"object"==typeof i?c(n,i.schema,t):t!==b(a)&&("#"===t[0]?(c(n,d[t],t),d[t]=n):this.refs[t]=a),t}function D(n){if("string"==typeof n){if(!l.test(n))throw new Error(`invalid anchor "${n}"`);h.call(this,`#${n}`)}}"string"==typeof n[e]&&(s=h.call(this,n[e])),D.call(this,n.$anchor),D.call(this,n.$dynamicAnchor),o[t]=s})),d;function c(n,t,e){if(void 0!==t&&!r(n,t))throw g(e)}function g(n){return new Error(`reference "${n}" resolves to more than one schema`)}}},3141:(n,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(n){return"string"==typeof n&&e.has(n)},t.getRules=function(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}},6776:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const i=e(3487),r=e(7023);function a(n,t=n.schema){const{opts:e,self:i}=n;if(!e.strictSchema)return;if("boolean"==typeof t)return;const r=i.RULES.keywords;for(const e in t)r[e]||l(n,`unknown keyword: "${e}"`)}function s(n,t){if("boolean"==typeof n)return!n;for(const e in n)if(t[e])return!0;return!1}function o(n){return"number"==typeof n?`${n}`:n.replace(/~/g,"~0").replace(/\//g,"~1")}function f(n){return n.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:n,mergeToName:t,mergeValues:e,resultToName:r}){return(a,s,o,f)=>{const d=void 0===o?s:o instanceof i.Name?(s instanceof i.Name?n(a,s,o):t(a,s,o),o):s instanceof i.Name?(t(a,o,s),s):e(s,o);return f!==i.Name||d instanceof i.Name?d:r(a,d)}}function h(n,t){if(!0===t)return n.var("props",!0);const e=n.var("props",i._`{}`);return void 0!==t&&u(n,e,t),e}function u(n,t,e){Object.keys(e).forEach((e=>n.assign(i._`${t}${(0,i.getProperty)(e)}`,!0)))}t.toHash=function(n){const t={};for(const e of n)t[e]=!0;return t},t.alwaysValidSchema=function(n,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(a(n,t),!s(t,n.self.RULES.all))},t.checkUnknownRules=a,t.schemaHasRules=s,t.schemaHasRulesButRef=function(n,t){if("boolean"==typeof n)return!n;for(const e in n)if("$ref"!==e&&t.all[e])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:n,schemaPath:t},e,r,a){if(!a){if("number"==typeof e||"boolean"==typeof e)return e;if("string"==typeof e)return i._`${e}`}return i._`${n}${t}${(0,i.getProperty)(r)}`},t.unescapeFragment=function(n){return f(decodeURIComponent(n))},t.escapeFragment=function(n){return encodeURIComponent(o(n))},t.escapeJsonPointer=o,t.unescapeJsonPointer=f,t.eachItem=function(n,t){if(Array.isArray(n))for(const e of n)t(e);else t(n)},t.mergeEvaluated={props:d({mergeNames:(n,t,e)=>n.if(i._`${e} !== true && ${t} !== undefined`,(()=>{n.if(i._`${t} === true`,(()=>n.assign(e,!0)),(()=>n.assign(e,i._`${e} || {}`).code(i._`Object.assign(${e}, ${t})`)))})),mergeToName:(n,t,e)=>n.if(i._`${e} !== true`,(()=>{!0===t?n.assign(e,!0):(n.assign(e,i._`${e} || {}`),u(n,e,t))})),mergeValues:(n,t)=>!0===n||{...n,...t},resultToName:h}),items:d({mergeNames:(n,t,e)=>n.if(i._`${e} !== true && ${t} !== undefined`,(()=>n.assign(e,i._`${t} === true ? true : ${e} > ${t} ? ${e} : ${t}`))),mergeToName:(n,t,e)=>n.if(i._`${e} !== true`,(()=>n.assign(e,!0===t||i._`${e} > ${t} ? ${e} : ${t}`))),mergeValues:(n,t)=>!0===n||Math.max(n,t),resultToName:(n,t)=>n.var("items",t)})},t.evaluatedPropsToName=h,t.setEvaluated=u;const c={};var b;function l(n,t,e=n.opts.strictSchema){if(e){if(t=`strict mode: ${t}`,!0===e)throw new Error(t);n.self.logger.warn(t)}}t.useFunc=function(n,t){return n.scopeValue("func",{ref:t,code:c[t.code]||(c[t.code]=new r._Code(t.code))})},function(n){n[n.Num=0]="Num",n[n.Str=1]="Str"}(b=t.Type||(t.Type={})),t.getErrorPath=function(n,t,e){if(n instanceof i.Name){const r=t===b.Num;return e?r?i._`"[" + ${n} + "]"`:i._`"['" + ${n} + "']"`:r?i._`"/" + ${n}`:i._`"/" + ${n}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return e?(0,i.getProperty)(n).toString():"/"+o(n)},t.checkStrictMode=l},8876:(n,t)=>{"use strict";function e(n,t){return t.rules.some((t=>i(n,t)))}function i(n,t){var e;return void 0!==n[t.keyword]||(null===(e=t.definition.implements)||void 0===e?void 0:e.some((t=>void 0!==n[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:n,self:t},i){const r=t.RULES.types[i];return r&&!0!==r&&e(n,r)},t.shouldUseGroup=e,t.shouldUseRule=i},5667:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const i=e(4181),r=e(3487),a=e(2141),s={message:"boolean schema is false"};function o(n,t){const{gen:e,data:r}=n,a={gen:e,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:n};(0,i.reportError)(a,s,void 0,t)}t.topBoolOrEmptySchema=function(n){const{gen:t,schema:e,validateName:i}=n;!1===e?o(n,!1):"object"==typeof e&&!0===e.$async?t.return(a.default.data):(t.assign(r._`${i}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(n,t){const{gen:e,schema:i}=n;!1===i?(e.var(t,!1),o(n)):e.var(t,!0)}},453:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const i=e(3141),r=e(8876),a=e(4181),s=e(3487),o=e(6776);var f;function d(n){const t=Array.isArray(n)?n:n?[n]:[];if(t.every(i.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(n){n[n.Correct=0]="Correct",n[n.Wrong=1]="Wrong"}(f=t.DataType||(t.DataType={})),t.getSchemaTypes=function(n){const t=d(n.type);if(t.includes("null")){if(!1===n.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==n.nullable)throw new Error('"nullable" cannot be used without "type"');!0===n.nullable&&t.push("null")}return t},t.getJSONTypes=d,t.coerceAndCheckDataType=function(n,t){const{gen:e,data:i,opts:a}=n,o=function(n,t){return t?n.filter((n=>h.has(n)||"array"===t&&"array"===n)):[]}(t,a.coerceTypes),d=t.length>0&&!(0===o.length&&1===t.length&&(0,r.schemaHasRulesForType)(n,t[0]));if(d){const r=c(t,i,a.strictNumbers,f.Wrong);e.if(r,(()=>{o.length?function(n,t,e){const{gen:i,data:r,opts:a}=n,o=i.let("dataType",s._`typeof ${r}`),f=i.let("coerced",s._`undefined`);"array"===a.coerceTypes&&i.if(s._`${o} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,(()=>i.assign(r,s._`${r}[0]`).assign(o,s._`typeof ${r}`).if(c(t,r,a.strictNumbers),(()=>i.assign(f,r))))),i.if(s._`${f} !== undefined`);for(const n of e)(h.has(n)||"array"===n&&"array"===a.coerceTypes)&&d(n);function d(n){switch(n){case"string":return void i.elseIf(s._`${o} == "number" || ${o} == "boolean"`).assign(f,s._`"" + ${r}`).elseIf(s._`${r} === null`).assign(f,s._`""`);case"number":return void i.elseIf(s._`${o} == "boolean" || ${r} === null
3
3
  || (${o} == "string" && ${r} && ${r} == +${r})`).assign(f,s._`+${r}`);case"integer":return void i.elseIf(s._`${o} === "boolean" || ${r} === null
4
4
  || (${o} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(f,s._`+${r}`);case"boolean":return void i.elseIf(s._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(f,!1).elseIf(s._`${r} === "true" || ${r} === 1`).assign(f,!0);case"null":return i.elseIf(s._`${r} === "" || ${r} === 0 || ${r} === false`),void i.assign(f,null);case"array":i.elseIf(s._`${o} === "string" || ${o} === "number"
5
5
  || ${o} === "boolean" || ${r} === null`).assign(f,s._`[${r}]`)}}i.else(),l(n),i.endIf(),i.if(s._`${f} !== undefined`,(()=>{i.assign(r,f),function({gen:n,parentData:t,parentDataProperty:e},i){n.if(s._`${t} !== undefined`,(()=>n.assign(s._`${t}[${e}]`,i)))}(n,f)}))}(n,t,o):l(n)}))}return d};const h=new Set(["string","number","integer","boolean","null"]);function u(n,t,e,i=f.Correct){const r=i===f.Correct?s.operators.EQ:s.operators.NEQ;let a;switch(n){case"null":return s._`${t} ${r} null`;case"array":a=s._`Array.isArray(${t})`;break;case"object":a=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":a=o(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":a=o();break;default:return s._`typeof ${t} ${r} ${n}`}return i===f.Correct?a:(0,s.not)(a);function o(n=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,n,e?s._`isFinite(${t})`:s.nil)}}function c(n,t,e,i){if(1===n.length)return u(n[0],t,e,i);let r;const a=(0,o.toHash)(n);if(a.array&&a.object){const n=s._`typeof ${t} != "object"`;r=a.null?n:s._`!${t} || ${n}`,delete a.null,delete a.array,delete a.object}else r=s.nil;a.number&&delete a.integer;for(const n in a)r=(0,s.and)(r,u(n,t,e,i));return r}t.checkDataType=u,t.checkDataTypes=c;const b={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:t})=>"string"==typeof n?s._`{type: ${n}}`:s._`{type: ${t}}`};function l(n){const t=function(n){const{gen:t,data:e,schema:i}=n,r=(0,o.schemaRefOrVal)(n,i,"type");return{gen:t,keyword:"type",data:e,schema:i.type,schemaCode:r,schemaValue:r,parentSchema:i,params:{},it:n}}(n);(0,a.reportError)(t,b)}t.reportTypeError=l},313:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const i=e(3487),r=e(6776);function a(n,t,e){const{gen:a,compositeRule:s,data:o,opts:f}=n;if(void 0===e)return;const d=i._`${o}${(0,i.getProperty)(t)}`;if(s)return void(0,r.checkStrictMode)(n,`default is ignored for: ${d}`);let h=i._`${d} === undefined`;"empty"===f.useDefaults&&(h=i._`${h} || ${d} === null || ${d} === ""`),a.if(h,i._`${d} = ${(0,i.stringify)(e)}`)}t.assignDefaults=function(n,t){const{properties:e,items:i}=n.schema;if("object"===t&&e)for(const t in e)a(n,t,e[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,e)=>a(n,e,t.default)))}},4815:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const i=e(5667),r=e(453),a=e(8876),s=e(453),o=e(313),f=e(5005),d=e(3099),h=e(3487),u=e(2141),c=e(2531),b=e(6776),l=e(4181);function g({gen:n,validateName:t,schema:e,schemaEnv:i,opts:r},a){r.code.es5?n.func(t,h._`${u.default.data}, ${u.default.valCxt}`,i.$async,(()=>{n.code(h._`"use strict"; ${D(e,r)}`),function(n,t){n.if(u.default.valCxt,(()=>{n.var(u.default.instancePath,h._`${u.default.valCxt}.${u.default.instancePath}`),n.var(u.default.parentData,h._`${u.default.valCxt}.${u.default.parentData}`),n.var(u.default.parentDataProperty,h._`${u.default.valCxt}.${u.default.parentDataProperty}`),n.var(u.default.rootData,h._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&n.var(u.default.dynamicAnchors,h._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{n.var(u.default.instancePath,h._`""`),n.var(u.default.parentData,h._`undefined`),n.var(u.default.parentDataProperty,h._`undefined`),n.var(u.default.rootData,u.default.data),t.dynamicRef&&n.var(u.default.dynamicAnchors,h._`{}`)}))}(n,r),n.code(a)})):n.func(t,h._`${u.default.data}, ${function(n){return h._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${n.dynamicRef?h._`, ${u.default.dynamicAnchors}={}`:h.nil}}={}`}(r)}`,i.$async,(()=>n.code(D(e,r)).code(a)))}function D(n,t){const e="object"==typeof n&&n[t.schemaId];return e&&(t.code.source||t.code.process)?h._`/*# sourceURL=${e} */`:h.nil}function j({schema:n,self:t}){if("boolean"==typeof n)return!n;for(const e in n)if(t.RULES.all[e])return!0;return!1}function H(n){return"boolean"!=typeof n.schema}function A(n){(0,b.checkUnknownRules)(n),function(n){const{schema:t,errSchemaPath:e,opts:i,self:r}=n;t.$ref&&i.ignoreKeywordsWithRef&&(0,b.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${e}"`)}(n)}function p(n,t){if(n.opts.jtd)return M(n,[],!1,t);const e=(0,r.getSchemaTypes)(n.schema);M(n,e,!(0,r.coerceAndCheckDataType)(n,e),t)}function I({gen:n,schemaEnv:t,schema:e,errSchemaPath:i,opts:r}){const a=e.$comment;if(!0===r.$comment)n.code(h._`${u.default.self}.logger.log(${a})`);else if("function"==typeof r.$comment){const e=h.str`${i}/$comment`,r=n.scopeValue("root",{ref:t.root});n.code(h._`${u.default.self}.opts.$comment(${a}, ${e}, ${r}.schema)`)}}function M(n,t,e,i){const{gen:r,schema:o,data:f,allErrors:d,opts:c,self:l}=n,{RULES:g}=l;function D(b){(0,a.shouldUseGroup)(o,b)&&(b.type?(r.if((0,s.checkDataType)(b.type,f,c.strictNumbers)),T(n,b),1===t.length&&t[0]===b.type&&e&&(r.else(),(0,s.reportTypeError)(n)),r.endIf()):T(n,b),d||r.if(h._`${u.default.errors} === ${i||0}`))}!o.$ref||!c.ignoreKeywordsWithRef&&(0,b.schemaHasRulesButRef)(o,g)?(c.jtd||function(n,t){!n.schemaEnv.meta&&n.opts.strictTypes&&(function(n,t){t.length&&(n.dataTypes.length?(t.forEach((t=>{m(n.dataTypes,t)||J(n,`type "${t}" not allowed by context "${n.dataTypes.join(",")}"`)})),function(n,t){const e=[];for(const i of n.dataTypes)m(t,i)?e.push(i):t.includes("integer")&&"number"===i&&e.push("integer");n.dataTypes=e}(n,t)):n.dataTypes=t)}(n,t),n.opts.allowUnionTypes||function(n,t){t.length>1&&(2!==t.length||!t.includes("null"))&&J(n,"use allowUnionTypes to allow union type keyword")}(n,t),function(n,t){const e=n.self.RULES.all;for(const i in e){const r=e[i];if("object"==typeof r&&(0,a.shouldUseRule)(n.schema,r)){const{type:e}=r.definition;e.length&&!e.some((n=>{return i=n,(e=t).includes(i)||"number"===i&&e.includes("integer");var e,i}))&&J(n,`missing type "${e.join(",")}" for keyword "${i}"`)}}}(n,n.dataTypes))}(n,t),r.block((()=>{for(const n of g.rules)D(n);D(g.post)}))):r.block((()=>N(n,"$ref",g.all.$ref.definition)))}function T(n,t){const{gen:e,schema:i,opts:{useDefaults:r}}=n;r&&(0,o.assignDefaults)(n,t.type),e.block((()=>{for(const e of t.rules)(0,a.shouldUseRule)(i,e)&&N(n,e.keyword,e.definition,t.type)}))}function m(n,t){return n.includes(t)||"integer"===t&&n.includes("number")}function J(n,t){t+=` at "${n.schemaEnv.baseId+n.errSchemaPath}" (strictTypes)`,(0,b.checkStrictMode)(n,t,n.opts.strictTypes)}t.validateFunctionCode=function(n){H(n)&&(A(n),j(n))?function(n){const{schema:t,opts:e,gen:i}=n;g(n,(()=>{e.$comment&&t.$comment&&I(n),function(n){const{schema:t,opts:e}=n;void 0!==t.default&&e.useDefaults&&e.strictSchema&&(0,b.checkStrictMode)(n,"default is ignored in the schema root")}(n),i.let(u.default.vErrors,null),i.let(u.default.errors,0),e.unevaluated&&function(n){const{gen:t,validateName:e}=n;n.evaluated=t.const("evaluated",h._`${e}.evaluated`),t.if(h._`${n.evaluated}.dynamicProps`,(()=>t.assign(h._`${n.evaluated}.props`,h._`undefined`))),t.if(h._`${n.evaluated}.dynamicItems`,(()=>t.assign(h._`${n.evaluated}.items`,h._`undefined`)))}(n),p(n),function(n){const{gen:t,schemaEnv:e,validateName:i,ValidationError:r,opts:a}=n;e.$async?t.if(h._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(h._`new ${r}(${u.default.vErrors})`))):(t.assign(h._`${i}.errors`,u.default.vErrors),a.unevaluated&&function({gen:n,evaluated:t,props:e,items:i}){e instanceof h.Name&&n.assign(h._`${t}.props`,e),i instanceof h.Name&&n.assign(h._`${t}.items`,i)}(n),t.return(h._`${u.default.errors} === 0`))}(n)}))}(n):g(n,(()=>(0,i.topBoolOrEmptySchema)(n)))};class P{constructor(n,t,e){if((0,f.validateKeywordUsage)(n,t,e),this.gen=n.gen,this.allErrors=n.allErrors,this.keyword=e,this.data=n.data,this.schema=n.schema[e],this.$data=t.$data&&n.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,b.schemaRefOrVal)(n,this.schema,e,this.$data),this.schemaType=t.schemaType,this.parentSchema=n.schema,this.params={},this.it=n,this.def=t,this.$data)this.schemaCode=n.gen.const("vSchema",U(this.$data,n));else if(this.schemaCode=this.schemaValue,!(0,f.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${e} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=n.gen.const("_errs",u.default.errors))}result(n,t,e){this.failResult((0,h.not)(n),t,e)}failResult(n,t,e){this.gen.if(n),e?e():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(n,t){this.failResult((0,h.not)(n),void 0,t)}fail(n){if(void 0===n)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(n),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(n){if(!this.$data)return this.fail(n);const{schemaCode:t}=this;this.fail(h._`${t} !== undefined && (${(0,h.or)(this.invalid$data(),n)})`)}error(n,t,e){if(t)return this.setParams(t),this._error(n,e),void this.setParams({});this._error(n,e)}_error(n,t){(n?l.reportExtraError:l.reportError)(this,this.def.error,t)}$dataError(){(0,l.reportError)(this,this.def.$dataError||l.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,l.resetErrorsCount)(this.gen,this.errsCount)}ok(n){this.allErrors||this.gen.if(n)}setParams(n,t){t?Object.assign(this.params,n):this.params=n}block$data(n,t,e=h.nil){this.gen.block((()=>{this.check$data(n,e),t()}))}check$data(n=h.nil,t=h.nil){if(!this.$data)return;const{gen:e,schemaCode:i,schemaType:r,def:a}=this;e.if((0,h.or)(h._`${i} === undefined`,t)),n!==h.nil&&e.assign(n,!0),(r.length||a.validateSchema)&&(e.elseIf(this.invalid$data()),this.$dataError(),n!==h.nil&&e.assign(n,!1)),e.else()}invalid$data(){const{gen:n,schemaCode:t,schemaType:e,def:i,it:r}=this;return(0,h.or)(function(){if(e.length){if(!(t instanceof h.Name))throw new Error("ajv implementation error");const n=Array.isArray(e)?e:[e];return h._`${(0,s.checkDataTypes)(n,t,r.opts.strictNumbers,s.DataType.Wrong)}`}return h.nil}(),function(){if(i.validateSchema){const e=n.scopeValue("validate$data",{ref:i.validateSchema});return h._`!${e}(${t})`}return h.nil}())}subschema(n,t){const e=(0,d.getSubschema)(this.it,n);(0,d.extendSubschemaData)(e,this.it,n),(0,d.extendSubschemaMode)(e,n);const r={...this.it,...e,items:void 0,props:void 0};return function(n,t){H(n)&&(A(n),j(n))?function(n,t){const{schema:e,gen:i,opts:r}=n;r.$comment&&e.$comment&&I(n),function(n){const t=n.schema[n.opts.schemaId];t&&(n.baseId=(0,c.resolveUrl)(n.opts.uriResolver,n.baseId,t))}(n),function(n){if(n.schema.$async&&!n.schemaEnv.$async)throw new Error("async schema in sync schema")}(n);const a=i.const("_errs",u.default.errors);p(n,a),i.var(t,h._`${a} === ${u.default.errors}`)}(n,t):(0,i.boolOrEmptySchema)(n,t)}(r,t),r}mergeEvaluated(n,t){const{it:e,gen:i}=this;e.opts.unevaluated&&(!0!==e.props&&void 0!==n.props&&(e.props=b.mergeEvaluated.props(i,n.props,e.props,t)),!0!==e.items&&void 0!==n.items&&(e.items=b.mergeEvaluated.items(i,n.items,e.items,t)))}mergeValidEvaluated(n,t){const{it:e,gen:i}=this;if(e.opts.unevaluated&&(!0!==e.props||!0!==e.items))return i.if(t,(()=>this.mergeEvaluated(n,h.Name))),!0}}function N(n,t,e,i){const r=new P(n,e,t);"code"in e?e.code(r,i):r.$data&&e.validate?(0,f.funcKeywordCode)(r,e):"macro"in e?(0,f.macroKeywordCode)(r,e):(e.compile||e.validate)&&(0,f.funcKeywordCode)(r,e)}t.KeywordCxt=P;const w=/^\/(?:[^~]|~0|~1)*$/,L=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function U(n,{dataLevel:t,dataNames:e,dataPathArr:i}){let r,a;if(""===n)return u.default.rootData;if("/"===n[0]){if(!w.test(n))throw new Error(`Invalid JSON-pointer: ${n}`);r=n,a=u.default.rootData}else{const s=L.exec(n);if(!s)throw new Error(`Invalid JSON-pointer: ${n}`);const o=+s[1];if(r=s[2],"#"===r){if(o>=t)throw new Error(f("property/index",o));return i[t-o]}if(o>t)throw new Error(f("data",o));if(a=e[t-o],!r)return a}let s=a;const o=r.split("/");for(const n of o)n&&(a=h._`${a}${(0,h.getProperty)((0,b.unescapeJsonPointer)(n))}`,s=h._`${s} && ${a}`);return s;function f(n,e){return`Cannot access ${n} ${e} levels up, current level is ${t}`}}t.getData=U},5005:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const i=e(3487),r=e(2141),a=e(412),s=e(4181);function o(n){const{gen:t,data:e,it:r}=n;t.if(r.parentData,(()=>t.assign(e,i._`${r.parentData}[${r.parentDataProperty}]`)))}function f(n,t,e){if(void 0===e)throw new Error(`keyword "${t}" failed to compile`);return n.scopeValue("keyword","function"==typeof e?{ref:e}:{ref:e,code:(0,i.stringify)(e)})}t.macroKeywordCode=function(n,t){const{gen:e,keyword:r,schema:a,parentSchema:s,it:o}=n,d=t.macro.call(o.self,a,s,o),h=f(e,r,d);!1!==o.opts.validateSchema&&o.self.validateSchema(d,!0);const u=e.name("valid");n.subschema({schema:d,schemaPath:i.nil,errSchemaPath:`${o.errSchemaPath}/${r}`,topSchemaRef:h,compositeRule:!0},u),n.pass(u,(()=>n.error(!0)))},t.funcKeywordCode=function(n,t){var e;const{gen:d,keyword:h,schema:u,parentSchema:c,$data:b,it:l}=n;!function({schemaEnv:n},t){if(t.async&&!n.$async)throw new Error("async keyword in sync schema")}(l,t);const g=!b&&t.compile?t.compile.call(l.self,u,c,l):t.validate,D=f(d,h,g),j=d.let("valid");function H(e=(t.async?i._`await `:i.nil)){const s=l.opts.passContext?r.default.this:r.default.self,o=!("compile"in t&&!b||!1===t.schema);d.assign(j,i._`${e}${(0,a.callValidateCode)(n,D,s,o)}`,t.modifying)}function A(n){var e;d.if((0,i.not)(null!==(e=t.valid)&&void 0!==e?e:j),n)}n.block$data(j,(function(){if(!1===t.errors)H(),t.modifying&&o(n),A((()=>n.error()));else{const e=t.async?function(){const n=d.let("ruleErrs",null);return d.try((()=>H(i._`await `)),(t=>d.assign(j,!1).if(i._`${t} instanceof ${l.ValidationError}`,(()=>d.assign(n,i._`${t}.errors`)),(()=>d.throw(t))))),n}():function(){const n=i._`${D}.errors`;return d.assign(n,null),H(i.nil),n}();t.modifying&&o(n),A((()=>function(n,t){const{gen:e}=n;e.if(i._`Array.isArray(${t})`,(()=>{e.assign(r.default.vErrors,i._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,i._`${r.default.vErrors}.length`),(0,s.extendErrors)(n)}),(()=>n.error()))}(n,e)))}})),n.ok(null!==(e=t.valid)&&void 0!==e?e:j)},t.validSchemaType=function(n,t,e=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(n):"object"===t?n&&"object"==typeof n&&!Array.isArray(n):typeof n==t||e&&void 0===n))},t.validateKeywordUsage=function({schema:n,opts:t,self:e,errSchemaPath:i},r,a){if(Array.isArray(r.keyword)?!r.keyword.includes(a):r.keyword!==a)throw new Error("ajv implementation error");const s=r.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(n,t))))throw new Error(`parent schema must have dependencies of ${a}: ${s.join(",")}`);if(r.validateSchema&&!r.validateSchema(n[a])){const n=`keyword "${a}" value is invalid at path "${i}": `+e.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(n);e.logger.error(n)}}},3099:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const i=e(3487),r=e(6776);t.getSubschema=function(n,{keyword:t,schemaProp:e,schema:a,schemaPath:s,errSchemaPath:o,topSchemaRef:f}){if(void 0!==t&&void 0!==a)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const a=n.schema[t];return void 0===e?{schema:a,schemaPath:i._`${n.schemaPath}${(0,i.getProperty)(t)}`,errSchemaPath:`${n.errSchemaPath}/${t}`}:{schema:a[e],schemaPath:i._`${n.schemaPath}${(0,i.getProperty)(t)}${(0,i.getProperty)(e)}`,errSchemaPath:`${n.errSchemaPath}/${t}/${(0,r.escapeFragment)(e)}`}}if(void 0!==a){if(void 0===s||void 0===o||void 0===f)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:a,schemaPath:s,topSchemaRef:f,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(n,t,{dataProp:e,dataPropType:a,data:s,dataTypes:o,propertyName:f}){if(void 0!==s&&void 0!==e)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:d}=t;if(void 0!==e){const{errorPath:s,dataPathArr:o,opts:f}=t;h(d.let("data",i._`${t.data}${(0,i.getProperty)(e)}`,!0)),n.errorPath=i.str`${s}${(0,r.getErrorPath)(e,a,f.jsPropertySyntax)}`,n.parentDataProperty=i._`${e}`,n.dataPathArr=[...o,n.parentDataProperty]}function h(e){n.data=e,n.dataLevel=t.dataLevel+1,n.dataTypes=[],t.definedProperties=new Set,n.parentData=t.data,n.dataNames=[...t.dataNames,e]}void 0!==s&&(h(s instanceof i.Name?s:d.let("data",s,!0)),void 0!==f&&(n.propertyName=f)),o&&(n.dataTypes=o)},t.extendSubschemaMode=function(n,{jtdDiscriminator:t,jtdMetadata:e,compositeRule:i,createErrors:r,allErrors:a}){void 0!==i&&(n.compositeRule=i),void 0!==r&&(n.createErrors=r),void 0!==a&&(n.allErrors=a),n.jtdDiscriminator=t,n.jtdMetadata=e}},7159:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var i=e(4815);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return i.KeywordCxt}});var r=e(3487);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const a=e(7426),s=e(6646),o=e(3141),f=e(5173),d=e(3487),h=e(2531),u=e(453),c=e(6776),b=e(4775),l=e(3589),g=(n,t)=>new RegExp(n,t);g.code="new RegExp";const D=["removeAdditional","useDefaults","coerceTypes"],j=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),H={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},A={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},p=200;function I(n){var t,e,i,r,a,s,o,f,d,h,u,c,b,D,j,H,A,I,M,T,m,J,P,N,w;const L=n.strict,U=null===(t=n.code)||void 0===t?void 0:t.optimize,B=!0===U||void 0===U?1:U||0,R=null!==(i=null===(e=n.code)||void 0===e?void 0:e.regExp)&&void 0!==i?i:g,C=null!==(r=n.uriResolver)&&void 0!==r?r:l.default;return{strictSchema:null===(s=null!==(a=n.strictSchema)&&void 0!==a?a:L)||void 0===s||s,strictNumbers:null===(f=null!==(o=n.strictNumbers)&&void 0!==o?o:L)||void 0===f||f,strictTypes:null!==(h=null!==(d=n.strictTypes)&&void 0!==d?d:L)&&void 0!==h?h:"log",strictTuples:null!==(c=null!==(u=n.strictTuples)&&void 0!==u?u:L)&&void 0!==c?c:"log",strictRequired:null!==(D=null!==(b=n.strictRequired)&&void 0!==b?b:L)&&void 0!==D&&D,code:n.code?{...n.code,optimize:B,regExp:R}:{optimize:B,regExp:R},loopRequired:null!==(j=n.loopRequired)&&void 0!==j?j:p,loopEnum:null!==(H=n.loopEnum)&&void 0!==H?H:p,meta:null===(A=n.meta)||void 0===A||A,messages:null===(I=n.messages)||void 0===I||I,inlineRefs:null===(M=n.inlineRefs)||void 0===M||M,schemaId:null!==(T=n.schemaId)&&void 0!==T?T:"$id",addUsedSchema:null===(m=n.addUsedSchema)||void 0===m||m,validateSchema:null===(J=n.validateSchema)||void 0===J||J,validateFormats:null===(P=n.validateFormats)||void 0===P||P,unicodeRegExp:null===(N=n.unicodeRegExp)||void 0===N||N,int32range:null===(w=n.int32range)||void 0===w||w,uriResolver:C}}class M{constructor(n={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,n=this.opts={...n,...I(n)};const{es5:t,lines:e}=this.opts.code;this.scope=new d.ValueScope({scope:{},prefixes:j,es5:t,lines:e}),this.logger=function(n){if(!1===n)return L;if(void 0===n)return console;if(n.log&&n.warn&&n.error)return n;throw new Error("logger must implement log, warn and error methods")}(n.logger);const i=n.validateFormats;n.validateFormats=!1,this.RULES=(0,o.getRules)(),T.call(this,H,n,"NOT SUPPORTED"),T.call(this,A,n,"DEPRECATED","warn"),this._metaOpts=w.call(this),n.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),n.keywords&&N.call(this,n.keywords),"object"==typeof n.meta&&this.addMetaSchema(n.meta),J.call(this),n.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:n,meta:t,schemaId:e}=this.opts;let i=b;"id"===e&&(i={...b},i.id=i.$id,delete i.$id),t&&n&&this.addMetaSchema(i,i[e],!1)}defaultMeta(){const{meta:n,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof n?n[t]||n:void 0}validate(n,t){let e;if("string"==typeof n){if(e=this.getSchema(n),!e)throw new Error(`no schema with key or ref "${n}"`)}else e=this.compile(n);const i=e(t);return"$async"in e||(this.errors=e.errors),i}compile(n,t){const e=this._addSchema(n,t);return e.validate||this._compileSchemaEnv(e)}compileAsync(n,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:e}=this.opts;return i.call(this,n,t);async function i(n,t){await r.call(this,n.$schema);const e=this._addSchema(n,t);return e.validate||a.call(this,e)}async function r(n){n&&!this.getSchema(n)&&await i.call(this,{$ref:n},!0)}async function a(n){try{return this._compileSchemaEnv(n)}catch(t){if(!(t instanceof s.default))throw t;return o.call(this,t),await f.call(this,t.missingSchema),a.call(this,n)}}function o({missingSchema:n,missingRef:t}){if(this.refs[n])throw new Error(`AnySchema ${n} is loaded but ${t} cannot be resolved`)}async function f(n){const e=await d.call(this,n);this.refs[n]||await r.call(this,e.$schema),this.refs[n]||this.addSchema(e,n,t)}async function d(n){const t=this._loading[n];if(t)return t;try{return await(this._loading[n]=e(n))}finally{delete this._loading[n]}}}addSchema(n,t,e,i=this.opts.validateSchema){if(Array.isArray(n)){for(const t of n)this.addSchema(t,void 0,e,i);return this}let r;if("object"==typeof n){const{schemaId:t}=this.opts;if(r=n[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,h.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(n,e,t,i,!0),this}addMetaSchema(n,t,e=this.opts.validateSchema){return this.addSchema(n,t,!0,e),this}validateSchema(n,t){if("boolean"==typeof n)return!0;let e;if(e=n.$schema,void 0!==e&&"string"!=typeof e)throw new Error("$schema must be a string");if(e=e||this.opts.defaultMeta||this.defaultMeta(),!e)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const i=this.validate(e,n);if(!i&&t){const n="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(n);this.logger.error(n)}return i}getSchema(n){let t;for(;"string"==typeof(t=m.call(this,n));)n=t;if(void 0===t){const{schemaId:e}=this.opts,i=new f.SchemaEnv({schema:{},schemaId:e});if(t=f.resolveSchema.call(this,i,n),!t)return;this.refs[n]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(n){if(n instanceof RegExp)return this._removeAllSchemas(this.schemas,n),this._removeAllSchemas(this.refs,n),this;switch(typeof n){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=m.call(this,n);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[n],delete this.refs[n],this}case"object":{const t=n;this._cache.delete(t);let e=n[this.opts.schemaId];return e&&(e=(0,h.normalizeId)(e),delete this.schemas[e],delete this.refs[e]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(n){for(const t of n)this.addKeyword(t);return this}addKeyword(n,t){let e;if("string"==typeof n)e=n,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=e);else{if("object"!=typeof n||void 0!==t)throw new Error("invalid addKeywords parameters");if(e=(t=n).keyword,Array.isArray(e)&&!e.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(B.call(this,e,t),!t)return(0,c.eachItem)(e,(n=>R.call(this,n))),this;y.call(this,t);const i={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,c.eachItem)(e,0===i.type.length?n=>R.call(this,n,i):n=>i.type.forEach((t=>R.call(this,n,i,t)))),this}getKeyword(n){const t=this.RULES.all[n];return"object"==typeof t?t.definition:!!t}removeKeyword(n){const{RULES:t}=this;delete t.keywords[n],delete t.all[n];for(const e of t.rules){const t=e.rules.findIndex((t=>t.keyword===n));t>=0&&e.rules.splice(t,1)}return this}addFormat(n,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[n]=t,this}errorsText(n=this.errors,{separator:t=", ",dataVar:e="data"}={}){return n&&0!==n.length?n.map((n=>`${e}${n.instancePath} ${n.message}`)).reduce(((n,e)=>n+t+e)):"No errors"}$dataMetaSchema(n,t){const e=this.RULES.all;n=JSON.parse(JSON.stringify(n));for(const i of t){const t=i.split("/").slice(1);let r=n;for(const n of t)r=r[n];for(const n in e){const t=e[n];if("object"!=typeof t)continue;const{$data:i}=t.definition,a=r[n];i&&a&&(r[n]=Q(a))}}return n}_removeAllSchemas(n,t){for(const e in n){const i=n[e];t&&!t.test(e)||("string"==typeof i?delete n[e]:i&&!i.meta&&(this._cache.delete(i.schema),delete n[e]))}}_addSchema(n,t,e,i=this.opts.validateSchema,r=this.opts.addUsedSchema){let a;const{schemaId:s}=this.opts;if("object"==typeof n)a=n[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof n)throw new Error("schema must be object or boolean")}let o=this._cache.get(n);if(void 0!==o)return o;e=(0,h.normalizeId)(a||e);const d=h.getSchemaRefs.call(this,n,e);return o=new f.SchemaEnv({schema:n,schemaId:s,meta:t,baseId:e,localRefs:d}),this._cache.set(o.schema,o),r&&!e.startsWith("#")&&(e&&this._checkUnique(e),this.refs[e]=o),i&&this.validateSchema(n,!0),o}_checkUnique(n){if(this.schemas[n]||this.refs[n])throw new Error(`schema with key or id "${n}" already exists`)}_compileSchemaEnv(n){if(n.meta?this._compileMetaSchema(n):f.compileSchema.call(this,n),!n.validate)throw new Error("ajv implementation error");return n.validate}_compileMetaSchema(n){const t=this.opts;this.opts=this._metaOpts;try{f.compileSchema.call(this,n)}finally{this.opts=t}}}function T(n,t,e,i="error"){for(const r in n){const a=r;a in t&&this.logger[i](`${e}: option ${r}. ${n[a]}`)}}function m(n){return n=(0,h.normalizeId)(n),this.schemas[n]||this.refs[n]}function J(){const n=this.opts.schemas;if(n)if(Array.isArray(n))this.addSchema(n);else for(const t in n)this.addSchema(n[t],t)}function P(){for(const n in this.opts.formats){const t=this.opts.formats[n];t&&this.addFormat(n,t)}}function N(n){if(Array.isArray(n))this.addVocabulary(n);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in n){const e=n[t];e.keyword||(e.keyword=t),this.addKeyword(e)}}}function w(){const n={...this.opts};for(const t of D)delete n[t];return n}t.default=M,M.ValidationError=a.default,M.MissingRefError=s.default;const L={log(){},warn(){},error(){}},U=/^[a-z_$][a-z0-9_$:-]*$/i;function B(n,t){const{RULES:e}=this;if((0,c.eachItem)(n,(n=>{if(e.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!U.test(n))throw new Error(`Keyword ${n} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function R(n,t,e){var i;const r=null==t?void 0:t.post;if(e&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:a}=this;let s=r?a.post:a.rules.find((({type:n})=>n===e));if(s||(s={type:e,rules:[]},a.rules.push(s)),a.keywords[n]=!0,!t)return;const o={keyword:n,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?C.call(this,s,o,t.before):s.rules.push(o),a.all[n]=o,null===(i=t.implements)||void 0===i||i.forEach((n=>this.addKeyword(n)))}function C(n,t,e){const i=n.rules.findIndex((n=>n.keyword===e));i>=0?n.rules.splice(i,0,t):(n.rules.push(t),this.logger.warn(`rule ${e} is not defined`))}function y(n){let{metaSchema:t}=n;void 0!==t&&(n.$data&&this.opts.$data&&(t=Q(t)),n.validateSchema=this.compile(t,!0))}const E={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Q(n){return{anyOf:[n,E]}}},4087:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(2577),r=e(996),a=e(5568),s=e(6795),o=e(235),f=e(2567),d=e(1233),h=e(1968),u=["/properties"];t.default=function(n){return[i,r,a,s,o,t(this,f),d,t(this,h)].forEach((n=>this.addMetaSchema(n,void 0,!1))),this;function t(t,e){return n?t.$dataMetaSchema(e,u):e}}},3510:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(4063);i.code='require("ajv/dist/runtime/equal").default',t.default=i},4499:(n,t)=>{"use strict";function e(n){const t=n.length;let e,i=0,r=0;for(;r<t;)i++,e=n.charCodeAt(r++),e>=55296&&e<=56319&&r<t&&(e=n.charCodeAt(r),56320==(64512&e)&&r++);return i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'},3589:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(540);i.code='require("ajv/dist/runtime/uri").default',t.default=i},7426:(n,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e},4783:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const i=e(3487),r=e(6776),a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:n}})=>i.str`must NOT have more than ${n} items`,params:({params:{len:n}})=>i._`{limit: ${n}}`},code(n){const{parentSchema:t,it:e}=n,{items:i}=t;Array.isArray(i)?s(n,i):(0,r.checkStrictMode)(e,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(n,t){const{gen:e,schema:a,data:s,keyword:o,it:f}=n;f.items=!0;const d=e.const("len",i._`${s}.length`);if(!1===a)n.setParams({len:t.length}),n.pass(i._`${d} <= ${t.length}`);else if("object"==typeof a&&!(0,r.alwaysValidSchema)(f,a)){const a=e.var("valid",i._`${d} <= ${t.length}`);e.if((0,i.not)(a),(()=>function(a){e.forRange("i",t.length,d,(t=>{n.subschema({keyword:o,dataProp:t,dataPropType:r.Type.Num},a),f.allErrors||e.if((0,i.not)(a),(()=>e.break()))}))}(a))),n.ok(a)}}t.validateAdditionalItems=s,t.default=a},9351:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(412),r=e(3487),a=e(2141),s=e(6776),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:n})=>r._`{additionalProperty: ${n.additionalProperty}}`},code(n){const{gen:t,schema:e,parentSchema:o,data:f,errsCount:d,it:h}=n;if(!d)throw new Error("ajv implementation error");const{allErrors:u,opts:c}=h;if(h.props=!0,"all"!==c.removeAdditional&&(0,s.alwaysValidSchema)(h,e))return;const b=(0,i.allSchemaProperties)(o.properties),l=(0,i.allSchemaProperties)(o.patternProperties);function g(n){t.code(r._`delete ${f}[${n}]`)}function D(i){if("all"===c.removeAdditional||c.removeAdditional&&!1===e)g(i);else{if(!1===e)return n.setParams({additionalProperty:i}),n.error(),void(u||t.break());if("object"==typeof e&&!(0,s.alwaysValidSchema)(h,e)){const e=t.name("valid");"failing"===c.removeAdditional?(j(i,e,!1),t.if((0,r.not)(e),(()=>{n.reset(),g(i)}))):(j(i,e),u||t.if((0,r.not)(e),(()=>t.break())))}}}function j(t,e,i){const r={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===i&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(r,e)}t.forIn("key",f,(e=>{b.length||l.length?t.if(function(e){let a;if(b.length>8){const n=(0,s.schemaRefOrVal)(h,o.properties,"properties");a=(0,i.isOwnProperty)(t,n,e)}else a=b.length?(0,r.or)(...b.map((n=>r._`${e} === ${n}`))):r.nil;return l.length&&(a=(0,r.or)(a,...l.map((t=>r._`${(0,i.usePattern)(n,t)}.test(${e})`)))),(0,r.not)(a)}(e),(()=>D(e))):D(e)})),n.ok(r._`${d} === ${a.default.errors}`)}};t.default=o},1125:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(6776),r={keyword:"allOf",schemaType:"array",code(n){const{gen:t,schema:e,it:r}=n;if(!Array.isArray(e))throw new Error("ajv implementation error");const a=t.name("valid");e.forEach(((t,e)=>{if((0,i.alwaysValidSchema)(r,t))return;const s=n.subschema({keyword:"allOf",schemaProp:e},a);n.ok(a),n.mergeEvaluated(s)}))}};t.default=r},19:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e(412).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=i},9864:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=e(3487),r=e(6776),a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:t}})=>void 0===t?i.str`must contain at least ${n} valid item(s)`:i.str`must contain at least ${n} and no more than ${t} valid item(s)`,params:({params:{min:n,max:t}})=>void 0===t?i._`{minContains: ${n}}`:i._`{minContains: ${n}, maxContains: ${t}}`},code(n){const{gen:t,schema:e,parentSchema:a,data:s,it:o}=n;let f,d;const{minContains:h,maxContains:u}=a;o.opts.next?(f=void 0===h?1:h,d=u):f=1;const c=t.const("len",i._`${s}.length`);if(n.setParams({min:f,max:d}),void 0===d&&0===f)return void(0,r.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==d&&f>d)return(0,r.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),void n.fail();if((0,r.alwaysValidSchema)(o,e)){let t=i._`${c} >= ${f}`;return void 0!==d&&(t=i._`${t} && ${c} <= ${d}`),void n.pass(t)}o.items=!0;const b=t.name("valid");function l(){const n=t.name("_valid"),e=t.let("count",0);g(n,(()=>t.if(n,(()=>function(n){t.code(i._`${n}++`),void 0===d?t.if(i._`${n} >= ${f}`,(()=>t.assign(b,!0).break())):(t.if(i._`${n} > ${d}`,(()=>t.assign(b,!1).break())),1===f?t.assign(b,!0):t.if(i._`${n} >= ${f}`,(()=>t.assign(b,!0))))}(e)))))}function g(e,i){t.forRange("i",0,c,(t=>{n.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},e),i()}))}void 0===d&&1===f?g(b,(()=>t.if(b,(()=>t.break())))):0===f?(t.let(b,!0),void 0!==d&&t.if(i._`${s}.length > 0`,l)):(t.let(b,!1),l()),n.result(b,(()=>n.reset()))}};t.default=a},7772:(n,t,e)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const i=e(3487),r=e(6776),a=e(412);t.error={message:({params:{property:n,depsCount:t,deps:e}})=>{const r=1===t?"property":"properties";return i.str`must have ${r} ${e} when property ${n} is present`},params:({params:{property:n,depsCount:t,deps:e,missingProperty:r}})=>i._`{property: ${n},