@datagrok/sequence-translator 1.5.0 → 1.5.2

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see package-test.js.LICENSE.txt */
2
- var sequencetranslator_test;(()=>{var t={717:(t,e,n)=>{"use strict";n.d(e,{j:()=>o});var r=n(82);async function o(){const t=r.Func.find({package:"Chem",name:"getRdKitModule"});if(0===t.length)throw new Error('Package "Chem" must be installed for getRdKitModule.');return(await t[0].prepare().call()).getOutputParamValue()}},599:(t,e,n)=>{"use strict";n.d(e,{o:()=>r.o});var r=n(869)},124:(t,e,n)=>{"use strict";n.d(e,{b2:()=>i});var r=n(389),o=n(82);async function i(){const t="Helm",e=o.Func.find({package:t,name:"getHelmHelper"});if(0===e.length)throw new Error(`Package '${t}' must be installed for HelmHelper.`);return(await e[0].prepare().call()).getOutputParamValue()}o.JsInputBase,Error,r.input.helmAsync=async function(t,e){return(await i()).createHelmInput(t,e)}},890:(t,e,n)=>{"use strict";n.d(e,{pj:()=>p});var r,o,i,s,a,u,l,c=n(82);n(328);class f{constructor(t,e=!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 t){const n=t,r=f._createBuffer(n);if(e)for(let t=0;t<r.length;t++)r[t]=-1;this._data=r,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,r){if(t<e||t>n)throw new Error(`Argument ${r} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let r=0;r<n;r++)e[r]=t[r]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new f(t._length);n._length=t._length,n._data=f._createBuffer(n._length),n._version=0;const r=t.lengthInInts;for(let o=0;o<r;o++)n._data[o]=t._data[o]&e._data[o];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new f(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new f(t);for(let r=0;r<t;++r)n.setBit(r,e(r));return n._version=0,n}static fromString(t){return f.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new f(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new f(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let r=0,o=0;for(;e-o>=4;)n._data[r++]=255&t[o]|(255&t[o+1])<<8|(255&t[o+2])<<16|(255&t[o+3])<<24,o+=4;return e-o==3&&(n._data[r]=(255&t[o+2])<<16),e-o==2&&(n._data[r]|=(255&t[o+1])<<8),e-o==1&&(n._data[r]|=255&t[o]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new f(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,r=this.lengthInInts;for(let t=0;t<r;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,r=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(r)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,r=!0,o=!0){if(n&&o&&this.setAll(!e,!1),o)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(r)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return f.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return n}setRange(t,e,n,r=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const o=Math.min(t,e),i=Math.max(t,e);if(n)for(let t=o;t<=i;t++)this.setTrue(t);else for(let t=o;t<=i;t++)this.setFalse(t);return this.incrementVersion(r),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const r=this._length;this.setLength(this._length+e);for(let n=r-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let r=t;r<t+e;r++)this.setBit(r,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let r=-1;-1!=(r=t.findNext(r,!e));)this.setFast(n++,this.getBit(r));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=f._onBitCount[255&t];let n=this._data[e];const r=31&this._length;for(0!=r&&(n&=~(4294967295<<r));0!=n;n>>>=8)this._selectedCount+=f._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const r=this.lengthInInts;let o=0;for(;o<r-1;o++)for(let e=this._data[o]&t._data[o];0!=e;e>>>=8)n+=f._onBitCount[255&e];let i=this._data[o]&t._data[o];const s=31&this._length;for(0!=s&&(i&=~(4294967295<<s));0!=i;i>>>=8)n+=f._onBitCount[255&i];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=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(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const r=this.lengthInInts;for(let o=Math.floor(t/32);o<r;o++){let r=e?this._data[o]:~this._data[o];if(0!=n)r&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==r)continue;for(let e=0;0!=r;e+=8,r>>>=8){const n=f._firstOnBit[255&r];if(n>=0)return(t=n+32*o+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let r=Math.floor(t/32);r>=0;r--){let t=e?this._data[r]:~this._data[r];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=f._lastOnBit[t>>>24];if(n>=0)return n+32*r+e}}return-1}}f._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]),f._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]),f._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(r||(r={})),function(t){t.Euclidean="Euclidean"}(o||(o={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(i||(i={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(u||(u={})),function(t){t.CommonItems="Common Items"}(l||(l={}));new Uint32Array(65536);var h;async function p(){const t=c.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(h||(h={})),h.HAMMING,h.LEVENSHTEIN,h.NEEDLEMANN_WUNSCH,h.MONOMER_CHEMICAL_DISTANCE,i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Cosine,i.Tanimoto,i.Asymmetric,i.Cosine,i.Sokal,h.HAMMING,h.LEVENSHTEIN,h.MONOMER_CHEMICAL_DISTANCE,h.NEEDLEMANN_WUNSCH,n(151),n(439)},151:(t,e,n)=>{"use strict";new RegExp("[rd]\\((\\w)\\)p?","g")},192:(t,e,n)=>{"use strict";function r(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?r(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function o(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?o(t.$thrownJsError):void 0}function i(t){return[r(t),o(t)]}n.d(e,{AP:()=>i})},439:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>r,YI:()=>o,_S:()=>u,b9:()=>l,gp:()=>i});var r,o,i,s=n(738);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm",t.CUSTOM="custom"}(r||(r={})),function(t){t.DNA="DNA",t.RNA="RNA",t.PT="PT",t.UN="UN"}(o||(o={})),function(t){t.aligned="aligned",t.alphabet="alphabet",t.alphabetSize=".alphabetSize",t.alphabetIsMultichar=".alphabetIsMultichar",t.separator="separator",t.isHelmCompatible=".isHelmCompatible",t.positionNames=".positionNames",t.positionLabels=".positionLabels",t.regions=".regions"}(i||(i={}));const a=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"])}}},u=(new s.a(o.PT,a.fasta.peptide,.5),new s.a(o.DNA,a.fasta.dna,.55),new s.a(o.RNA,a.fasta.rna,.55),""),l={[r.FASTA]:"-",[r.SEPARATOR]:"",[r.HELM]:"*"}},3:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>r.Hi,YI:()=>r.YI,dh:()=>o.dh,gp:()=>r.gp,zS:()=>o.zS});var r=n(439),o=n(291)},738:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});class r{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}},291:(t,e,n)=>{"use strict";n.d(e,{Mu:()=>m,dh:()=>y,zS:()=>b});var r=n(82),o=n(991),i=n.n(o),s=(n(738),n(439));class a{static makePalette(t,e=!1,n=a){const r={};return t.forEach((t=>{const n=t[0],o=t[1];n.forEach(((t,n)=>{r[t]=this.colourPalette[o][e?0:n]}))})),new n(r)}constructor(t){this._palette=t}get(t,e){return this._palette[t]}}a.undefinedColor="rgb(100,100,100)",a.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)"]};class u extends a{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,u)),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,u)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new u({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(t){const e=t in u.aaSynonyms?u.aaSynonyms[t]:t;return super.get(e)}}u.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class l{static getPalette(t="grok"){switch(t){case"grok":return u.GrokGroups;case"lesk":return u.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",r="";for(const o of t)"("==o?e++:")"==o?e--:e?n+=o:r+=o;return isNaN(parseInt(n))?[r,n]:[r,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[r,o]=this.getInnerOuter(t);if(r=r.length>6?`${r.slice(0,3)}...`:r,o=o.length>6?`${o.slice(0,3)}...`:o,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,o,1]:[this.undefinedColor,r,o,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,o,2]:[this.undefinedColor,r,o,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,o,3]:[this.undefinedColor,r,o,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,o,4]:[this.undefinedColor,r,o,4]}return[this.undefinedColor,r,o,0]}}l.SemType="Aminoacids",l.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",l.undefinedColor="rgb(100,100,100)",l.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"},l.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"},l.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(*)*"},l.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"};class c{}c.SemType="Nucleotides",c.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",c.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};var f=n(890);function h(t,e=!0){if(null==t)return"rgb(100,100,100)";const n=r.Color.fromHtml(t);if(e){const t=r.Color.g(n),e=r.Color.r(n),o=r.Color.b(n),i=Math.sqrt(Math.pow(0-e,2)+Math.pow(0-t,2)+Math.pow(0-o,2));if(i>210)return`rgb(${e/i*210},${t/i*210},${o/i*210})`}return r.Color.toRgb(n)}class p{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class d{}class g extends d{static get palette(){return console.log("UnknownColorPalette.palette"),null===g._pallete&&(g._pallete=g.buildPalette()),g._pallete}static buildPalette(){return(0,f.pj)().then((t=>{t.awaitLoaded(1/0).then((()=>{const e=t.getMonomerLib();e.onChanged.subscribe((()=>{g.customMonomerColors={},g.polymerTypes=e.getPolymerTypes();for(const t of this.polymerTypes){const n=e.getMonomerSymbolsByType(t);for(const r of n){const n=e.getMonomer(t,r);n?.meta?.colors?.default?.background&&(this.customMonomerColors[r]||(this.customMonomerColors[r]={}),this.customMonomerColors[r][t]=h(n.meta.colors.default.background))}}}))}))})),[].concat(...Object.values(a.colourPalette))}get(t,e){const n=g.customMonomerColors[t],r=e??"PEPTIDE";if(n&&n[r])return n[r];const o=p.hashCode(t)%g.palette.length;return h(g.palette[o])}}g._pallete=null,g.customMonomerColors={},g.polymerTypes=[];class m{get length(){return this.mList.length}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");const e=this.mList[t];return e!==this.gapOriginalMonomer?e:s._S}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}function y(t,e=void 0){return n=>{if(n){let r;const o=new RegExp(`(?<=^|\\${t})("-"|'-'|[^\\${t}]*)(?=\\${t}|$)`,"g");return void 0!==e?(o.lastIndex=0,r=i()(n.matchAll(o)).take(e).map((t=>t[0])).toArray()):r=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e),new m(r,s.b9[s.Hi.SEPARATOR])}return new m([],s.b9[s.Hi.SEPARATOR])}}const v=/([^\W_]+)/g;function b(t,e){if(t.length<=e)return t;const n=t.match(v),r=t.length>e||(n?.length??0)>1,o=n?.[0]??" ";return r?o.substring(0,e-1)+"…":o}},312:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o});var r=n(82);async function o(){const t=r.Func.find({package:"Bio",name:"getSeqHelper"});if(0===t.length)throw new Error("Package 'Bio' must be installed for SeqHelper.");return(await t[0].prepare().call()).getOutputParamValue()}},869:(t,e,n)=>{"use strict";var r;n.d(e,{o:()=>r}),function(t){t.BASE="HELM_BASE",t.SUGAR="HELM_SUGAR",t.LINKER="HELM_LINKER",t.AA="HELM_AA",t.CHEM="HELM_CHEM",t.BLOB="HELM_BLOB",t.NUCLEOTIDE="HELM_NUCLETIDE"}(r||(r={}))},70:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>M,gM:()=>L,L1:()=>S,E3:()=>x,J6:()=>P,Xk:()=>I,Xb:()=>N,N$:()=>$,t6:()=>E,PE:()=>_,CN:()=>p});var r=n(328),o=n(82);n(982);const i=o.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,,,,,,,,,,,,,,,,,,,,,');i.columns.add(o.Column.fromList(o.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};const a=3e4,u=108e5,l=console.log.bind(console),c=console.info.bind(console),f=console.warn.bind(console),h=console.error.bind(console),p={},d="Auto Tests",g="Demo",m="Detectors",y="Core",v={};let b;var C;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(C||(C={}));class w{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class A{constructor(t,e,n,r){var o;this.category=t,this.name=e,null!=r||(r={}),null!==(o=r.timeout)&&void 0!==o||(r.timeout=a),this.options=r,this.test=()=>s(this,void 0,void 0,(function*(){return new Promise(((t,e)=>s(this,void 0,void 0,(function*(){let r="";try{r=yield n()}catch(t){e(t)}t(r)}))))}))}}function _(t,e,n,r=0,o="timeout"){return s(this,void 0,void 0,(function*(){return new Promise(((i,s)=>{const a=t.subscribe((t=>{try{e(t),i("OK")}catch(t){s(t)}finally{a.unsubscribe(),clearTimeout(u)}})),u=setTimeout((()=>{a.unsubscribe(),s(o)}),r);n()}))}))}function E(t,e,n){null==p[b]&&(p[b]={}),null==p[b].tests&&(p[b].tests=[]),p[b].tests.push(new A(b,t,e,n))}function x(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function T(t,e,n=.001,r){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const o=Math.abs(t-e)<n;if(x(o,!0,`${null!=r?r:""} (tolerance = ${n})`),!o)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function I(t,e){for(const[n,r]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&r instanceof Array)P(e,r);else if(e instanceof Object&&r instanceof Object)I(e,r);else if(Number.isFinite(e)&&Number.isFinite(r))T(e,r);else if(e!=r)throw new Error(`Expected (${r}) for key '${n}', got (${e})`)}}function P(t,e){const n=t.length,r=e.length;if(n!=r)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${r}`);for(let r=0;r<n;r++)if(t[r]instanceof Array&&e[r]instanceof Array)P(t[r],e[r]);else if(t[r]instanceof Object&&e[r]instanceof Object)I(t[r],e[r]);else if(t[r]!=e[r])throw new Error(`Expected ${e[r]} at position ${r}, got ${t[r]}`)}function S(t,e,n){var r;b=t,e(),p[b]&&(p[b].clear=null===(r=null==n?void 0:n.clear)||void 0===r||r,p[b].timeout=null==n?void 0:n.timeout,p[b].benchmarks=null==n?void 0:n.benchmarks,p[b].stressTests=null==n?void 0:n.stressTests)}function L(t){null==p[b]&&(p[b]={}),p[b].before=t}function M(t){null==p[b]&&(p[b]={}),p[b].after=t}function O(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function N(t,e){var n,l,c,f,h,b;return s(this,void 0,void 0,(function*(){const C=t.id;if(v[C])return;const w=e?e.tests:p;if(void 0!==w[d]||void 0!==w[g]||Object.keys(w).find((t=>t.startsWith(d)||t.startsWith(y))))return void(v[C]=!0);if("DevTools"===t.name||e&&"DevTools"===e._package.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let r=null!==(n=e.pop())&&void 0!==n?n:t.name,o=e.length?y+": "+e.join(": "):y,i=r.split(" | ");r=i[i.length-1],i.unshift(o),i.pop(),o=i.join(": "),void 0===w[o]&&(w[o]={tests:[],clear:!0}),w[o].tests.push(new A(o,r,t.test,{isAggregated:!1,timeout:null!==(c=null===(l=t.options)||void 0===l?void 0:l.timeout)&&void 0!==c?c:a,skipReason:null===(f=t.options)||void 0===f?void 0:f.skipReason}))}const _=[],E=[],T=[],I=yield r.dapi.functions.filter(`package.id = "${C}"`).list(),P=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const e of I){const n=e.options.test,l=e.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let t=0;t<n.length;t++){const i=n[t].matchAll(P),l={};Array.from(i).forEach((t=>{t[0].startsWith("skip")?l.skip=t[1]:t[0].startsWith("wait")?l.wait=parseInt(t[2]):t[0].startsWith("cat")?l.cat=t[3]:t[0].startsWith("timeout")&&(l.timeout=parseInt(t[4]))}));const c=new A(d,1===n.length?e.name:`${e.name} ${t+1}`,(()=>s(this,void 0,void 0,(function*(){const o=yield r.functions.eval(O(n[t],e));if(l.wait&&(yield B(l.wait)),"boolean"==typeof o&&!o)throw`Failed: ${n[t]}, expected true, got ${o}`}))),{skipReason:l.skip,timeout:o.Test.isInBenchmark?null!==(h=l.benchmarkTimeout)&&void 0!==h?h:u:null!==(b=l.timeout)&&void 0!==b?b:a});if(l.cat){const t=d+": "+l.cat;c.category=t,void 0===w[t]&&(w[t]={tests:[],clear:!0}),w[t].tests.push(c)}else _.push(c)}if(l){const t=e.options.demoWait?parseInt(e.options.demoWait):void 0,n=new A(g,e.friendlyName,(()=>s(this,void 0,void 0,(function*(){r.shell.isInDemo=!0,void 0===r.shell.view(o.View.BROWSE)&&(r.shell.v=o.View.createByType(o.View.BROWSE)),yield B(300),r.shell.clearLastError(),yield e.apply(),yield B(t||2e3);const n=yield r.shell.lastError;if(n)throw new Error(n);r.shell.isInDemo=!1}))),{skipReason:e.options.demoSkip});E.push(n)}if(e.hasTag("semTypeDetector")){let n=i;e.options.testData&&(n=yield r.data.files.openTable(`System:AppData/${t.nqName}/${e.options.testData}`));const o=new A(m,e.friendlyName,(()=>s(this,void 0,void 0,(function*(){const r=[];console.log(`System:AppData/${t.nqName}/${e.options.testData}`);for(const t of n.clone().columns){const n=yield e.apply([t]);r.push(n||t.semType)}const o=r.filter((t=>t));x(o.length,1),e.options.testDataColumnName&&x(o[0],e.options.testDataColumnName)}))),{skipReason:e.options.skipTest});T.push(o)}}v[C]=!0,_.length>0&&(w[d]={tests:_,clear:!0}),E.length>0&&(w[g]={tests:E,clear:!0}),T.length>0&&(w[m]={tests:T,clear:!1})}))}function $(t){var e,n,i,d;return s(this,void 0,void 0,(function*(){const g=null===(n=null===(e=r.functions.getCurrentCall())||void 0===e?void 0:e.func)||void 0===n?void 0:n.package;yield N(g);const m=[];console.log("Running tests"),null!=t||(t={}),null!==(i=(d=t).testContext)&&void 0!==i||(d.testContext=new w),r.shell.clearLastError();const y=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),f(...e)},console.error=(...e)=>{t.push(...e),h(...e)},t}();yield function(t,e){var n,i,p,d,b,C,w,A,_,E,x,T,I,P,S,L;return s(this,void 0,void 0,(function*(){try{for(const[s,c]of Object.entries(t)){if((null==e?void 0:e.category)&&!s.toLowerCase().startsWith(null==e?void 0:e.category.toLowerCase())||(null===(n=e.exclude)||void 0===n?void 0:n.some((t=>s.startsWith(t)))))continue;l(`Started ${s} category`);const t=null===(i=c.tests)||void 0===i?void 0:i.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));t||(c.beforeStatus=yield v(c.before,null!==(p=e.category)&&void 0!==p?p:""));let f=null!==(d=c.tests)&&void 0!==d?d:[];e.stressTest&&(f=f.filter((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest})),f=H(f)),(null!==(C=null===(b=e.tags)||void 0===b?void 0:b.length)&&void 0!==C?C:0)>0&&(f=f.filter((t=>{var n,r;return null===(r=null===(n=t.options)||void 0===n?void 0:n.tags)||void 0===r?void 0:r.some((t=>{var n;return(null!==(n=null==e?void 0:e.tags)&&void 0!==n?n:[]).includes(t)}))})));const h=[];if(c.clear)for(let t=0;t<f.length;t++){f[t].options&&void 0===(null===(w=f[t].options)||void 0===w?void 0:w.benchmark)&&(f[t].options||(f[t].options={}),f[t].options.benchmark=null!==(A=c.benchmarks)&&void 0!==A&&A);let n=yield D(f[t],null==e?void 0:e.test,y,o.Test.isInBenchmark?null!==(E=null===(_=f[t].options)||void 0===_?void 0:_.benchmarkTimeout)&&void 0!==E?E:u:null!==(T=null===(x=f[t].options)||void 0===x?void 0:x.timeout)&&void 0!==T?T:a,g.name,e.verbose);n&&h.push(n),r.shell.closeAll(),o.Balloon.closeAll()}else for(let t=0;t<f.length;t++){let n=yield D(f[t],null==e?void 0:e.test,y,o.Test.isInBenchmark?null!==(P=null===(I=f[t].options)||void 0===I?void 0:I.benchmarkTimeout)&&void 0!==P?P:u:null===(S=f[t].options)||void 0===S?void 0:S.timeout,g.name,e.verbose);n&&h.push(n)}const M=h.filter((t=>"skipped"!=t.result));t||(c.afterStatus=yield v(c.after,null!==(L=e.category)&&void 0!==L?L:"")),c.afterStatus&&M.push({date:(new Date).toISOString(),logs:"",category:s,name:"after",result:c.afterStatus,success:!1,ms:0,skipped:!1}),c.beforeStatus&&M.push({date:(new Date).toISOString(),logs:"",category:s,name:"before",result:c.beforeStatus,success:!1,ms:0,skipped:!1}),m.push(...M)}}finally{console.log=l,console.info=c,console.warn=f,console.error=h}if(e.testContext.catchUnhandled&&!o.Test.isInBenchmark){yield B(1e3);const t=yield r.shell.lastError,e={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};m.push(e),e.package=g.name,null!=r.shell.reportTest?yield r.shell.reportTest("package",e):yield fetch(`${r.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)})}}))}(p,t);for(let t of m)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return m;function v(t,e){return s(this,void 0,void 0,(function*(){var n=void 0;try{void 0!==t&&(yield F((()=>s(this,void 0,void 0,(function*(){yield t()}))),1e5,`before ${e}: timeout error`))}catch(t){n=yield R(t)}return n}))}}))}function R(t){return s(this,void 0,void 0,(function*(){return`${t.toString()}\n${t.stack?yield o.Logger.translateStackTrace(t.stack):""}`}))}function D(t,e,n,i,u,c){var f,p,d,g,m,y;return s(this,void 0,void 0,(function*(){let s;n.length=0;let v="package";const b=null!=e&&t.name.toLowerCase()!==e.toLowerCase();let C=(null===(f=t.options)||void 0===f?void 0:f.skipReason)||b,w=b?"skipped":null===(p=t.options)||void 0===p?void 0:p.skipReason;if(o.Test.isInBenchmark&&!(null===(d=t.options)||void 0===d?void 0:d.benchmark))return void l(`SKIPPED: ${t.category} ${t.name} doesnt available in benchmark mode`);C||l(`Started ${t.category} ${t.name}`);const A=Date.now();try{if(C)s={date:(new Date).toISOString(),success:!0,result:w,ms:0,skipped:!0};else{let e=null!=i?i:a;s={date:(new Date).toISOString(),success:!0,result:null!==(g=yield F(t.test,e))&&void 0!==g?g:"OK",ms:0,skipped:!1}}}catch(t){h(t),s={date:(new Date).toISOString(),success:!1,result:yield R(t),ms:0,skipped:!1}}if((null===(m=t.options)||void 0===m?void 0:m.isAggregated)&&s.result.constructor===o.DataFrame){const t=s.result.col("success");if(t&&(s.success=t.stats.sum===t.length),!c){const t=s.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),s.result=t}s.result=s.result.toCsv()}if(s.logs=n.join("\n"),s.ms=Date.now()-A,C||l(`Finished ${t.category} ${t.name} for ${s.ms} ms`),s.category=t.category,s.name=t.name,!b){let e={success:s.success,result:s.result,ms:s.ms,skipped:s.skipped,package:u,category:t.category,name:t.name,logs:s.logs};if(s.result.constructor==Object){const t=Object.keys(s.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:s.result[e]})),{});e=Object.assign(Object.assign({},e),t)}e.result instanceof o.DataFrame&&(e.result=JSON.stringify(null===(y=e.result)||void 0===y?void 0:y.toJson())||""),null!=r.shell.reportTest?yield r.shell.reportTest(v,e):yield fetch(`${r.dapi.root}/log/tests/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)})}return s}))}function H(t){const e=t.slice();return e.sort((()=>Math.random()-.5)),e}function B(t){return s(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function F(t,e,n="EXECUTION TIMEOUT"){return s(this,void 0,void 0,(function*(){let r=null;const o=new Promise(((t,o)=>{r=setTimeout((()=>{o(n)}),e)}));try{return yield Promise.race([t(),o])}finally{r&&clearTimeout(r)}}))}o.DataFrame.fromColumns([o.Column.fromStrings("col",["val1","val2","val3"])])},74:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,".st-colored-text-input > textarea {\n width: 100%;\n -webkit-text-fill-color: transparent;\n background-color: transparent;\n position: relative;\n z-index: 1;\n resize: none;\n height: 22px; /* Fine tuned value to avoid \"jumping\" of the textarea upon autoresize */\n}\n\n.st-colored-text-input > div {\n /* The values here are fine tuned to those of the ui.input textarea in order\n * to achieve precise overlap */\n overflow: auto;\n position: absolute;\n pointer-events: none;\n cursor: text;\n z-index: 0;\n max-width: 100%;\n padding: 2px;\n line-height: normal;\n font-family: 'Roboto', 'Roboto Local', sans-serif;\n font-size: 13px;\n padding-top: 6px !important;\n color: transparent;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n","",{version:3,sources:["webpack://./src/apps/common/view/components/colored-input/style.css"],names:[],mappings:"AAAA;EACE,WAAW;EACX,oCAAoC;EACpC,6BAA6B;EAC7B,kBAAkB;EAClB,UAAU;EACV,YAAY;EACZ,YAAY,EAAE,wEAAwE;AACxF;;AAEA;EACE;iCAC+B;EAC/B,cAAc;EACd,kBAAkB;EAClB,oBAAoB;EACpB,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACZ,mBAAmB;EACnB,iDAAiD;EACjD,eAAe;EACf,2BAA2B;EAC3B,kBAAkB;EAClB,qBAAqB;EACrB,qBAAqB;AACvB",sourcesContent:[".st-colored-text-input > textarea {\n width: 100%;\n -webkit-text-fill-color: transparent;\n background-color: transparent;\n position: relative;\n z-index: 1;\n resize: none;\n height: 22px; /* Fine tuned value to avoid \"jumping\" of the textarea upon autoresize */\n}\n\n.st-colored-text-input > div {\n /* The values here are fine tuned to those of the ui.input textarea in order\n * to achieve precise overlap */\n overflow: auto;\n position: absolute;\n pointer-events: none;\n cursor: text;\n z-index: 0;\n max-width: 100%;\n padding: 2px;\n line-height: normal;\n font-family: 'Roboto', 'Roboto Local', sans-serif;\n font-size: 13px;\n padding-top: 6px !important;\n color: transparent;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n"],sourceRoot:""}]);const a=s},252:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-pattern-text-input > textarea {\n resize: none;\n}\n","",{version:3,sources:["webpack://./src/apps/pattern/view/style.css"],names:[],mappings:"AAAA,gGAAgG;;AAEhG;EACE,YAAY;AACd",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-pattern-text-input > textarea {\n resize: none;\n}\n"],sourceRoot:""}]);const a=s},507:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-structure-body {\n padding-right: 20px;\n}\n\n.st-structure-mol-img {\n margin-right: 30px;\n float: right;\n}\n\n.st-structure-bool-button-block {\n justify-content: right;\n margin-bottom: 10px;\n}\n\n.st-structure-bottom {\n flex-direction: row-reverse;\n padding-top: 20px;\n}\n\n.st-structure-clear-buttons {\n justify-content: space-between;\n padding: 13px 10px 13px 10px;\n}\n\n.st-direction-inputs {\n align-items: end;\n}\n\n.st-structure-inputs {\n flex-grow: 2;\n padding-left: 10px;\n}","",{version:3,sources:["webpack://./src/apps/structure/view/style.css"],names:[],mappings:"AAAA,gGAAgG;;AAEhG;EACE,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAEA;EACE,8BAA8B;EAC9B,4BAA4B;AAC9B;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,YAAY;EACZ,kBAAkB;AACpB",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-structure-body {\n padding-right: 20px;\n}\n\n.st-structure-mol-img {\n margin-right: 30px;\n float: right;\n}\n\n.st-structure-bool-button-block {\n justify-content: right;\n margin-bottom: 10px;\n}\n\n.st-structure-bottom {\n flex-direction: row-reverse;\n padding-top: 20px;\n}\n\n.st-structure-clear-buttons {\n justify-content: space-between;\n padding: 13px 10px 13px 10px;\n}\n\n.st-direction-inputs {\n align-items: end;\n}\n\n.st-structure-inputs {\n flex-grow: 2;\n padding-left: 10px;\n}"],sourceRoot:""}]);const a=s},254:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n.st-translator-input-table {\n /* width: 100%; */\n margin-right: 20px;\n}\n\n.st-translator-input-table td:has(textarea) {\n width: 100%;\n}\n\n.st-translator-input-table td:has(select) {\n min-width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table {\n margin-top: 20px;\n margin-right: 20px;\n margin-bottom: 10px;\n}\n\n.st-translator-output-table table {\n width: 100%;\n table-layout: fixed;\n}\n\n.st-translator-output-table td {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.st-translator-output-table tr:nth-child(even) {\n background-color: var(--grey-1);\n}\n\n.st-translator-output-table td:nth-child(odd) {\n width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table td a {\n overflow-wrap: break-word;\n}\n","",{version:3,sources:["webpack://./src/apps/translator/view/style.css"],names:[],mappings:"AAAA,gGAAgG;AAChG;EACE,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,WAAW;EACX,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,+BAA+B;AACjC;;AAEA;EACE,YAAY;EACZ,mBAAmB;AACrB;;AAEA;EACE,yBAAyB;AAC3B",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n.st-translator-input-table {\n /* width: 100%; */\n margin-right: 20px;\n}\n\n.st-translator-input-table td:has(textarea) {\n width: 100%;\n}\n\n.st-translator-input-table td:has(select) {\n min-width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table {\n margin-top: 20px;\n margin-right: 20px;\n margin-bottom: 10px;\n}\n\n.st-translator-output-table table {\n width: 100%;\n table-layout: fixed;\n}\n\n.st-translator-output-table td {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.st-translator-output-table tr:nth-child(even) {\n background-color: var(--grey-1);\n}\n\n.st-translator-output-table td:nth-child(odd) {\n width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table td a {\n overflow-wrap: break-word;\n}\n"],sourceRoot:""}]);const a=s},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},354:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},982:function(t,e,n){var r;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,r,o,i){for(var s,a,u,l,c,f,h,p,d,g,m,y,v;i>=64;){for(s=n[0],a=n[1],u=n[2],l=n[3],c=n[4],f=n[5],h=n[6],p=n[7],g=0;g<16;g++)m=o+4*g,t[g]=(255&r[m])<<24|(255&r[m+1])<<16|(255&r[m+2])<<8|255&r[m+3];for(g=16;g<64;g++)y=((d=t[g-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,v=((d=t[g-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[g]=(y+t[g-7]|0)+(v+t[g-16]|0);for(g=0;g<64;g++)y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&h)|0)+(p+(e[g]+t[g]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&a^s&u^a&u)|0,p=h,h=f,f=c,c=l+y|0,l=u,u=a,a=s,s=y+v|0;n[0]+=s,n[1]+=a,n[2]+=u,n[3]+=l,n[4]+=c,n[5]+=f,n[6]+=h,n[7]+=p,o+=64,i-=64}return o}var r=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[r++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(r=n(this.temp,this.state,t,r,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[r++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,r=this.bufferLength,o=e/536870912|0,i=e<<3,s=e%64<56?64:128;this.buffer[r]=128;for(var a=r+1;a<s-8;a++)this.buffer[a]=0;this.buffer[s-8]=o>>>24&255,this.buffer[s-7]=o>>>16&255,this.buffer[s-6]=o>>>8&255,this.buffer[s-5]=o>>>0&255,this.buffer[s-4]=i>>>24&255,this.buffer[s-3]=i>>>16&255,this.buffer[s-2]=i>>>8&255,this.buffer[s-1]=i>>>0&255,n(this.temp,this.state,this.buffer,0,s),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=r;var o=function(){function t(t){this.inner=new r,this.outer=new r,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new r).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function i(t){var e=(new r).update(t),n=e.digest();return e.clean(),n}function s(t,e){var n=new o(t).update(e),r=n.digest();return n.clean(),r}function a(t,e,n,r){var o=r[0];if(0===o)throw new Error("hkdf: cannot expand more");e.reset(),o>1&&e.update(t),n&&e.update(n),e.update(r),e.finish(t),r[0]++}t.HMAC=o,t.hash=i,t.default=i,t.hmac=s;var u=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,r){void 0===e&&(e=u),void 0===r&&(r=32);for(var i=new Uint8Array([1]),l=s(e,t),c=new o(l),f=new Uint8Array(c.digestLength),h=f.length,p=new Uint8Array(r),d=0;d<r;d++)h===f.length&&(a(f,c,n,i),h=0),p[d]=f[h++];return c.clean(),f.fill(0),i.fill(0),p},t.pbkdf2=function(t,e,n,r){for(var i=new o(t),s=i.digestLength,a=new Uint8Array(4),u=new Uint8Array(s),l=new Uint8Array(s),c=new Uint8Array(r),f=0;f*s<r;f++){var h=f+1;a[0]=h>>>24&255,a[1]=h>>>16&255,a[2]=h>>>8&255,a[3]=h>>>0&255,i.reset(),i.update(e),i.update(a),i.finish(l);for(var p=0;p<s;p++)u[p]=l[p];for(p=2;p<=n;p++){i.reset(),i.update(l).finish(l);for(var d=0;d<s;d++)u[d]^=l[d]}for(p=0;p<s&&f*s+p<r;p++)c[f*s+p]=u[p]}for(f=0;f<s;f++)u[f]=l[f]=0;for(f=0;f<4;f++)a[f]=0;return i.clean(),c}}(e);var o=e.default;for(var i in e)o[i]=e[i];"object"==typeof t.exports?t.exports=o:void 0===(r=function(){return o}.call(e,n,e,t))||(t.exports=r)}()},543:function(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,p=4294967295,d=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",C="[object Function]",w="[object GeneratorFunction]",A="[object Map]",_="[object Number]",E="[object Object]",x="[object Promise]",T="[object RegExp]",I="[object Set]",P="[object String]",S="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",O="[object DataView]",N="[object Float32Array]",$="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",H="[object Int32Array]",B="[object Uint8Array]",F="[object Uint8ClampedArray]",k="[object Uint16Array]",G="[object Uint32Array]",j=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Y=RegExp(W.source),K=RegExp(q.source),z=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,Ct=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_t="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="["+wt+"]",St="["+It+"]",Lt="["+At+"]",Mt="\\d+",Ot="["+_t+"]",Nt="["+Et+"]",$t="[^"+wt+It+Mt+_t+Et+xt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Dt="[^"+wt+"]",Ht="(?:\\ud83c[\\udde6-\\uddff]){2}",Bt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+xt+"]",kt="\\u200d",Gt="(?:"+Nt+"|"+$t+")",jt="(?:"+Ft+"|"+$t+")",Ut="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Wt="(?:"+Lt+"|"+Rt+")?",qt="["+Tt+"]?",Yt=qt+Wt+"(?:"+kt+"(?:"+[Dt,Ht,Bt].join("|")+")"+qt+Wt+")*",Kt="(?:"+[Ot,Ht,Bt].join("|")+")"+Yt,zt="(?:"+[Dt+Lt+"?",Lt,Ht,Bt,Pt].join("|")+")",Jt=RegExp("['’]","g"),Qt=RegExp(Lt,"g"),Xt=RegExp(Rt+"(?="+Rt+")|"+zt+Yt,"g"),Zt=RegExp([Ft+"?"+Nt+"+"+Ut+"(?="+[St,Ft,"$"].join("|")+")",jt+"+"+Vt+"(?="+[St,Ft+Gt,"$"].join("|")+")",Ft+"?"+Gt+"+"+Ut,Ft+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mt,Kt].join("|"),"g"),te=RegExp("["+kt+wt+At+Tt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,oe={};oe[N]=oe[$]=oe[R]=oe[D]=oe[H]=oe[B]=oe[F]=oe[k]=oe[G]=!0,oe[g]=oe[m]=oe[M]=oe[y]=oe[O]=oe[v]=oe[b]=oe[C]=oe[A]=oe[_]=oe[E]=oe[T]=oe[I]=oe[P]=oe[L]=!1;var ie={};ie[g]=ie[m]=ie[M]=ie[O]=ie[y]=ie[v]=ie[N]=ie[$]=ie[R]=ie[D]=ie[H]=ie[A]=ie[_]=ie[E]=ie[T]=ie[I]=ie[P]=ie[S]=ie[B]=ie[F]=ie[k]=ie[G]=!0,ie[b]=ie[C]=ie[L]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ce="object"==typeof self&&self&&self.Object===Object&&self,fe=le||ce||Function("return this")(),he=e&&!e.nodeType&&e,pe=he&&t&&!t.nodeType&&t,de=pe&&pe.exports===he,ge=de&&le.process,me=function(){try{return pe&&pe.require&&pe.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=me&&me.isArrayBuffer,ve=me&&me.isDate,be=me&&me.isMap,Ce=me&&me.isRegExp,we=me&&me.isSet,Ae=me&&me.isTypedArray;function _e(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function xe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Pe(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Se(t,e){return!(null==t||!t.length)&&Fe(t,e,0)>-1}function Le(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Me(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Oe(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ne(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function $e(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var De=Ue("length");function He(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Be(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Fe(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Be(t,Ge,n)}function ke(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Ge(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:h}function Ue(t){return function(e){return null==e?o:e[t]}}function Ve(t){return function(e){return null==t?o:t[e]}}function We(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function qe(t,e){for(var n,r=-1,i=t.length;++r<i;){var s=e(t[r]);s!==o&&(n=n===o?s:n+s)}return n}function Ye(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function ze(t){return function(e){return t(e)}}function Je(t,e){return Me(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function Xe(t,e){for(var n=-1,r=t.length;++n<r&&Fe(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Fe(e,t[n],0)>-1;);return n}var tn=Ve({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=Ve({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,i[o++]=n)}return i}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return rn(t)?function(t){for(var e=Xt.lastIndex=0;Xt.test(t);)++e;return e}(t):De(t)}function fn(t){return rn(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var pn=Ve({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dn=function t(e){var n,r=(e=null==e?fe:dn.defaults(fe.Object(),e,dn.pick(fe,ne))).Array,ot=e.Date,wt=e.Error,At=e.Function,_t=e.Math,Et=e.Object,xt=e.RegExp,Tt=e.String,It=e.TypeError,Pt=r.prototype,St=At.prototype,Lt=Et.prototype,Mt=e["__core-js_shared__"],Ot=St.toString,Nt=Lt.hasOwnProperty,$t=0,Rt=(n=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Dt=Lt.toString,Ht=Ot.call(Et),Bt=fe._,Ft=xt("^"+Ot.call(Nt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kt=de?e.Buffer:o,Gt=e.Symbol,jt=e.Uint8Array,Ut=kt?kt.allocUnsafe:o,Vt=sn(Et.getPrototypeOf,Et),Wt=Et.create,qt=Lt.propertyIsEnumerable,Yt=Pt.splice,Kt=Gt?Gt.isConcatSpreadable:o,zt=Gt?Gt.iterator:o,Xt=Gt?Gt.toStringTag:o,te=function(){try{var t=li(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,le=ot&&ot.now!==fe.Date.now&&ot.now,ce=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=_t.ceil,pe=_t.floor,ge=Et.getOwnPropertySymbols,me=kt?kt.isBuffer:o,De=e.isFinite,Ve=Pt.join,gn=sn(Et.keys,Et),mn=_t.max,yn=_t.min,vn=ot.now,bn=e.parseInt,Cn=_t.random,wn=Pt.reverse,An=li(e,"DataView"),_n=li(e,"Map"),En=li(e,"Promise"),xn=li(e,"Set"),Tn=li(e,"WeakMap"),In=li(Et,"create"),Pn=Tn&&new Tn,Sn={},Ln=Hi(An),Mn=Hi(_n),On=Hi(En),Nn=Hi(xn),$n=Hi(Tn),Rn=Gt?Gt.prototype:o,Dn=Rn?Rn.valueOf:o,Hn=Rn?Rn.toString:o;function Bn(t){if(ta(t)&&!Us(t)&&!(t instanceof jn)){if(t instanceof Gn)return t;if(Nt.call(t,"__wrapped__"))return Bi(t)}return new Gn(t)}var Fn=function(){function t(){}return function(e){if(!Zs(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function kn(){}function Gn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Vn(t);this.size=e.size}function Kn(t,e){var n=Us(t),r=!n&&js(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&ua(t),s=n||r||o||i,a=s?Ye(t.length,Tt):[],u=a.length;for(var l in t)!e&&!Nt.call(t,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||mi(l,u))||a.push(l);return a}function zn(t){var e=t.length;return e?t[Wr(0,e-1)]:o}function Jn(t,e){return Oi(Io(t),ir(e,0,t.length))}function Qn(t){return Oi(Io(t))}function Xn(t,e,n){(n!==o&&!Fs(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Zn(t,e,n){var r=t[e];Nt.call(t,e)&&Fs(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Fs(t[n][0],e))return n;return-1}function er(t,e,n,r){return cr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function nr(t,e){return t&&Po(e,La(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,s=r(i),a=null==t;++n<i;)s[n]=a?o:xa(t,e[n]);return s}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function sr(t,e,n,r,i,s){var a,u=1&e,l=2&e,c=4&e;if(n&&(a=i?n(t,r,i,s):n(t)),a!==o)return a;if(!Zs(t))return t;var f=Us(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Nt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Io(t,a)}else{var h=hi(t),p=h==C||h==w;if(Ys(t))return wo(t,u);if(h==E||h==g||p&&!i){if(a=l||p?{}:di(t),!u)return l?function(t,e){return Po(t,fi(t),e)}(t,function(t,e){return t&&Po(e,Ma(e),t)}(a,t)):function(t,e){return Po(t,ci(t),e)}(t,nr(a,t))}else{if(!ie[h])return i?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case M:return Ao(t);case y:case v:return new o(+t);case O:return function(t,e){var n=e?Ao(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case N:case $:case R:case D:case H:case B:case F:case k:case G:return _o(t,n);case A:return new o;case _:case P:return new o(t);case T:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new o;case S:return r=t,Dn?Et(Dn.call(r)):{}}}(t,h,u)}}s||(s=new Yn);var d=s.get(t);if(d)return d;s.set(t,a),ia(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,o){a.set(o,sr(r,e,n,o,t,s))}));var m=f?o:(c?l?ni:ei:l?Ma:La)(t);return xe(m||t,(function(r,o){m&&(r=t[o=r]),Zn(a,o,sr(r,e,n,o,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var i=n[r],s=e[i],a=t[i];if(a===o&&!(i in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new It(i);return Pi((function(){t.apply(o,n)}),e)}function lr(t,e,n,r){var o=-1,i=Se,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;n&&(e=Me(e,ze(n))),r?(i=Le,s=!1):e.length>=200&&(i=Qe,s=!1,e=new qn(e));t:for(;++o<a;){var c=t[o],f=null==n?c:n(c);if(c=r||0!==c?c:0,s&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else i(e,f,r)||u.push(c)}return u}Bn.templateSettings={escape:z,evaluate:J,interpolate:Q,variable:"",imports:{_:Bn}},Bn.prototype=kn.prototype,Bn.prototype.constructor=Bn,Gn.prototype=Fn(kn.prototype),Gn.prototype.constructor=Gn,jn.prototype=Fn(kn.prototype),jn.prototype.constructor=jn,Un.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(t){var e=this.__data__;if(In){var n=e[t];return n===s?o:n}return Nt.call(e,t)?e[t]:o},Un.prototype.has=function(t){var e=this.__data__;return In?e[t]!==o:Nt.call(e,t)},Un.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=In&&e===o?s:e,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Vn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Vn.prototype.has=function(t){return tr(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(_n||Vn),string:new Un}},Wn.prototype.delete=function(t){var e=ai(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return ai(this,t).get(t)},Wn.prototype.has=function(t){return ai(this,t).has(t)},Wn.prototype.set=function(t,e){var n=ai(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,s),this},qn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!_n||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var cr=Mo(vr),fr=Mo(br,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function pr(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],a=e(s);if(null!=a&&(u===o?a==a&&!aa(a):n(a,u)))var u=a,l=s}return l}function dr(t,e){var n=[];return cr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function gr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=gi),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?gr(a,e-1,n,r,o):Oe(o,a):r||(o[o.length]=a)}return o}var mr=Oo(),yr=Oo(!0);function vr(t,e){return t&&mr(t,e,La)}function br(t,e){return t&&yr(t,e,La)}function Cr(t,e){return Pe(e,(function(e){return Js(t[e])}))}function wr(t,e){for(var n=0,r=(e=yo(e,t)).length;null!=t&&n<r;)t=t[Di(e[n++])];return n&&n==r?t:o}function Ar(t,e,n){var r=e(t);return Us(t)?r:Oe(r,n(t))}function _r(t){return null==t?t===o?"[object Undefined]":"[object Null]":Xt&&Xt in Et(t)?function(t){var e=Nt.call(t,Xt),n=t[Xt];try{t[Xt]=o;var r=!0}catch(t){}var i=Dt.call(t);return r&&(e?t[Xt]=n:delete t[Xt]),i}(t):function(t){return Dt.call(t)}(t)}function Er(t,e){return t>e}function xr(t,e){return null!=t&&Nt.call(t,e)}function Tr(t,e){return null!=t&&e in Et(t)}function Ir(t,e,n){for(var i=n?Le:Se,s=t[0].length,a=t.length,u=a,l=r(a),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Me(h,ze(e))),c=yn(h.length,c),l[u]=!n&&(e||s>=120&&h.length>=120)?new qn(u&&h):o}h=t[0];var p=-1,d=l[0];t:for(;++p<s&&f.length<c;){var g=h[p],m=e?e(g):g;if(g=n||0!==g?g:0,!(d?Qe(d,m):i(f,m,n))){for(u=a;--u;){var y=l[u];if(!(y?Qe(y,m):i(t[u],m,n)))continue t}d&&d.push(m),f.push(g)}}return f}function Pr(t,e,n){var r=null==(t=xi(t,e=yo(e,t)))?t:t[Di(zi(e))];return null==r?o:_e(r,t,n)}function Sr(t){return ta(t)&&_r(t)==g}function Lr(t,e,n,r,i){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,i,s){var a=Us(t),u=Us(e),l=a?m:hi(t),c=u?m:hi(e),f=(l=l==g?E:l)==E,h=(c=c==g?E:c)==E,p=l==c;if(p&&Ys(t)){if(!Ys(e))return!1;a=!0,f=!1}if(p&&!f)return s||(s=new Yn),a||ua(t)?Zo(t,e,n,r,i,s):function(t,e,n,r,o,i,s){switch(n){case O:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!i(new jt(t),new jt(e)));case y:case v:case _:return Fs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case T:case P:return t==e+"";case A:var a=on;case I:var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;r|=2,s.set(t,e);var c=Zo(a(t),a(e),r,o,i,s);return s.delete(t),c;case S:if(Dn)return Dn.call(t)==Dn.call(e)}return!1}(t,e,l,n,r,i,s);if(!(1&n)){var d=f&&Nt.call(t,"__wrapped__"),C=h&&Nt.call(e,"__wrapped__");if(d||C){var w=d?t.value():t,x=C?e.value():e;return s||(s=new Yn),i(w,x,n,r,s)}}return!!p&&(s||(s=new Yn),function(t,e,n,r,i,s){var a=1&n,u=ei(t),l=u.length;if(l!=ei(e).length&&!a)return!1;for(var c=l;c--;){var f=u[c];if(!(a?f in e:Nt.call(e,f)))return!1}var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var d=!0;s.set(t,e),s.set(e,t);for(var g=a;++c<l;){var m=t[f=u[c]],y=e[f];if(r)var v=a?r(y,m,f,e,t,s):r(m,y,f,t,e,s);if(!(v===o?m===y||i(m,y,n,r,s):v)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var b=t.constructor,C=e.constructor;b==C||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof C&&C instanceof C||(d=!1)}return s.delete(t),s.delete(e),d}(t,e,n,r,i,s))}(t,e,n,r,Lr,i))}function Mr(t,e,n,r){var i=n.length,s=i,a=!r;if(null==t)return!s;for(t=Et(t);i--;){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<s;){var l=(u=n[i])[0],c=t[l],f=u[1];if(a&&u[2]){if(c===o&&!(l in t))return!1}else{var h=new Yn;if(r)var p=r(c,f,l,t,e,h);if(!(p===o?Lr(f,c,3,r,h):p))return!1}}return!0}function Or(t){return!(!Zs(t)||(e=t,Rt&&Rt in e))&&(Js(t)?Ft:gt).test(Hi(t));var e}function Nr(t){return"function"==typeof t?t:null==t?nu:"object"==typeof t?Us(t)?Br(t[0],t[1]):Hr(t):fu(t)}function $r(t){if(!wi(t))return gn(t);var e=[];for(var n in Et(t))Nt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t,e){return t<e}function Dr(t,e){var n=-1,o=Ws(t)?r(t.length):[];return cr(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Hr(t){var e=ui(t);return 1==e.length&&e[0][2]?_i(e[0][0],e[0][1]):function(n){return n===t||Mr(n,t,e)}}function Br(t,e){return vi(t)&&Ai(e)?_i(Di(t),e):function(n){var r=xa(n,t);return r===o&&r===e?Ta(n,t):Lr(e,r,3)}}function Fr(t,e,n,r,i){t!==e&&mr(e,(function(s,a){if(i||(i=new Yn),Zs(s))!function(t,e,n,r,i,s,a){var u=Ti(t,n),l=Ti(e,n),c=a.get(l);if(c)Xn(t,n,c);else{var f=s?s(u,l,n+"",t,e,a):o,h=f===o;if(h){var p=Us(l),d=!p&&Ys(l),g=!p&&!d&&ua(l);f=l,p||d||g?Us(u)?f=u:qs(u)?f=Io(u):d?(h=!1,f=wo(l,!0)):g?(h=!1,f=_o(l,!0)):f=[]:ra(l)||js(l)?(f=u,js(u)?f=ma(u):Zs(u)&&!Js(u)||(f=di(l))):h=!1}h&&(a.set(l,f),i(f,l,r,s,a),a.delete(l)),Xn(t,n,f)}}(t,e,a,n,Fr,r,i);else{var u=r?r(Ti(t,a),s,a+"",t,e,i):o;u===o&&(u=s),Xn(t,a,u)}}),Ma)}function kr(t,e){var n=t.length;if(n)return mi(e+=e<0?n:0,n)?t[e]:o}function Gr(t,e,n){e=e.length?Me(e,(function(t){return Us(t)?function(e){return wr(e,1===t.length?t[0]:t)}:t})):[nu];var r=-1;e=Me(e,ze(si()));var o=Dr(t,(function(t,n,o){var i=Me(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var e=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var u=Eo(o[r],i[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));e--;)t[e]=t[e].value;return t}(o)}function jr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=wr(t,s);n(a,s)&&Jr(i,yo(s,t),a)}return i}function Ur(t,e,n,r){var o=r?ke:Fe,i=-1,s=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Me(t,ze(n)));++i<s;)for(var u=0,l=e[i],c=n?n(l):l;(u=o(a,c,u,r))>-1;)a!==t&&Yt.call(a,u,1),Yt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;mi(o)?Yt.call(t,o,1):uo(t,o)}}return t}function Wr(t,e){return t+pe(Cn()*(e-t+1))}function qr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=pe(e/2))&&(t+=t)}while(e);return n}function Yr(t,e){return Si(Ei(t,e,nu),t+"")}function Kr(t){return zn(Fa(t))}function zr(t,e){var n=Fa(t);return Oi(n,ir(e,0,n.length))}function Jr(t,e,n,r){if(!Zs(t))return t;for(var i=-1,s=(e=yo(e,t)).length,a=s-1,u=t;null!=u&&++i<s;){var l=Di(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=a){var f=u[l];(c=r?r(f,l,u):o)===o&&(c=Zs(f)?f:mi(e[i+1])?[]:{})}Zn(u,l,c),u=u[l]}return t}var Qr=Pn?function(t,e){return Pn.set(t,e),t}:nu,Xr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:nu;function Zr(t){return Oi(Fa(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=r(i);++o<i;)s[o]=t[o+e];return s}function eo(t,e){var n;return cr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!aa(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ro(t,e,nu,n)}function ro(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,u=null===e,l=aa(e),c=e===o;i<s;){var f=pe((i+s)/2),h=n(t[f]),p=h!==o,d=null===h,g=h==h,m=aa(h);if(a)var y=r||g;else y=c?g&&(r||p):u?g&&p&&(r||!d):l?g&&p&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);y?i=f+1:s=f}return yn(s,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Fs(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function io(t){return"number"==typeof t?t:aa(t)?h:+t}function so(t){if("string"==typeof t)return t;if(Us(t))return Me(t,so)+"";if(aa(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ao(t,e,n){var r=-1,o=Se,i=t.length,s=!0,a=[],u=a;if(n)s=!1,o=Le;else if(i>=200){var l=e?null:Yo(t);if(l)return un(l);s=!1,o=Qe,u=new qn}else u=e?[]:a;t:for(;++r<i;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),a.push(c)}else o(u,f,n)||(u!==a&&u.push(f),a.push(c))}return a}function uo(t,e){return null==(t=xi(t,e=yo(e,t)))||delete t[Di(zi(e))]}function lo(t,e,n,r){return Jr(t,e,n(wr(t,e)),r)}function co(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function fo(t,e){var n=t;return n instanceof jn&&(n=n.value()),Ne(e,(function(t,e){return e.func.apply(e.thisArg,Oe([t],e.args))}),n)}function ho(t,e,n){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,s=r(o);++i<o;)for(var a=t[i],u=-1;++u<o;)u!=i&&(s[i]=lr(s[i]||a,t[u],e,n));return ao(gr(s,1),e,n)}function po(t,e,n){for(var r=-1,i=t.length,s=e.length,a={};++r<i;){var u=r<s?e[r]:o;n(a,t[r],u)}return a}function go(t){return qs(t)?t:[]}function mo(t){return"function"==typeof t?t:nu}function yo(t,e){return Us(t)?t:vi(t,e)?[t]:Ri(ya(t))}var vo=Yr;function bo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var Co=se||function(t){return fe.clearTimeout(t)};function wo(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Ao(t){var e=new t.constructor(t.byteLength);return new jt(e).set(new jt(t)),e}function _o(t,e){var n=e?Ao(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Eo(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,s=aa(t),a=e!==o,u=null===e,l=e==e,c=aa(e);if(!u&&!c&&!s&&t>e||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!s&&!c&&t<e||c&&n&&i&&!r&&!s||u&&n&&i||!a&&i||!l)return-1}return 0}function xo(t,e,n,o){for(var i=-1,s=t.length,a=n.length,u=-1,l=e.length,c=mn(s-a,0),f=r(l+c),h=!o;++u<l;)f[u]=e[u];for(;++i<a;)(h||i<s)&&(f[n[i]]=t[i]);for(;c--;)f[u++]=t[i++];return f}function To(t,e,n,o){for(var i=-1,s=t.length,a=-1,u=n.length,l=-1,c=e.length,f=mn(s-u,0),h=r(f+c),p=!o;++i<f;)h[i]=t[i];for(var d=i;++l<c;)h[d+l]=e[l];for(;++a<u;)(p||i<s)&&(h[d+n[a]]=t[i++]);return h}function Io(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Po(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var u=e[s],l=r?r(n[u],t[u],u,n,t):o;l===o&&(l=t[u]),i?rr(n,u,l):Zn(n,u,l)}return n}function So(t,e){return function(n,r){var o=Us(n)?Ee:er,i=e?e():{};return o(n,t,si(r,2),i)}}function Lo(t){return Yr((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;for(s=t.length>3&&"function"==typeof s?(i--,s):o,a&&yi(n[0],n[1],a)&&(s=i<3?o:s,i=1),e=Et(e);++r<i;){var u=n[r];u&&t(e,u,r,s)}return e}))}function Mo(t,e){return function(n,r){if(null==n)return n;if(!Ws(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Et(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Oo(t){return function(e,n,r){for(var o=-1,i=Et(e),s=r(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===n(i[u],u,i))break}return e}}function No(t){return function(e){var n=rn(e=ya(e))?fn(e):o,r=n?n[0]:e.charAt(0),i=n?bo(n,1).join(""):e.slice(1);return r[t]()+i}}function $o(t){return function(e){return Ne(Ja(ja(e).replace(Jt,"")),t,"")}}function Ro(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Fn(t.prototype),r=t.apply(n,e);return Zs(r)?r:n}}function Do(t){return function(e,n,r){var i=Et(e);if(!Ws(e)){var s=si(n,3);e=La(e),n=function(t){return s(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[s?e[a]:a]:o}}function Ho(t){return ti((function(e){var n=e.length,r=n,s=Gn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(i);if(s&&!u&&"wrapper"==oi(a))var u=new Gn([],!0)}for(r=u?r:n;++r<n;){var l=oi(a=e[r]),c="wrapper"==l?ri(a):o;u=c&&bi(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[oi(c[0])].apply(u,c[3]):1==a.length&&bi(a)?u[l]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Us(r))return u.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function Bo(t,e,n,i,s,a,u,c,f,h){var p=e&l,d=1&e,g=2&e,m=24&e,y=512&e,v=g?o:Ro(t);return function l(){for(var b=arguments.length,C=r(b),w=b;w--;)C[w]=arguments[w];if(m)var A=ii(l),_=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(C,A);if(i&&(C=xo(C,i,s,m)),a&&(C=To(C,a,u,m)),b-=_,m&&b<h){var E=an(C,A);return Wo(t,e,Bo,l.placeholder,n,C,E,c,f,h-b)}var x=d?n:this,T=g?x[t]:t;return b=C.length,c?C=function(t,e){for(var n=t.length,r=yn(e.length,n),i=Io(t);r--;){var s=e[r];t[r]=mi(s,n)?i[s]:o}return t}(C,c):y&&b>1&&C.reverse(),p&&f<b&&(C.length=f),this&&this!==fe&&this instanceof l&&(T=v||Ro(T)),T.apply(x,C)}}function Fo(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function ko(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Go(t){return ti((function(e){return e=Me(e,ze(si())),Yr((function(n){var r=this;return t(e,(function(t){return _e(t,r,n)}))}))}))}function jo(t,e){var n=(e=e===o?" ":so(e)).length;if(n<2)return n?qr(e,t):e;var r=qr(e,he(t/cn(e)));return rn(e)?bo(fn(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,i){return i&&"number"!=typeof i&&yi(e,n,i)&&(n=i=o),e=ha(e),n===o?(n=e,e=0):n=ha(n),function(t,e,n,o){for(var i=-1,s=mn(he((e-t)/(n||1)),0),a=r(s);s--;)a[o?s:++i]=t,t+=n;return a}(e,n,i=i===o?e<n?1:-1:ha(i),t)}}function Vo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ga(e),n=ga(n)),t(e,n)}}function Wo(t,e,n,r,i,s,a,l,c,f){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var p=[t,e,i,h?s:o,h?a:o,h?o:s,h?o:a,l,c,f],d=n.apply(o,p);return bi(t)&&Ii(d,p),d.placeholder=r,Li(d,t,e)}function qo(t){var e=_t[t];return function(t,n){if(t=ga(t),(n=null==n?0:yn(pa(n),292))&&De(t)){var r=(ya(t)+"e").split("e");return+((r=(ya(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Yo=xn&&1/un(new xn([,-0]))[1]==c?function(t){return new xn(t)}:au;function Ko(t){return function(e){var n=hi(e);return n==A?on(e):n==I?ln(e):function(t,e){return Me(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function zo(t,e,n,s,c,f,h,p){var d=2&e;if(!d&&"function"!=typeof t)throw new It(i);var g=s?s.length:0;if(g||(e&=-97,s=c=o),h=h===o?h:mn(pa(h),0),p=p===o?p:pa(p),g-=c?c.length:0,64&e){var m=s,y=c;s=c=o}var v=d?o:ri(t),b=[t,e,n,s,c,m,y,f,h,p];if(v&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,s=r==l&&8==n||r==l&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!s)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?xo(c,u,e[4]):u,t[4]=c?an(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?To(c,u,e[6]):u,t[6]=c?an(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&l&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(b,v),t=b[0],e=b[1],n=b[2],s=b[3],c=b[4],!(p=b[9]=b[9]===o?d?0:t.length:mn(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)C=8==e||16==e?function(t,e,n){var i=Ro(t);return function s(){for(var a=arguments.length,u=r(a),l=a,c=ii(s);l--;)u[l]=arguments[l];var f=a<3&&u[0]!==c&&u[a-1]!==c?[]:an(u,c);return(a-=f.length)<n?Wo(t,e,Bo,s.placeholder,o,u,f,o,o,n-a):_e(this&&this!==fe&&this instanceof s?i:t,this,u)}}(t,e,p):e!=u&&33!=e||c.length?Bo.apply(o,b):function(t,e,n,o){var i=1&e,s=Ro(t);return function e(){for(var a=-1,u=arguments.length,l=-1,c=o.length,f=r(c+u),h=this&&this!==fe&&this instanceof e?s:t;++l<c;)f[l]=o[l];for(;u--;)f[l++]=arguments[++a];return _e(h,i?n:this,f)}}(t,e,n,s);else var C=function(t,e,n){var r=1&e,o=Ro(t);return function e(){return(this&&this!==fe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Li((v?Qr:Ii)(C,b),t,e)}function Jo(t,e,n,r){return t===o||Fs(t,Lt[n])&&!Nt.call(r,n)?e:t}function Qo(t,e,n,r,i,s){return Zs(t)&&Zs(e)&&(s.set(e,t),Fr(t,e,o,Qo,s),s.delete(e)),t}function Xo(t){return ra(t)?o:t}function Zo(t,e,n,r,i,s){var a=1&n,u=t.length,l=e.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(t),f=s.get(e);if(c&&f)return c==e&&f==t;var h=-1,p=!0,d=2&n?new qn:o;for(s.set(t,e),s.set(e,t);++h<u;){var g=t[h],m=e[h];if(r)var y=a?r(m,g,h,e,t,s):r(g,m,h,t,e,s);if(y!==o){if(y)continue;p=!1;break}if(d){if(!Re(e,(function(t,e){if(!Qe(d,e)&&(g===t||i(g,t,n,r,s)))return d.push(e)}))){p=!1;break}}else if(g!==m&&!i(g,m,n,r,s)){p=!1;break}}return s.delete(t),s.delete(e),p}function ti(t){return Si(Ei(t,o,Vi),t+"")}function ei(t){return Ar(t,La,ci)}function ni(t){return Ar(t,Ma,fi)}var ri=Pn?function(t){return Pn.get(t)}:au;function oi(t){for(var e=t.name+"",n=Sn[e],r=Nt.call(Sn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Nt.call(Bn,"placeholder")?Bn:t).placeholder}function si(){var t=Bn.iteratee||ru;return t=t===ru?Nr:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function ui(t){for(var e=La(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Ai(o)]}return e}function li(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Or(n)?n:o}var ci=ge?function(t){return null==t?[]:(t=Et(t),Pe(ge(t),(function(e){return qt.call(t,e)})))}:du,fi=ge?function(t){for(var e=[];t;)Oe(e,ci(t)),t=Vt(t);return e}:du,hi=_r;function pi(t,e,n){for(var r=-1,o=(e=yo(e,t)).length,i=!1;++r<o;){var s=Di(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Xs(o)&&mi(s,o)&&(Us(t)||js(t))}function di(t){return"function"!=typeof t.constructor||wi(t)?{}:Fn(Vt(t))}function gi(t){return Us(t)||js(t)||!!(Kt&&t&&t[Kt])}function mi(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yi(t,e,n){if(!Zs(n))return!1;var r=typeof e;return!!("number"==r?Ws(n)&&mi(e,n.length):"string"==r&&e in n)&&Fs(n[e],t)}function vi(t,e){if(Us(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||Z.test(t)||!X.test(t)||null!=e&&t in Et(e)}function bi(t){var e=oi(t),n=Bn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(An&&hi(new An(new ArrayBuffer(1)))!=O||_n&&hi(new _n)!=A||En&&hi(En.resolve())!=x||xn&&hi(new xn)!=I||Tn&&hi(new Tn)!=L)&&(hi=function(t){var e=_r(t),n=e==E?t.constructor:o,r=n?Hi(n):"";if(r)switch(r){case Ln:return O;case Mn:return A;case On:return x;case Nn:return I;case $n:return L}return e});var Ci=Mt?Js:gu;function wi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function Ai(t){return t==t&&!Zs(t)}function _i(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in Et(n))}}function Ei(t,e,n){return e=mn(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,s=mn(o.length-e,0),a=r(s);++i<s;)a[i]=o[e+i];i=-1;for(var u=r(e+1);++i<e;)u[i]=o[i];return u[e]=n(a),_e(t,this,u)}}function xi(t,e){return e.length<2?t:wr(t,to(e,0,-1))}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Mi(Qr),Pi=ce||function(t,e){return fe.setTimeout(t,e)},Si=Mi(Xr);function Li(t,e,n){var r=e+"";return Si(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return xe(d,(function(n){var r="_."+n[0];e&n[1]&&!Se(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Mi(t){var e=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Oi(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var s=Wr(n,i),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Ni,$i,Ri=(Ni=Ns((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ct,"$1"):n||t)})),e}),(function(t){return 500===$i.size&&$i.clear(),t})),$i=Ni.cache,Ni);function Di(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Hi(t){if(null!=t){try{return Ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Bi(t){if(t instanceof jn)return t.clone();var e=new Gn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Fi=Yr((function(t,e){return qs(t)?lr(t,gr(e,1,qs,!0)):[]})),ki=Yr((function(t,e){var n=zi(e);return qs(n)&&(n=o),qs(t)?lr(t,gr(e,1,qs,!0),si(n,2)):[]})),Gi=Yr((function(t,e){var n=zi(e);return qs(n)&&(n=o),qs(t)?lr(t,gr(e,1,qs,!0),o,n):[]}));function ji(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:pa(n);return o<0&&(o=mn(r+o,0)),Be(t,si(e,3),o)}function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=pa(n),i=n<0?mn(r+i,0):yn(i,r-1)),Be(t,si(e,3),i,!0)}function Vi(t){return null!=t&&t.length?gr(t,1):[]}function Wi(t){return t&&t.length?t[0]:o}var qi=Yr((function(t){var e=Me(t,go);return e.length&&e[0]===t[0]?Ir(e):[]})),Yi=Yr((function(t){var e=zi(t),n=Me(t,go);return e===zi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Ir(n,si(e,2)):[]})),Ki=Yr((function(t){var e=zi(t),n=Me(t,go);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Ir(n,o,e):[]}));function zi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ji=Yr(Qi);function Qi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Xi=ti((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Vr(t,Me(e,(function(t){return mi(t,n)?+t:t})).sort(Eo)),r}));function Zi(t){return null==t?t:wn.call(t)}var ts=Yr((function(t){return ao(gr(t,1,qs,!0))})),es=Yr((function(t){var e=zi(t);return qs(e)&&(e=o),ao(gr(t,1,qs,!0),si(e,2))})),ns=Yr((function(t){var e=zi(t);return e="function"==typeof e?e:o,ao(gr(t,1,qs,!0),o,e)}));function rs(t){if(!t||!t.length)return[];var e=0;return t=Pe(t,(function(t){if(qs(t))return e=mn(t.length,e),!0})),Ye(e,(function(e){return Me(t,Ue(e))}))}function os(t,e){if(!t||!t.length)return[];var n=rs(t);return null==e?n:Me(n,(function(t){return _e(e,o,t)}))}var is=Yr((function(t,e){return qs(t)?lr(t,e):[]})),ss=Yr((function(t){return ho(Pe(t,qs))})),as=Yr((function(t){var e=zi(t);return qs(e)&&(e=o),ho(Pe(t,qs),si(e,2))})),us=Yr((function(t){var e=zi(t);return e="function"==typeof e?e:o,ho(Pe(t,qs),o,e)})),ls=Yr(rs),cs=Yr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,os(t,n)}));function fs(t){var e=Bn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ps=ti((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof jn&&mi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[i],thisArg:o}),new Gn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),ds=So((function(t,e,n){Nt.call(t,n)?++t[n]:rr(t,n,1)})),gs=Do(ji),ms=Do(Ui);function ys(t,e){return(Us(t)?xe:cr)(t,si(e,3))}function vs(t,e){return(Us(t)?Te:fr)(t,si(e,3))}var bs=So((function(t,e,n){Nt.call(t,n)?t[n].push(e):rr(t,n,[e])})),Cs=Yr((function(t,e,n){var o=-1,i="function"==typeof e,s=Ws(t)?r(t.length):[];return cr(t,(function(t){s[++o]=i?_e(e,t,n):Pr(t,e,n)})),s})),ws=So((function(t,e,n){rr(t,n,e)}));function As(t,e){return(Us(t)?Me:Dr)(t,si(e,3))}var _s=So((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Es=Yr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yi(t,e[0],e[1])?e=[]:n>2&&yi(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,gr(e,1),[])})),xs=le||function(){return fe.Date.now()};function Ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,zo(t,l,o,o,o,o,e)}function Is(t,e){var n;if("function"!=typeof e)throw new It(i);return t=pa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Ps=Yr((function(t,e,n){var r=1;if(n.length){var o=an(n,ii(Ps));r|=u}return zo(t,r,e,n,o)})),Ss=Yr((function(t,e,n){var r=3;if(n.length){var o=an(n,ii(Ss));r|=u}return zo(e,r,t,n,o)}));function Ls(t,e,n){var r,s,a,u,l,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new It(i);function g(e){var n=r,i=s;return r=s=o,f=e,u=t.apply(i,n)}function m(t){var n=t-c;return c===o||n>=e||n<0||p&&t-f>=a}function y(){var t=xs();if(m(t))return v(t);l=Pi(y,function(t){var n=e-(t-c);return p?yn(n,a-(t-f)):n}(t))}function v(t){return l=o,d&&r?g(t):(r=s=o,u)}function b(){var t=xs(),n=m(t);if(r=arguments,s=this,c=t,n){if(l===o)return function(t){return f=t,l=Pi(y,e),h?g(t):u}(c);if(p)return Co(l),l=Pi(y,e),g(c)}return l===o&&(l=Pi(y,e)),u}return e=ga(e)||0,Zs(n)&&(h=!!n.leading,a=(p="maxWait"in n)?mn(ga(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){l!==o&&Co(l),f=0,r=c=s=l=o},b.flush=function(){return l===o?u:v(xs())},b}var Ms=Yr((function(t,e){return ur(t,1,e)})),Os=Yr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Ns(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Ns.Cache||Wn),n}function $s(t){if("function"!=typeof t)throw new It(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ns.Cache=Wn;var Rs=vo((function(t,e){var n=(e=1==e.length&&Us(e[0])?Me(e[0],ze(si())):Me(gr(e,1),ze(si()))).length;return Yr((function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return _e(t,this,r)}))})),Ds=Yr((function(t,e){var n=an(e,ii(Ds));return zo(t,u,o,e,n)})),Hs=Yr((function(t,e){var n=an(e,ii(Hs));return zo(t,64,o,e,n)})),Bs=ti((function(t,e){return zo(t,256,o,o,o,e)}));function Fs(t,e){return t===e||t!=t&&e!=e}var ks=Vo(Er),Gs=Vo((function(t,e){return t>=e})),js=Sr(function(){return arguments}())?Sr:function(t){return ta(t)&&Nt.call(t,"callee")&&!qt.call(t,"callee")},Us=r.isArray,Vs=ye?ze(ye):function(t){return ta(t)&&_r(t)==M};function Ws(t){return null!=t&&Xs(t.length)&&!Js(t)}function qs(t){return ta(t)&&Ws(t)}var Ys=me||gu,Ks=ve?ze(ve):function(t){return ta(t)&&_r(t)==v};function zs(t){if(!ta(t))return!1;var e=_r(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Zs(t))return!1;var e=_r(t);return e==C||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qs(t){return"number"==typeof t&&t==pa(t)}function Xs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Zs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=be?ze(be):function(t){return ta(t)&&hi(t)==A};function na(t){return"number"==typeof t||ta(t)&&_r(t)==_}function ra(t){if(!ta(t)||_r(t)!=E)return!1;var e=Vt(t);if(null===e)return!0;var n=Nt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ot.call(n)==Ht}var oa=Ce?ze(Ce):function(t){return ta(t)&&_r(t)==T},ia=we?ze(we):function(t){return ta(t)&&hi(t)==I};function sa(t){return"string"==typeof t||!Us(t)&&ta(t)&&_r(t)==P}function aa(t){return"symbol"==typeof t||ta(t)&&_r(t)==S}var ua=Ae?ze(Ae):function(t){return ta(t)&&Xs(t.length)&&!!oe[_r(t)]},la=Vo(Rr),ca=Vo((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(Ws(t))return sa(t)?fn(t):Io(t);if(zt&&t[zt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[zt]());var e=hi(t);return(e==A?on:e==I?un:Fa)(t)}function ha(t){return t?(t=ga(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function da(t){return t?ir(pa(t),0,p):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Zs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=dt.test(t);return n||mt.test(t)?ue(t.slice(2),n?2:8):pt.test(t)?h:+t}function ma(t){return Po(t,Ma(t))}function ya(t){return null==t?"":so(t)}var va=Lo((function(t,e){if(wi(e)||Ws(e))Po(e,La(e),t);else for(var n in e)Nt.call(e,n)&&Zn(t,n,e[n])})),ba=Lo((function(t,e){Po(e,Ma(e),t)})),Ca=Lo((function(t,e,n,r){Po(e,Ma(e),t,r)})),wa=Lo((function(t,e,n,r){Po(e,La(e),t,r)})),Aa=ti(or),_a=Yr((function(t,e){t=Et(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&yi(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],a=Ma(s),u=-1,l=a.length;++u<l;){var c=a[u],f=t[c];(f===o||Fs(f,Lt[c])&&!Nt.call(t,c))&&(t[c]=s[c])}return t})),Ea=Yr((function(t){return t.push(o,Qo),_e(Na,o,t)}));function xa(t,e,n){var r=null==t?o:wr(t,e);return r===o?n:r}function Ta(t,e){return null!=t&&pi(t,e,Tr)}var Ia=Fo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),t[e]=n}),Za(nu)),Pa=Fo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),Nt.call(t,e)?t[e].push(n):t[e]=[n]}),si),Sa=Yr(Pr);function La(t){return Ws(t)?Kn(t):$r(t)}function Ma(t){return Ws(t)?Kn(t,!0):function(t){if(!Zs(t))return function(t){var e=[];if(null!=t)for(var n in Et(t))e.push(n);return e}(t);var e=wi(t),n=[];for(var r in t)("constructor"!=r||!e&&Nt.call(t,r))&&n.push(r);return n}(t)}var Oa=Lo((function(t,e,n){Fr(t,e,n)})),Na=Lo((function(t,e,n,r){Fr(t,e,n,r)})),$a=ti((function(t,e){var n={};if(null==t)return n;var r=!1;e=Me(e,(function(e){return e=yo(e,t),r||(r=e.length>1),e})),Po(t,ni(t),n),r&&(n=sr(n,7,Xo));for(var o=e.length;o--;)uo(n,e[o]);return n})),Ra=ti((function(t,e){return null==t?{}:function(t,e){return jr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function Da(t,e){if(null==t)return{};var n=Me(ni(t),(function(t){return[t]}));return e=si(e),jr(t,n,(function(t,n){return e(t,n[0])}))}var Ha=Ko(La),Ba=Ko(Ma);function Fa(t){return null==t?[]:Je(t,La(t))}var ka=$o((function(t,e,n){return e=e.toLowerCase(),t+(n?Ga(e):e)}));function Ga(t){return za(ya(t).toLowerCase())}function ja(t){return(t=ya(t))&&t.replace(vt,tn).replace(Qt,"")}var Ua=$o((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Va=$o((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Wa=No("toLowerCase"),qa=$o((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=$o((function(t,e,n){return t+(n?" ":"")+za(e)})),Ka=$o((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),za=No("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?o:e)===o?function(t){return ee.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Qa=Yr((function(t,e){try{return _e(t,o,e)}catch(t){return zs(t)?t:new wt(t)}})),Xa=ti((function(t,e){return xe(e,(function(e){e=Di(e),rr(t,e,Ps(t[e],t))})),t}));function Za(t){return function(){return t}}var tu=Ho(),eu=Ho(!0);function nu(t){return t}function ru(t){return Nr("function"==typeof t?t:sr(t,1))}var ou=Yr((function(t,e){return function(n){return Pr(n,t,e)}})),iu=Yr((function(t,e){return function(n){return Pr(t,n,e)}}));function su(t,e,n){var r=La(e),o=Cr(e,r);null!=n||Zs(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Cr(e,La(e)));var i=!(Zs(n)&&"chain"in n&&!n.chain),s=Js(t);return xe(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__);return(n.__actions__=Io(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Oe([this.value()],arguments))})})),t}function au(){}var uu=Go(Me),lu=Go(Ie),cu=Go(Re);function fu(t){return vi(t)?Ue(Di(t)):function(t){return function(e){return wr(e,t)}}(t)}var hu=Uo(),pu=Uo(!0);function du(){return[]}function gu(){return!1}var mu,yu=ko((function(t,e){return t+e}),0),vu=qo("ceil"),bu=ko((function(t,e){return t/e}),1),Cu=qo("floor"),wu=ko((function(t,e){return t*e}),1),Au=qo("round"),_u=ko((function(t,e){return t-e}),0);return Bn.after=function(t,e){if("function"!=typeof e)throw new It(i);return t=pa(t),function(){if(--t<1)return e.apply(this,arguments)}},Bn.ary=Ts,Bn.assign=va,Bn.assignIn=ba,Bn.assignInWith=Ca,Bn.assignWith=wa,Bn.at=Aa,Bn.before=Is,Bn.bind=Ps,Bn.bindAll=Xa,Bn.bindKey=Ss,Bn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Us(t)?t:[t]},Bn.chain=fs,Bn.chunk=function(t,e,n){e=(n?yi(t,e,n):e===o)?1:mn(pa(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var s=0,a=0,u=r(he(i/e));s<i;)u[a++]=to(t,s,s+=e);return u},Bn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Bn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Oe(Us(n)?Io(n):[n],gr(e,1))},Bn.cond=function(t){var e=null==t?0:t.length,n=si();return t=e?Me(t,(function(t){if("function"!=typeof t[1])throw new It(i);return[n(t[0]),t[1]]})):[],Yr((function(n){for(var r=-1;++r<e;){var o=t[r];if(_e(o[0],this,n))return _e(o[1],this,n)}}))},Bn.conforms=function(t){return function(t){var e=La(t);return function(n){return ar(n,t,e)}}(sr(t,1))},Bn.constant=Za,Bn.countBy=ds,Bn.create=function(t,e){var n=Fn(t);return null==e?n:nr(n,e)},Bn.curry=function t(e,n,r){var i=zo(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Bn.curryRight=function t(e,n,r){var i=zo(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Bn.debounce=Ls,Bn.defaults=_a,Bn.defaultsDeep=Ea,Bn.defer=Ms,Bn.delay=Os,Bn.difference=Fi,Bn.differenceBy=ki,Bn.differenceWith=Gi,Bn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:pa(e))<0?0:e,r):[]},Bn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:pa(e)))<0?0:e):[]},Bn.dropRightWhile=function(t,e){return t&&t.length?co(t,si(e,3),!0,!0):[]},Bn.dropWhile=function(t,e){return t&&t.length?co(t,si(e,3),!0):[]},Bn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&yi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=pa(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:pa(r))<0&&(r+=i),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Bn.filter=function(t,e){return(Us(t)?Pe:dr)(t,si(e,3))},Bn.flatMap=function(t,e){return gr(As(t,e),1)},Bn.flatMapDeep=function(t,e){return gr(As(t,e),c)},Bn.flatMapDepth=function(t,e,n){return n=n===o?1:pa(n),gr(As(t,e),n)},Bn.flatten=Vi,Bn.flattenDeep=function(t){return null!=t&&t.length?gr(t,c):[]},Bn.flattenDepth=function(t,e){return null!=t&&t.length?gr(t,e=e===o?1:pa(e)):[]},Bn.flip=function(t){return zo(t,512)},Bn.flow=tu,Bn.flowRight=eu,Bn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Bn.functions=function(t){return null==t?[]:Cr(t,La(t))},Bn.functionsIn=function(t){return null==t?[]:Cr(t,Ma(t))},Bn.groupBy=bs,Bn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Bn.intersection=qi,Bn.intersectionBy=Yi,Bn.intersectionWith=Ki,Bn.invert=Ia,Bn.invertBy=Pa,Bn.invokeMap=Cs,Bn.iteratee=ru,Bn.keyBy=ws,Bn.keys=La,Bn.keysIn=Ma,Bn.map=As,Bn.mapKeys=function(t,e){var n={};return e=si(e,3),vr(t,(function(t,r,o){rr(n,e(t,r,o),t)})),n},Bn.mapValues=function(t,e){var n={};return e=si(e,3),vr(t,(function(t,r,o){rr(n,r,e(t,r,o))})),n},Bn.matches=function(t){return Hr(sr(t,1))},Bn.matchesProperty=function(t,e){return Br(t,sr(e,1))},Bn.memoize=Ns,Bn.merge=Oa,Bn.mergeWith=Na,Bn.method=ou,Bn.methodOf=iu,Bn.mixin=su,Bn.negate=$s,Bn.nthArg=function(t){return t=pa(t),Yr((function(e){return kr(e,t)}))},Bn.omit=$a,Bn.omitBy=function(t,e){return Da(t,$s(si(e)))},Bn.once=function(t){return Is(2,t)},Bn.orderBy=function(t,e,n,r){return null==t?[]:(Us(e)||(e=null==e?[]:[e]),Us(n=r?o:n)||(n=null==n?[]:[n]),Gr(t,e,n))},Bn.over=uu,Bn.overArgs=Rs,Bn.overEvery=lu,Bn.overSome=cu,Bn.partial=Ds,Bn.partialRight=Hs,Bn.partition=_s,Bn.pick=Ra,Bn.pickBy=Da,Bn.property=fu,Bn.propertyOf=function(t){return function(e){return null==t?o:wr(t,e)}},Bn.pull=Ji,Bn.pullAll=Qi,Bn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,si(n,2)):t},Bn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,o,n):t},Bn.pullAt=Xi,Bn.range=hu,Bn.rangeRight=pu,Bn.rearg=Bs,Bn.reject=function(t,e){return(Us(t)?Pe:dr)(t,$s(si(e,3)))},Bn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=si(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Vr(t,o),n},Bn.rest=function(t,e){if("function"!=typeof t)throw new It(i);return Yr(t,e=e===o?e:pa(e))},Bn.reverse=Zi,Bn.sampleSize=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:pa(e),(Us(t)?Jn:zr)(t,e)},Bn.set=function(t,e,n){return null==t?t:Jr(t,e,n)},Bn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Jr(t,e,n,r)},Bn.shuffle=function(t){return(Us(t)?Qn:Zr)(t)},Bn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&yi(t,e,n)?(e=0,n=r):(e=null==e?0:pa(e),n=n===o?r:pa(n)),to(t,e,n)):[]},Bn.sortBy=Es,Bn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Bn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,si(e,2)):[]},Bn.split=function(t,e,n){return n&&"number"!=typeof n&&yi(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=so(e))&&rn(t)?bo(fn(t),0,n):t.split(e,n):[]},Bn.spread=function(t,e){if("function"!=typeof t)throw new It(i);return e=null==e?0:mn(pa(e),0),Yr((function(n){var r=n[e],o=bo(n,0,e);return r&&Oe(o,r),_e(t,this,o)}))},Bn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Bn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:pa(e))<0?0:e):[]},Bn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:pa(e)))<0?0:e,r):[]},Bn.takeRightWhile=function(t,e){return t&&t.length?co(t,si(e,3),!1,!0):[]},Bn.takeWhile=function(t,e){return t&&t.length?co(t,si(e,3)):[]},Bn.tap=function(t,e){return e(t),t},Bn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new It(i);return Zs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ls(t,e,{leading:r,maxWait:e,trailing:o})},Bn.thru=hs,Bn.toArray=fa,Bn.toPairs=Ha,Bn.toPairsIn=Ba,Bn.toPath=function(t){return Us(t)?Me(t,Di):aa(t)?[t]:Io(Ri(ya(t)))},Bn.toPlainObject=ma,Bn.transform=function(t,e,n){var r=Us(t),o=r||Ys(t)||ua(t);if(e=si(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Zs(t)&&Js(i)?Fn(Vt(t)):{}}return(o?xe:vr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Bn.unary=function(t){return Ts(t,1)},Bn.union=ts,Bn.unionBy=es,Bn.unionWith=ns,Bn.uniq=function(t){return t&&t.length?ao(t):[]},Bn.uniqBy=function(t,e){return t&&t.length?ao(t,si(e,2)):[]},Bn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ao(t,o,e):[]},Bn.unset=function(t,e){return null==t||uo(t,e)},Bn.unzip=rs,Bn.unzipWith=os,Bn.update=function(t,e,n){return null==t?t:lo(t,e,mo(n))},Bn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:lo(t,e,mo(n),r)},Bn.values=Fa,Bn.valuesIn=function(t){return null==t?[]:Je(t,Ma(t))},Bn.without=is,Bn.words=Ja,Bn.wrap=function(t,e){return Ds(mo(e),t)},Bn.xor=ss,Bn.xorBy=as,Bn.xorWith=us,Bn.zip=ls,Bn.zipObject=function(t,e){return po(t||[],e||[],Zn)},Bn.zipObjectDeep=function(t,e){return po(t||[],e||[],Jr)},Bn.zipWith=cs,Bn.entries=Ha,Bn.entriesIn=Ba,Bn.extend=ba,Bn.extendWith=Ca,su(Bn,Bn),Bn.add=yu,Bn.attempt=Qa,Bn.camelCase=ka,Bn.capitalize=Ga,Bn.ceil=vu,Bn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ga(n))==n?n:0),e!==o&&(e=(e=ga(e))==e?e:0),ir(ga(t),e,n)},Bn.clone=function(t){return sr(t,4)},Bn.cloneDeep=function(t){return sr(t,5)},Bn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:o)},Bn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:o)},Bn.conformsTo=function(t,e){return null==e||ar(t,e,La(e))},Bn.deburr=ja,Bn.defaultTo=function(t,e){return null==t||t!=t?e:t},Bn.divide=bu,Bn.endsWith=function(t,e,n){t=ya(t),e=so(e);var r=t.length,i=n=n===o?r:ir(pa(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Bn.eq=Fs,Bn.escape=function(t){return(t=ya(t))&&K.test(t)?t.replace(q,en):t},Bn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Bn.every=function(t,e,n){var r=Us(t)?Ie:hr;return n&&yi(t,e,n)&&(e=o),r(t,si(e,3))},Bn.find=gs,Bn.findIndex=ji,Bn.findKey=function(t,e){return He(t,si(e,3),vr)},Bn.findLast=ms,Bn.findLastIndex=Ui,Bn.findLastKey=function(t,e){return He(t,si(e,3),br)},Bn.floor=Cu,Bn.forEach=ys,Bn.forEachRight=vs,Bn.forIn=function(t,e){return null==t?t:mr(t,si(e,3),Ma)},Bn.forInRight=function(t,e){return null==t?t:yr(t,si(e,3),Ma)},Bn.forOwn=function(t,e){return t&&vr(t,si(e,3))},Bn.forOwnRight=function(t,e){return t&&br(t,si(e,3))},Bn.get=xa,Bn.gt=ks,Bn.gte=Gs,Bn.has=function(t,e){return null!=t&&pi(t,e,xr)},Bn.hasIn=Ta,Bn.head=Wi,Bn.identity=nu,Bn.includes=function(t,e,n,r){t=Ws(t)?t:Fa(t),n=n&&!r?pa(n):0;var o=t.length;return n<0&&(n=mn(o+n,0)),sa(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Fe(t,e,n)>-1},Bn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:pa(n);return o<0&&(o=mn(r+o,0)),Fe(t,e,o)},Bn.inRange=function(t,e,n){return e=ha(e),n===o?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t<mn(e,n)}(t=ga(t),e,n)},Bn.invoke=Sa,Bn.isArguments=js,Bn.isArray=Us,Bn.isArrayBuffer=Vs,Bn.isArrayLike=Ws,Bn.isArrayLikeObject=qs,Bn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&_r(t)==y},Bn.isBuffer=Ys,Bn.isDate=Ks,Bn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Bn.isEmpty=function(t){if(null==t)return!0;if(Ws(t)&&(Us(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||ua(t)||js(t)))return!t.length;var e=hi(t);if(e==A||e==I)return!t.size;if(wi(t))return!$r(t).length;for(var n in t)if(Nt.call(t,n))return!1;return!0},Bn.isEqual=function(t,e){return Lr(t,e)},Bn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Lr(t,e,o,n):!!r},Bn.isError=zs,Bn.isFinite=function(t){return"number"==typeof t&&De(t)},Bn.isFunction=Js,Bn.isInteger=Qs,Bn.isLength=Xs,Bn.isMap=ea,Bn.isMatch=function(t,e){return t===e||Mr(t,e,ui(e))},Bn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Mr(t,e,ui(e),n)},Bn.isNaN=function(t){return na(t)&&t!=+t},Bn.isNative=function(t){if(Ci(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(t)},Bn.isNil=function(t){return null==t},Bn.isNull=function(t){return null===t},Bn.isNumber=na,Bn.isObject=Zs,Bn.isObjectLike=ta,Bn.isPlainObject=ra,Bn.isRegExp=oa,Bn.isSafeInteger=function(t){return Qs(t)&&t>=-9007199254740991&&t<=f},Bn.isSet=ia,Bn.isString=sa,Bn.isSymbol=aa,Bn.isTypedArray=ua,Bn.isUndefined=function(t){return t===o},Bn.isWeakMap=function(t){return ta(t)&&hi(t)==L},Bn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==_r(t)},Bn.join=function(t,e){return null==t?"":Ve.call(t,e)},Bn.kebabCase=Ua,Bn.last=zi,Bn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=pa(n))<0?mn(r+i,0):yn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Be(t,Ge,i,!0)},Bn.lowerCase=Va,Bn.lowerFirst=Wa,Bn.lt=la,Bn.lte=ca,Bn.max=function(t){return t&&t.length?pr(t,nu,Er):o},Bn.maxBy=function(t,e){return t&&t.length?pr(t,si(e,2),Er):o},Bn.mean=function(t){return je(t,nu)},Bn.meanBy=function(t,e){return je(t,si(e,2))},Bn.min=function(t){return t&&t.length?pr(t,nu,Rr):o},Bn.minBy=function(t,e){return t&&t.length?pr(t,si(e,2),Rr):o},Bn.stubArray=du,Bn.stubFalse=gu,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=wu,Bn.nth=function(t,e){return t&&t.length?kr(t,pa(e)):o},Bn.noConflict=function(){return fe._===this&&(fe._=Bt),this},Bn.noop=au,Bn.now=xs,Bn.pad=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return jo(pe(o),n)+t+jo(he(o),n)},Bn.padEnd=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;return e&&r<e?t+jo(e-r,n):t},Bn.padStart=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;return e&&r<e?jo(e-r,n)+t:t},Bn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(ya(t).replace(rt,""),e||0)},Bn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&yi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=ha(t),e===o?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Cn();return yn(t+i*(e-t+ae("1e-"+((i+"").length-1))),e)}return Wr(t,e)},Bn.reduce=function(t,e,n){var r=Us(t)?Ne:We,o=arguments.length<3;return r(t,si(e,4),n,o,cr)},Bn.reduceRight=function(t,e,n){var r=Us(t)?$e:We,o=arguments.length<3;return r(t,si(e,4),n,o,fr)},Bn.repeat=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:pa(e),qr(ya(t),e)},Bn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Bn.result=function(t,e,n){var r=-1,i=(e=yo(e,t)).length;for(i||(i=1,t=o);++r<i;){var s=null==t?o:t[Di(e[r])];s===o&&(r=i,s=n),t=Js(s)?s.call(t):s}return t},Bn.round=Au,Bn.runInContext=t,Bn.sample=function(t){return(Us(t)?zn:Kr)(t)},Bn.size=function(t){if(null==t)return 0;if(Ws(t))return sa(t)?cn(t):t.length;var e=hi(t);return e==A||e==I?t.size:$r(t).length},Bn.snakeCase=qa,Bn.some=function(t,e,n){var r=Us(t)?Re:eo;return n&&yi(t,e,n)&&(e=o),r(t,si(e,3))},Bn.sortedIndex=function(t,e){return no(t,e)},Bn.sortedIndexBy=function(t,e,n){return ro(t,e,si(n,2))},Bn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Fs(t[r],e))return r}return-1},Bn.sortedLastIndex=function(t,e){return no(t,e,!0)},Bn.sortedLastIndexBy=function(t,e,n){return ro(t,e,si(n,2),!0)},Bn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Fs(t[n],e))return n}return-1},Bn.startCase=Ya,Bn.startsWith=function(t,e,n){return t=ya(t),n=null==n?0:ir(pa(n),0,t.length),e=so(e),t.slice(n,n+e.length)==e},Bn.subtract=_u,Bn.sum=function(t){return t&&t.length?qe(t,nu):0},Bn.sumBy=function(t,e){return t&&t.length?qe(t,si(e,2)):0},Bn.template=function(t,e,n){var r=Bn.templateSettings;n&&yi(t,e,n)&&(e=o),t=ya(t),e=Ca({},e,r,Jo);var i,s,a=Ca({},e.imports,r.imports,Jo),u=La(a),l=Je(a,u),c=0,f=e.interpolate||bt,h="__p += '",p=xt((e.escape||bt).source+"|"+f.source+"|"+(f===Q?ft:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Nt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(p,(function(e,n,r,o,a,u){return r||(r=o),h+=t.slice(c,u).replace(Ct,nn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var g=Nt.call(e,"variable")&&e.variable;if(g){if(lt.test(g))throw new wt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(j,""):h).replace(U,"$1").replace(V,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Qa((function(){return At(u,d+"return "+h).apply(o,l)}));if(m.source=h,zs(m))throw m;return m},Bn.times=function(t,e){if((t=pa(t))<1||t>f)return[];var n=p,r=yn(t,p);e=si(e),t-=p;for(var o=Ye(r,e);++n<t;)e(n);return o},Bn.toFinite=ha,Bn.toInteger=pa,Bn.toLength=da,Bn.toLower=function(t){return ya(t).toLowerCase()},Bn.toNumber=ga,Bn.toSafeInteger=function(t){return t?ir(pa(t),-9007199254740991,f):0===t?t:0},Bn.toString=ya,Bn.toUpper=function(t){return ya(t).toUpperCase()},Bn.trim=function(t,e,n){if((t=ya(t))&&(n||e===o))return Ke(t);if(!t||!(e=so(e)))return t;var r=fn(t),i=fn(e);return bo(r,Xe(r,i),Ze(r,i)+1).join("")},Bn.trimEnd=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.slice(0,hn(t)+1);if(!t||!(e=so(e)))return t;var r=fn(t);return bo(r,0,Ze(r,fn(e))+1).join("")},Bn.trimStart=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=so(e)))return t;var r=fn(t);return bo(r,Xe(r,fn(e))).join("")},Bn.truncate=function(t,e){var n=30,r="...";if(Zs(e)){var i="separator"in e?e.separator:i;n="length"in e?pa(e.length):n,r="omission"in e?so(e.omission):r}var s=(t=ya(t)).length;if(rn(t)){var a=fn(t);s=a.length}if(n>=s)return t;var u=n-cn(r);if(u<1)return r;var l=a?bo(a,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(a&&(u+=l.length-u),oa(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=xt(i.source,ya(ht.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(so(i),u)!=u){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+r},Bn.unescape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(W,pn):t},Bn.uniqueId=function(t){var e=++$t;return ya(t)+e},Bn.upperCase=Ka,Bn.upperFirst=za,Bn.each=ys,Bn.eachRight=vs,Bn.first=Wi,su(Bn,(mu={},vr(Bn,(function(t,e){Nt.call(Bn.prototype,e)||(mu[e]=t)})),mu),{chain:!1}),Bn.VERSION="4.17.21",xe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Bn[t].placeholder=Bn})),xe(["drop","take"],(function(t,e){jn.prototype[t]=function(n){n=n===o?1:mn(pa(n),0);var r=this.__filtered__&&!e?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),xe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:si(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),xe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}})),xe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(nu)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Yr((function(t,e){return"function"==typeof t?new jn(this):this.map((function(n){return Pr(n,t,e)}))})),jn.prototype.reject=function(t){return this.filter($s(si(t)))},jn.prototype.slice=function(t,e){t=pa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=pa(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(p)},vr(jn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Bn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);i&&(Bn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof jn,l=a[0],c=u||Us(e),f=function(t){var e=i.apply(Bn,Oe([t],a));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,g=u&&!p;if(!s&&c){e=g?e:new jn(this);var m=t.apply(e,a);return m.__actions__.push({func:hs,args:[f],thisArg:o}),new Gn(m,h)}return d&&g?t.apply(this,a):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Bn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Us(o)?o:[],t)}return this[n]((function(n){return e.apply(Us(n)?n:[],t)}))}})),vr(jn.prototype,(function(t,e){var n=Bn[e];if(n){var r=n.name+"";Nt.call(Sn,r)||(Sn[r]=[]),Sn[r].push({name:e,func:n})}})),Sn[Bo(o,2).name]=[{name:"wrapper",func:o}],jn.prototype.clone=function(){var t=new jn(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Us(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=yn(e,t+s);break;case"takeRight":t=mn(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,f=c.length,h=0,p=yn(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return fo(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var g=-1,m=t[l+=e];++g<f;){var y=c[g],v=y.iteratee,b=y.type,C=v(m);if(2==b)m=C;else if(!C){if(1==b)continue t;break t}}d[h++]=m}return d},Bn.prototype.at=ps,Bn.prototype.chain=function(){return fs(this)},Bn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===o&&(this.__values__=fa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(t){for(var e,n=this;n instanceof kn;){var r=Bi(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Bn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Zi],thisArg:o}),new Gn(e,this.__chain__)}return this.thru(Zi)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,zt&&(Bn.prototype[zt]=function(){return this}),Bn}();fe._=dn,(r=function(){return dn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)},802:t=>{t.exports=function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}a=n[s]={exports:{}},e[s][0].call(a.exports,(function(t){return o(e[s][1][t]||t)}),a,a.exports,t,e,n,r)}return n[s].exports}for(var i=void 0,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){(function(r,o,i,s,a,u,l,c,f){"use strict";var h=t("crypto");function p(t,e){var n;return void 0===(n="passthrough"!==(e=m(t,e)).algorithm?h.createHash(e.algorithm):new b).write&&(n.write=n.update,n.end=n.update),v(e,n).dispatch(t),n.update||n.end(""),n.digest?n.digest("buffer"===e.encoding?void 0:e.encoding):(t=n.read(),"buffer"!==e.encoding?t.toString(e.encoding):t)}(n=e.exports=p).sha1=function(t){return p(t)},n.keys=function(t){return p(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(t){return p(t,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(t){return p(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=h.getHashes?h.getHashes().slice():["sha1","md5"],g=(d.push("passthrough"),["buffer","hex","binary","base64"]);function m(t,e){var n={};if(n.algorithm=(e=e||{}).algorithm||"sha1",n.encoding=e.encoding||"hex",n.excludeValues=!!e.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===e.ignoreUnknown,n.respectType=!1!==e.respectType,n.respectFunctionNames=!1!==e.respectFunctionNames,n.respectFunctionProperties=!1!==e.respectFunctionProperties,n.unorderedArrays=!0===e.unorderedArrays,n.unorderedSets=!1!==e.unorderedSets,n.unorderedObjects=!1!==e.unorderedObjects,n.replacer=e.replacer||void 0,n.excludeKeys=e.excludeKeys||void 0,void 0===t)throw new Error("Object argument required.");for(var r=0;r<d.length;++r)d[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=d[r]);if(-1===d.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+d.join(", "));if(-1===g.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+g.join(", "));return n}function y(t){if("function"==typeof t)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(t))}function v(t,e,n){function r(t){return e.update?e.update(t,"utf8"):e.write(t,"utf8")}return n=n||[],{dispatch:function(e){return this["_"+(null===(e=t.replacer?t.replacer(e):e)?"null":typeof e)](e)},_object:function(e){var o,s=Object.prototype.toString.call(e),a=/\[object (.*)\]/i.exec(s);if(a=(a=a?a[1]:"unknown:["+s+"]").toLowerCase(),0<=(s=n.indexOf(e)))return this.dispatch("[CIRCULAR:"+s+"]");if(n.push(e),void 0!==i&&i.isBuffer&&i.isBuffer(e))return r("buffer:"),r(e);if("object"===a||"function"===a||"asyncfunction"===a)return s=Object.keys(e),t.unorderedObjects&&(s=s.sort()),!1===t.respectType||y(e)||s.splice(0,0,"prototype","__proto__","constructor"),t.excludeKeys&&(s=s.filter((function(e){return!t.excludeKeys(e)}))),r("object:"+s.length+":"),o=this,s.forEach((function(n){o.dispatch(n),r(":"),t.excludeValues||o.dispatch(e[n]),r(",")}));if(!this["_"+a]){if(t.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](e)},_array:function(e,o){o=void 0!==o?o:!1!==t.unorderedArrays;var i=this;if(r("array:"+e.length+":"),!o||e.length<=1)return e.forEach((function(t){return i.dispatch(t)}));var s=[];return o=e.map((function(e){var r=new b,o=n.slice();return v(t,r,o).dispatch(e),s=s.concat(o.slice(n.length)),r.read().toString()})),n=n.concat(s),o.sort(),this._array(o,!1)},_date:function(t){return r("date:"+t.toJSON())},_symbol:function(t){return r("symbol:"+t.toString())},_error:function(t){return r("error:"+t.toString())},_boolean:function(t){return r("bool:"+t.toString())},_string:function(t){r("string:"+t.length+":"),r(t.toString())},_function:function(e){r("fn:"),y(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==t.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),t.respectFunctionProperties&&this._object(e)},_number:function(t){return r("number:"+t.toString())},_xml:function(t){return r("xml:"+t.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(t){return r("regex:"+t.toString())},_uint8array:function(t){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return r("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return r("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return r("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return r("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return r("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return r("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return r("url:"+t.toString())},_map:function(e){return r("map:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_set:function(e){return r("set:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_file:function(t){return r("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(t.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_bigint:function(t){return r("bigint:"+t.toString())},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function b(){return{buf:"",write:function(t){this.buf+=t},end:function(t){this.buf+=t},read:function(){return this.buf}}}n.writeToStream=function(t,e,n){return void 0===n&&(n=e,e={}),v(e=m(t,e),n).dispatch(t)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,e,n){(function(t,e,r,o,i,s,a,u,l){!function(t){"use strict";var e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),o="0".charCodeAt(0),i="a".charCodeAt(0),s="A".charCodeAt(0),a="-".charCodeAt(0),u="_".charCodeAt(0);function l(t){return(t=t.charCodeAt(0))===n||t===a?62:t===r||t===u?63:t<o?-1:t<o+10?t-o+26+26:t<s+26?t-s:t<i+26?t-i+26:void 0}t.toByteArray=function(t){var n,r;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.length,i=(o="="===t.charAt(o-2)?2:"="===t.charAt(o-1)?1:0,new e(3*t.length/4-o)),s=0<o?t.length-4:t.length,a=0;function u(t){i[a++]=t}for(n=0;n<s;n+=4,0)u((16711680&(r=l(t.charAt(n))<<18|l(t.charAt(n+1))<<12|l(t.charAt(n+2))<<6|l(t.charAt(n+3))))>>16),u((65280&r)>>8),u(255&r);return 2==o?u(255&(r=l(t.charAt(n))<<2|l(t.charAt(n+1))>>4)):1==o&&(u((r=l(t.charAt(n))<<10|l(t.charAt(n+1))<<4|l(t.charAt(n+2))>>2)>>8&255),u(255&r)),i},t.fromByteArray=function(t){var e,n,r,o,i=t.length%3,s="";function a(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,r=t.length-i;e<r;e+=3)s+=a((o=n=(t[e]<<16)+(t[e+1]<<8)+t[e+2])>>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:s=(s+=a((n=t[t.length-1])>>2))+a(n<<4&63)+"==";break;case 2:s=(s=(s+=a((n=(t[t.length-2]<<8)+t[t.length-1])>>10))+a(n>>4&63))+a(n<<2&63)+"="}return s}}(void 0===n?this.base64js={}:n)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,n){(function(e,r,o,i,s,a,u,l,c){var f=t("base64-js"),h=t("ieee754");function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);var r,i,s,a,u=typeof t;if("base64"===e&&"string"==u)for(t=(a=t).trim?a.trim():a.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==u)r=I(t);else if("string"==u)r=o.byteLength(t,e);else{if("object"!=u)throw new Error("First argument needs to be a number, array or string.");r=I(t.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(r)):((i=this).length=r,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof t.byteLength)i._set(t);else if(P(a=t)||o.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(s=0;s<r;s++)o.isBuffer(t)?i[s]=t.readUInt8(s):i[s]=t[s];else if("string"==u)i.write(t,0,e);else if("number"==u&&!o._useTypedArrays&&!n)for(s=0;s<r;s++)i[s]=0;return i}function p(t,e,n,r){var o;if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+1<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(o=t[e],e+1<r&&(o|=t[e+1]<<8)):(o=t[e]<<8,e+1<r&&(o|=t[e+1])),o}function d(t,e,n,r){var o;if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+3<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(e+2<r&&(o=t[e+2]<<16),e+1<r&&(o|=t[e+1]<<8),o|=t[e],e+3<r&&(o+=t[e+3]<<24>>>0)):(e+1<r&&(o=t[e+1]<<16),e+2<r&&(o|=t[e+2]<<8),e+3<r&&(o|=t[e+3]),o+=t[e]<<24>>>0),o}function g(t,e,n,r){if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+1<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 32768&(r=p(t,e,n,!0))?-1*(65535-r+1):r}function m(t,e,n,r){if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+3<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 2147483648&(r=d(t,e,n,!0))?-1*(4294967295-r+1):r}function y(t,e,n,r){return r||(H("boolean"==typeof n,"missing or invalid endian"),H(e+3<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,23,4)}function v(t,e,n,r){return r||(H("boolean"==typeof n,"missing or invalid endian"),H(e+7<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,52,8)}function b(t,e,n,r,o){if(o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+1<t.length,"trying to write beyond buffer length"),$(e,65535)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,2);i<s;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function C(t,e,n,r,o){if(o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"trying to write beyond buffer length"),$(e,4294967295)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,4);i<s;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function w(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+1<t.length,"Trying to write beyond buffer length"),R(e,32767,-32768)),t.length<=n||b(t,0<=e?e:65535+e+1,n,r,o)}function A(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"Trying to write beyond buffer length"),R(e,2147483647,-2147483648)),t.length<=n||C(t,0<=e?e:4294967295+e+1,n,r,o)}function _(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"Trying to write beyond buffer length"),D(e,34028234663852886e22,-34028234663852886e22)),t.length<=n||h.write(t,e,n,r,23,4)}function E(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+7<t.length,"Trying to write beyond buffer length"),D(e,17976931348623157e292,-17976931348623157e292)),t.length<=n||h.write(t,e,n,r,52,8)}n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.byteLength=function(t,e){var n;switch(t+="",e||"utf8"){case"hex":n=t.length/2;break;case"utf8":case"utf-8":n=L(t).length;break;case"ascii":case"binary":case"raw":n=t.length;break;case"base64":n=M(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(t,e){if(H(P(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];if("number"!=typeof e)for(i=e=0;i<t.length;i++)e+=t[i].length;for(var n=new o(e),r=0,i=0;i<t.length;i++){var s=t[i];s.copy(n,r),r+=s.length}return n},o.prototype.write=function(t,e,n,r){isFinite(e)?isFinite(n)||(r=n,n=void 0):(l=r,r=e,e=n,n=l),e=Number(e)||0;var i,s,a,u,l=this.length-e;switch((!n||l<(n=Number(n)))&&(n=l),r=String(r||"utf8").toLowerCase()){case"hex":i=function(t,e,n,r){n=Number(n)||0;var i=t.length-n;(!r||i<(r=Number(r)))&&(r=i),H((i=e.length)%2==0,"Invalid hex string"),i/2<r&&(r=i/2);for(var s=0;s<r;s++){var a=parseInt(e.substr(2*s,2),16);H(!isNaN(a),"Invalid hex string"),t[n+s]=a}return o._charsWritten=2*s,s}(this,t,e,n);break;case"utf8":case"utf-8":s=this,a=e,u=n,i=o._charsWritten=O(L(t),s,a,u);break;case"ascii":case"binary":i=function(t,e,n,r){return o._charsWritten=O(function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}(this,t,e,n);break;case"base64":s=this,a=e,u=n,i=o._charsWritten=O(M(t),s,a,u);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=function(t,e,n,r){return o._charsWritten=O(function(t){for(var e,n,r=[],o=0;o<t.length;o++)e=(n=t.charCodeAt(o))>>8,n%=256,r.push(n),r.push(e);return r}(e),t,n,r)}(this,t,e,n);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(t,e,n){var r,o,i,s,a=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(n=void 0!==n?Number(n):a.length)===e)return"";switch(t){case"hex":r=function(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||r<n)&&(n=r);for(var o="",i=e;i<n;i++)o+=S(t[i]);return o}(a,e,n);break;case"utf8":case"utf-8":r=function(t,e,n){var r="",o="";n=Math.min(t.length,n);for(var i=e;i<n;i++)t[i]<=127?(r+=N(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return r+N(o)}(a,e,n);break;case"ascii":case"binary":r=function(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;o++)r+=String.fromCharCode(t[o]);return r}(a,e,n);break;case"base64":o=a,s=n,r=0===(i=e)&&s===o.length?f.fromByteArray(o):f.fromByteArray(o.slice(i,s));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=function(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(a,e,n);break;default:throw new Error("Unknown encoding")}return r},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,n,r){if(e=e||0,(r=r||0===r?r:this.length)!==(n=n||0)&&0!==t.length&&0!==this.length){H(n<=r,"sourceEnd < sourceStart"),H(0<=e&&e<t.length,"targetStart out of bounds"),H(0<=n&&n<this.length,"sourceStart out of bounds"),H(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length);var i=(r=t.length-e<r-n?t.length-e+n:r)-n;if(i<100||!o._useTypedArrays)for(var s=0;s<i;s++)t[s+e]=this[s+n];else t._set(this.subarray(n,n+i),e)}},o.prototype.slice=function(t,e){var n=this.length;if(t=T(t,n,0),e=T(e,n,n),o._useTypedArrays)return o._augment(this.subarray(t,e));for(var r=e-t,i=new o(r,void 0,!0),s=0;s<r;s++)i[s]=this[s+t];return i},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.readUInt8=function(t,e){if(e||(H(null!=t,"missing offset"),H(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return p(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return p(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return d(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return d(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(H(null!=t,"missing offset"),H(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return g(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return g(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return m(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return m(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return y(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return y(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return v(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return v(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,n){n||(H(null!=t,"missing value"),H(null!=e,"missing offset"),H(e<this.length,"trying to write beyond buffer length"),$(t,255)),e>=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,n){b(this,t,e,!0,n)},o.prototype.writeUInt16BE=function(t,e,n){b(this,t,e,!1,n)},o.prototype.writeUInt32LE=function(t,e,n){C(this,t,e,!0,n)},o.prototype.writeUInt32BE=function(t,e,n){C(this,t,e,!1,n)},o.prototype.writeInt8=function(t,e,n){n||(H(null!=t,"missing value"),H(null!=e,"missing offset"),H(e<this.length,"Trying to write beyond buffer length"),R(t,127,-128)),e>=this.length||(0<=t?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n))},o.prototype.writeInt16LE=function(t,e,n){w(this,t,e,!0,n)},o.prototype.writeInt16BE=function(t,e,n){w(this,t,e,!1,n)},o.prototype.writeInt32LE=function(t,e,n){A(this,t,e,!0,n)},o.prototype.writeInt32BE=function(t,e,n){A(this,t,e,!1,n)},o.prototype.writeFloatLE=function(t,e,n){_(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){_(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){E(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){E(this,t,e,!1,n)},o.prototype.fill=function(t,e,n){if(e=e||0,n=n||this.length,H("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),H(e<=n,"end < start"),n!==e&&0!==this.length){H(0<=e&&e<this.length,"start out of bounds"),H(0<=n&&n<=this.length,"end out of bounds");for(var r=e;r<n;r++)this[r]=t}},o.prototype.inspect=function(){for(var t=[],e=this.length,r=0;r<e;r++)if(t[r]=S(this[r]),r===n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;e<n;e+=1)t[e]=this[e];return t.buffer};var x=o.prototype;function T(t,e,n){return"number"!=typeof t?n:e<=(t=~~t)?e:0<=t||0<=(t+=e)?t:0}function I(t){return(t=~~Math.ceil(+t))<0?0:t}function P(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function S(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(t.charCodeAt(n));else for(var o=n,i=(55296<=r&&r<=57343&&n++,encodeURIComponent(t.slice(o,n+1)).substr(1).split("%")),s=0;s<i.length;s++)e.push(parseInt(i[s],16))}return e}function M(t){return f.toByteArray(t)}function O(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function N(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function $(t,e){H("number"==typeof t,"cannot write a non-number as a number"),H(0<=t,"specified a negative value for writing an unsigned value"),H(t<=e,"value is larger than maximum value for type"),H(Math.floor(t)===t,"value has a fractional component")}function R(t,e,n){H("number"==typeof t,"cannot write a non-number as a number"),H(t<=e,"value larger than maximum allowed value"),H(n<=t,"value smaller than minimum allowed value"),H(Math.floor(t)===t,"value has a fractional component")}function D(t,e,n){H("number"==typeof t,"cannot write a non-number as a number"),H(t<=e,"value larger than maximum allowed value"),H(n<=t,"value smaller than minimum allowed value")}function H(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=x.get,t.set=x.set,t.write=x.write,t.toString=x.toString,t.toLocaleString=x.toString,t.toJSON=x.toJSON,t.copy=x.copy,t.slice=x.slice,t.readUInt8=x.readUInt8,t.readUInt16LE=x.readUInt16LE,t.readUInt16BE=x.readUInt16BE,t.readUInt32LE=x.readUInt32LE,t.readUInt32BE=x.readUInt32BE,t.readInt8=x.readInt8,t.readInt16LE=x.readInt16LE,t.readInt16BE=x.readInt16BE,t.readInt32LE=x.readInt32LE,t.readInt32BE=x.readInt32BE,t.readFloatLE=x.readFloatLE,t.readFloatBE=x.readFloatBE,t.readDoubleLE=x.readDoubleLE,t.readDoubleBE=x.readDoubleBE,t.writeUInt8=x.writeUInt8,t.writeUInt16LE=x.writeUInt16LE,t.writeUInt16BE=x.writeUInt16BE,t.writeUInt32LE=x.writeUInt32LE,t.writeUInt32BE=x.writeUInt32BE,t.writeInt8=x.writeInt8,t.writeInt16LE=x.writeInt16LE,t.writeInt16BE=x.writeInt16BE,t.writeInt32LE=x.writeInt32LE,t.writeInt32BE=x.writeInt32BE,t.writeFloatLE=x.writeFloatLE,t.writeFloatBE=x.writeFloatBE,t.writeDoubleLE=x.writeDoubleLE,t.writeDoubleBE=x.writeDoubleBE,t.fill=x.fill,t.inspect=x.inspect,t.toArrayBuffer=x.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){o=t("buffer").Buffer;var f=new o(4);f.fill(0),e.exports={hash:function(t,e,n,r){for(var i=e(function(t,e){t.length%4!=0&&(n=t.length+(4-t.length%4),t=o.concat([t,f],n));for(var n,r=[],i=e?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=4)r.push(i.call(t,s));return r}(t=o.isBuffer(t)?t:new o(t),r),8*t.length),s=(e=r,new o(n)),a=e?s.writeInt32BE:s.writeInt32LE,u=0;u<i.length;u++)a.call(s,i[u],4*u,!0);return s}}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(t,e,n){(function(e,r,o,i,s,a,u,l,c){o=t("buffer").Buffer;var f=t("./sha"),h=t("./sha256"),p=t("./rng"),d={sha1:f,sha256:h,md5:t("./md5")},g=64,m=new o(g);function y(t,e){var n=d[t=t||"sha1"],r=[];return n||v("algorithm:",t,"is not yet supported"),{update:function(t){return o.isBuffer(t)||(t=new o(t)),r.push(t),t.length,this},digest:function(t){var i=o.concat(r);return i=e?function(t,e,n){o.isBuffer(e)||(e=new o(e)),o.isBuffer(n)||(n=new o(n)),e.length>g?e=t(e):e.length<g&&(e=o.concat([e,m],g));for(var r=new o(g),i=new o(g),s=0;s<g;s++)r[s]=54^e[s],i[s]=92^e[s];return n=t(o.concat([r,n])),t(o.concat([i,n]))}(n,e,i):n(i),r=null,t?i.toString(t):i}}}function v(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}m.fill(0),n.createHash=function(t){return y(t)},n.createHmac=y,n.randomBytes=function(t,e){if(!e||!e.call)return new o(p(t));try{e.call(this,void 0,new o(p(t)))}catch(t){e(t)}};var b,C=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],w=function(t){n[t]=function(){v("sorry,",t,"is not implemented yet")}};for(b in C)w(C[b])}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=n,u=r,l=o,c=i;n=d(n,r,o,i,t[s+0],7,-680876936),i=d(i,n,r,o,t[s+1],12,-389564586),o=d(o,i,n,r,t[s+2],17,606105819),r=d(r,o,i,n,t[s+3],22,-1044525330),n=d(n,r,o,i,t[s+4],7,-176418897),i=d(i,n,r,o,t[s+5],12,1200080426),o=d(o,i,n,r,t[s+6],17,-1473231341),r=d(r,o,i,n,t[s+7],22,-45705983),n=d(n,r,o,i,t[s+8],7,1770035416),i=d(i,n,r,o,t[s+9],12,-1958414417),o=d(o,i,n,r,t[s+10],17,-42063),r=d(r,o,i,n,t[s+11],22,-1990404162),n=d(n,r,o,i,t[s+12],7,1804603682),i=d(i,n,r,o,t[s+13],12,-40341101),o=d(o,i,n,r,t[s+14],17,-1502002290),n=g(n,r=d(r,o,i,n,t[s+15],22,1236535329),o,i,t[s+1],5,-165796510),i=g(i,n,r,o,t[s+6],9,-1069501632),o=g(o,i,n,r,t[s+11],14,643717713),r=g(r,o,i,n,t[s+0],20,-373897302),n=g(n,r,o,i,t[s+5],5,-701558691),i=g(i,n,r,o,t[s+10],9,38016083),o=g(o,i,n,r,t[s+15],14,-660478335),r=g(r,o,i,n,t[s+4],20,-405537848),n=g(n,r,o,i,t[s+9],5,568446438),i=g(i,n,r,o,t[s+14],9,-1019803690),o=g(o,i,n,r,t[s+3],14,-187363961),r=g(r,o,i,n,t[s+8],20,1163531501),n=g(n,r,o,i,t[s+13],5,-1444681467),i=g(i,n,r,o,t[s+2],9,-51403784),o=g(o,i,n,r,t[s+7],14,1735328473),n=m(n,r=g(r,o,i,n,t[s+12],20,-1926607734),o,i,t[s+5],4,-378558),i=m(i,n,r,o,t[s+8],11,-2022574463),o=m(o,i,n,r,t[s+11],16,1839030562),r=m(r,o,i,n,t[s+14],23,-35309556),n=m(n,r,o,i,t[s+1],4,-1530992060),i=m(i,n,r,o,t[s+4],11,1272893353),o=m(o,i,n,r,t[s+7],16,-155497632),r=m(r,o,i,n,t[s+10],23,-1094730640),n=m(n,r,o,i,t[s+13],4,681279174),i=m(i,n,r,o,t[s+0],11,-358537222),o=m(o,i,n,r,t[s+3],16,-722521979),r=m(r,o,i,n,t[s+6],23,76029189),n=m(n,r,o,i,t[s+9],4,-640364487),i=m(i,n,r,o,t[s+12],11,-421815835),o=m(o,i,n,r,t[s+15],16,530742520),n=y(n,r=m(r,o,i,n,t[s+2],23,-995338651),o,i,t[s+0],6,-198630844),i=y(i,n,r,o,t[s+7],10,1126891415),o=y(o,i,n,r,t[s+14],15,-1416354905),r=y(r,o,i,n,t[s+5],21,-57434055),n=y(n,r,o,i,t[s+12],6,1700485571),i=y(i,n,r,o,t[s+3],10,-1894986606),o=y(o,i,n,r,t[s+10],15,-1051523),r=y(r,o,i,n,t[s+1],21,-2054922799),n=y(n,r,o,i,t[s+8],6,1873313359),i=y(i,n,r,o,t[s+15],10,-30611744),o=y(o,i,n,r,t[s+6],15,-1560198380),r=y(r,o,i,n,t[s+13],21,1309151649),n=y(n,r,o,i,t[s+4],6,-145523070),i=y(i,n,r,o,t[s+11],10,-1120210379),o=y(o,i,n,r,t[s+2],15,718787259),r=y(r,o,i,n,t[s+9],21,-343485551),n=v(n,a),r=v(r,u),o=v(o,l),i=v(i,c)}return Array(n,r,o,i)}function p(t,e,n,r,o,i){return v((e=v(v(e,t),v(r,i)))<<o|e>>>32-o,n)}function d(t,e,n,r,o,i,s){return p(e&n|~e&r,t,e,o,i,s)}function g(t,e,n,r,o,i,s){return p(e&r|n&~r,t,e,o,i,s)}function m(t,e,n,r,o,i,s){return p(e^n^r,t,e,o,i,s)}function y(t,e,n,r,o,i,s){return p(n^(e|~r),t,e,o,i,s)}function v(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}e.exports=function(t){return f.hash(t,h,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,n){(function(t,n,r,o,i,s,a,u,l){e.exports=function(t){for(var e,n=new Array(t),r=0;r<t;r++)!(3&r)&&(e=4294967296*Math.random()),n[r]=e>>>((3&r)<<3)&255;return n}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n,r,o,i=Array(80),s=1732584193,a=-271733879,u=-1732584194,l=271733878,c=-1009589776,f=0;f<t.length;f+=16){for(var h=s,g=a,m=u,y=l,v=c,b=0;b<80;b++){i[b]=b<16?t[f+b]:d(i[b-3]^i[b-8]^i[b-14]^i[b-16],1);var C=p(p(d(s,5),(C=a,r=u,o=l,(n=b)<20?C&r|~C&o:!(n<40)&&n<60?C&r|C&o|r&o:C^r^o)),p(p(c,i[b]),(n=b)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514));c=l,l=u,u=d(a,30),a=s,s=C}s=p(s,h),a=p(a,g),u=p(u,m),l=p(l,y),c=p(c,v)}return Array(s,a,u,l,c)}function p(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function d(t,e){return t<<e|t>>>32-e}e.exports=function(t){return f.hash(t,h,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){function f(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function h(t,e){var n,r=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),o=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),i=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var s,a,u=0;u<t.length;u+=16){for(var l=o[0],c=o[1],h=o[2],p=o[3],m=o[4],y=o[5],v=o[6],b=o[7],C=0;C<64;C++)i[C]=C<16?t[C+u]:f(f(f((a=i[C-2],d(a,17)^d(a,19)^g(a,10)),i[C-7]),(a=i[C-15],d(a,7)^d(a,18)^g(a,3))),i[C-16]),n=f(f(f(f(b,d(a=m,6)^d(a,11)^d(a,25)),m&y^~m&v),r[C]),i[C]),s=f(d(s=l,2)^d(s,13)^d(s,22),l&c^l&h^c&h),b=v,v=y,y=m,m=f(p,n),p=h,h=c,c=l,l=f(n,s);o[0]=f(l,o[0]),o[1]=f(c,o[1]),o[2]=f(h,o[2]),o[3]=f(p,o[3]),o[4]=f(m,o[4]),o[5]=f(y,o[5]),o[6]=f(v,o[6]),o[7]=f(b,o[7])}return o}var p=t("./helpers"),d=function(t,e){return t>>>e|t<<32-e},g=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,h,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,n){(function(t,e,r,o,i,s,a,u,l){n.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?o-1:0,h=n?-1:1;for(o=t[e+f],f+=h,i=o&(1<<-c)-1,o>>=-c,c+=a;0<c;i=256*i+t[e+f],f+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;0<c;s=256*s+t[e+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(o?-1:1);s+=Math.pow(2,r),i-=l}return(o?-1:1)*s*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var s,a,u=8*i-o-1,l=(1<<u)-1,c=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1;for(i=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(e+=1<=s+c?f/r:f*Math.pow(2,1-c))*r&&(s++,r/=2),l<=s+c?(a=0,s=l):1<=s+c?(a=(e*r-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));8<=o;t[n+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,u+=o;0<u;t[n+h]=255&s,h+=p,s/=256,u-=8);t[n+h-p]|=128*i}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(t,e,n){(function(t,n,r,o,i,s,a,u,l){var c,f,h;function p(){}(t=e.exports={}).nextTick=(f="undefined"!=typeof window&&window.setImmediate,h="undefined"!=typeof window&&window.postMessage&&window.addEventListener,f?function(t){return window.setImmediate(t)}:h?(c=[],window.addEventListener("message",(function(t){var e=t.source;e!==window&&null!==e||"process-tick"!==t.data||(t.stopPropagation(),0<c.length&&c.shift()())}),!0),function(t){c.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)},146:(t,e)=>{"use strict";var n;!function(){var r=e||{}||this||window;void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n),r.default=r;var o="http://www.w3.org/2000/xmlns/",i="http://www.w3.org/2000/svg",s=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},u=function(t){return t instanceof HTMLElement||t instanceof SVGElement},l=function(t){if(!u(t))throw new Error("an HTMLElement or SVGElement is required; got "+t)},c=function(t){return new Promise((function(e,n){u(t)?e(t):n(new Error("an HTMLElement or SVGElement is required; got "+t))}))},f=function(t,e,n){var r=t.viewBox&&t.viewBox.baseVal&&t.viewBox.baseVal[n]||null!==e.getAttribute(n)&&!e.getAttribute(n).match(/%$/)&&parseInt(e.getAttribute(n))||t.getBoundingClientRect()[n]||parseInt(e.style[n])||parseInt(window.getComputedStyle(t).getPropertyValue(n));return null==r||isNaN(parseFloat(r))?0:r},h=function(t){for(var e=window.atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),o=new Uint8Array(r),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([r],{type:n})},p={},d=null,g=function(t,e){var n=e||{},r=n.selectorRemap,o=n.modifyStyle,i=n.modifyCss,u=n.fonts,l=n.excludeUnusedCss,c=i||function(t,e){return(r?r(t):t)+"{"+(o?o(e):e)+"}\n"},f=[],h=void 0===u,g=u||[];return(d||(d=Array.from(document.styleSheets).map((function(t){try{return{rules:t.cssRules,href:t.href}}catch(e){return console.warn("Stylesheet could not be loaded: "+t.href,e),{}}})))).forEach((function(e){var n=e.rules,r=e.href;n&&Array.from(n).forEach((function(e){if(void 0!==e.style)if(function(t,e){if(e)try{return t.querySelector(e)||t.parentNode&&t.parentNode.querySelector(e)}catch(t){console.warn('Invalid CSS selector "'+e+'"',t)}}(t,e.selectorText))f.push(c(e.selectorText,e.style.cssText));else if(h&&e.cssText.match(/^@font-face/)){var n=function(t,e){var n=t.cssText.match(s),r=n&&n[1]||"";if(r&&!r.match(/^data:/)&&"about:blank"!==r){var o,i,u=r.startsWith("../")?e+"/../"+r:r.startsWith("./")?e+"/."+r:r;return{text:t.cssText,format:(o=u,i=Object.keys(a).filter((function(t){return o.indexOf("."+t)>0})).map((function(t){return a[t]})),i?i[0]:(console.error("Unknown font format for "+o+". Fonts may not be working correctly."),"application/octet-stream")),url:u}}}(e,r);n&&g.push(n)}else l||f.push(e.cssText)}))})),function(t){return Promise.all(t.map((function(t){return new Promise((function(e,n){if(p[t.url])return e(p[t.url]);var r=new XMLHttpRequest;r.addEventListener("load",(function(){var n=function(t){for(var e="",n=new Uint8Array(t),r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return window.btoa(e)}(r.response),o=t.text.replace(s,'url("data:'+t.format+";base64,"+n+'")')+"\n";p[t.url]=o,e(o)})),r.addEventListener("error",(function(n){console.warn("Failed to load font from: "+t.url,n),p[t.url]=null,e(null)})),r.addEventListener("abort",(function(n){console.warn("Aborted loading font from: "+t.url,n),e(null)})),r.open("GET",t.url),r.responseType="arraybuffer",r.send()}))}))).then((function(t){return t.filter((function(t){return t})).join("")}))}(g).then((function(t){return f.join("\n")+t}))},m=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};r.prepareSvg=function(t,e,n){l(t);var r=e||{},s=r.left,a=void 0===s?0:s,u=r.top,c=void 0===u?0:u,h=r.width,p=r.height,d=r.scale,m=void 0===d?1:d,y=r.responsive,v=void 0!==y&&y,b=r.excludeCss,C=void 0!==b&&b;return function(t){return Promise.all(Array.from(t.querySelectorAll("image")).map((function(t){var e,n=t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("href");return n?((e=n)&&0===e.lastIndexOf("http",0)&&-1===e.lastIndexOf(window.location.host)&&(n+=(-1===n.indexOf("?")?"?":"&")+"t="+(new Date).valueOf()),new Promise((function(e,r){var o=document.createElement("canvas"),i=new Image;i.crossOrigin="anonymous",i.src=n,i.onerror=function(){return r(new Error("Could not load "+n))},i.onload=function(){o.width=i.width,o.height=i.height,o.getContext("2d").drawImage(i,0,0),t.setAttributeNS("http://www.w3.org/1999/xlink","href",o.toDataURL("image/png")),e(!0)}}))):Promise.resolve(null)})))}(t).then((function(){var r=t.cloneNode(!0);r.style.backgroundColor=(e||{}).backgroundColor||t.style.backgroundColor;var s=function(t,e,n,r){if("svg"===t.tagName)return{width:n||f(t,e,"width"),height:r||f(t,e,"height")};if(t.getBBox){var o=t.getBBox(),i=o.x,s=o.y;return{width:i+o.width,height:s+o.height}}}(t,r,h,p),u=s.width,l=s.height;if("svg"!==t.tagName){if(!t.getBBox)return void console.error("Attempted to render non-SVG element",t);null!=r.getAttribute("transform")&&r.setAttribute("transform",r.getAttribute("transform").replace(/translate\(.*?\)/,""));var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.appendChild(r),r=d}if(r.setAttribute("version","1.1"),r.setAttribute("viewBox",[a,c,u,l].join(" ")),r.getAttribute("xmlns")||r.setAttributeNS(o,"xmlns",i),r.getAttribute("xmlns:xlink")||r.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),v?(r.removeAttribute("width"),r.removeAttribute("height"),r.setAttribute("preserveAspectRatio","xMinYMin meet")):(r.setAttribute("width",u*m),r.setAttribute("height",l*m)),Array.from(r.querySelectorAll("foreignObject > *")).forEach((function(t){t.setAttributeNS(o,"xmlns","svg"===t.tagName?i:"http://www.w3.org/1999/xhtml")})),!C)return g(t,e).then((function(t){var e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML="<![CDATA[\n"+t+"\n]]>";var o=document.createElement("defs");o.appendChild(e),r.insertBefore(o,r.firstChild);var i=document.createElement("div");i.appendChild(r);var s=i.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if("function"!=typeof n)return{src:s,width:u,height:l};n(s,u,l)}));var y=document.createElement("div");y.appendChild(r);var b=y.innerHTML;if("function"!=typeof n)return{src:b,width:u,height:l};n(b,u,l)}))},r.svgAsDataUri=function(t,e,n){return l(t),r.prepareSvg(t,e).then((function(t){var e=t.src,r=t.width,o=t.height,i="data:image/svg+xml;base64,"+window.btoa(decodeURIComponent(encodeURIComponent('<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&#160;">]>'+e).replace(/%([0-9A-F]{2})/g,(function(t,e){var n=String.fromCharCode("0x"+e);return"%"===n?"%25":n}))));return"function"==typeof n&&n(i,r,o),i}))},r.svgAsPngUri=function(t,e,n){l(t);var o=e||{},i=o.encoderType,s=void 0===i?"image/png":i,a=o.encoderOptions,u=void 0===a?.8:a,c=o.canvg,f=function(t){var e=t.src,r=t.width,o=t.height,i=document.createElement("canvas"),a=i.getContext("2d"),l=window.devicePixelRatio||1;i.width=r*l,i.height=o*l,i.style.width=i.width+"px",i.style.height=i.height+"px",a.setTransform(l,0,0,l,0,0),c?c(i,e):a.drawImage(e,0,0);var f=void 0;try{f=i.toDataURL(s,u)}catch(t){if("undefined"!=typeof SecurityError&&t instanceof SecurityError||"SecurityError"===t.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw t}return"function"==typeof n&&n(f,i.width,i.height),Promise.resolve(f)};return c?r.prepareSvg(t,e).then(f):r.svgAsDataUri(t,e).then((function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){return e(f({src:r,width:r.width,height:r.height}))},r.onerror=function(){n("There was an error loading the data URI as an image on the following SVG\n"+window.atob(t.slice(26))+"Open the following link to see browser's diagnosis\n"+t)},r.src=t}))}))},r.download=function(t,e,n){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(h(e),t);else{var r=document.createElement("a");if("download"in r){r.download=t,r.style.display="none",document.body.appendChild(r);try{var o=h(e),i=URL.createObjectURL(o);r.href=i,r.onclick=function(){return requestAnimationFrame((function(){return URL.revokeObjectURL(i)}))}}catch(t){console.error(t),console.warn("Error while getting object URL. Falling back to string URL."),r.href=e}r.click(),document.body.removeChild(r)}else n&&n.popup&&(n.popup.document.title=t,n.popup.location.replace(e))}},r.saveSvg=function(t,e,n){var o=m();return c(t).then((function(t){return r.svgAsDataUri(t,n||{})})).then((function(t){return r.download(e,t,o)}))},r.saveSvgAsPng=function(t,e,n){var o=m();return c(t).then((function(t){return r.svgAsPngUri(t,n||{})})).then((function(t){return r.download(e,t,o)}))}}()},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var i={},s=[],a=0;a<t.length;a++){var u=t[a],l=r.base?u[0]+r.base:u[0],c=i[l]||0,f="".concat(l," ").concat(c);i[l]=c+1;var h=n(f),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var d=o(p,r);r.byIndex=a,e.splice(a,0,{identifier:f,updater:d,references:1})}s.push(f)}return s}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var i=r(t=t||[],o=o||{});return function(t){t=t||[];for(var s=0;s<i.length;s++){var a=n(i[s]);e[a].references--}for(var u=r(t,o),l=0;l<i.length;l++){var c=n(i[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}i=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},686:(t,e,n)=>{"use strict";n.d(e,{AL:()=>r,NO:()=>o});const r=["A","G","C","U"];var o;!function(t){t.HELM="HELM",t.AXOLABS="Axolabs"}(o||(o={}))},670:(t,e,n)=>{"use strict";function r(t,e=!0){let n="\n Datagrok macromolecule handler\n\n";n+=" 0 0 0 0 0 0 999 V3000\n",n+="M V30 BEGIN CTAB\n";let r="",a="",u="";const l=[];let c=0,f=0,h=0;if(t.antiStrands.length>0)for(let e=0;e<t.antiStrands.length;e++)t.antiStrands[e]=o(t.antiStrands[e]);let p=!1;const d=t.senseStrands.concat(t.antiStrands);let g=0;for(let e=0;e<d.length;e++){d[e]=d[e].replaceAll("(-\nM V30 ","(").replaceAll("-\nM V30 ","").replaceAll(" )",")");const n=i(d[e]),o=s(d[e]);if(e>=t.senseStrands.length?!1===p&&(p=!0,h=0):g=Math.min(g,Math.min(...o.y.filter((t=>t<0)))),p){const t=Math.min(...o.x)-h,e=Math.max(...o.y)+5;for(let e=0;e<o.x.length;e++)o.x[e]-=t;for(let t=0;t<o.y.length;t++)o.y[t]-=e-g}let u=d[e].indexOf("M V30 BEGIN ATOM");u=d[e].indexOf("\n",u);let m=u,y=u;for(let t=0;t<n.natom;t++){m=d[e].indexOf("V30",m)+4,y=d[e].indexOf(" ",m);const n=parseInt(d[e].substring(m,y))+c;d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf(" ",m)+1,m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m);let r=Math.round(1e4*o.x[t])/1e4;d[e]=d[e].slice(0,m)+r+d[e].slice(y),m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m),r=Math.round(1e4*o.y[t])/1e4,d[e]=d[e].slice(0,m)+r+d[e].slice(y),m=d[e].indexOf("\n",m)+1}const v=d[e].indexOf("M V30 END ATOM");r+=d[e].substring(u+1,v);let b=d[e].indexOf("M V30 BEGIN BOND");b=d[e].indexOf("\n",b),m=b,y=b;for(let t=0;t<n.nbond;t++){m=d[e].indexOf("V30",m)+4,y=d[e].indexOf(" ",m);const t=parseInt(d[e].substring(m,y))+f;d[e]=d[e].slice(0,m)+t+d[e].slice(y),m=d[e].indexOf(" ",m)+1,m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m);let n=parseInt(d[e].substring(m,y))+c;d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf(" ",m)+1,y=Math.min(d[e].indexOf("\n",m),d[e].indexOf(" ",m)),n=parseInt(d[e].substring(m,y))+c,d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf("\n",m)+1}const C=d[e].indexOf("M V30 END BOND");a+=d[e].substring(b+1,C);let w=d[e].indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==w;){w+=28;const t=d[e].indexOf(")",w);d[e].substring(w,t).split(" ").slice(1).forEach((t=>{l.push(parseInt(t)+c)})),w=t,w=d[e].indexOf("M V30 MDLV30/STEABS ATOMS=(",w)}c+=n.natom,f+=n.nbond,h+=Math.max(...o.x)+5}const m=Math.ceil(l.length/4);u+="M V30 MDLV30/STEABS ATOMS=("+l.length+" -\n";for(let t=0;t<m;t++){u+="M V30 ";const e=t+1===m?l.length-4*(m-1):4;for(let n=0;n<e;n++)u+=n+1===e?t===m-1?l[4*t+n]+")\n":l[4*t+n]+" -\n":l[4*t+n]+" "}return n+="M V30 COUNTS "+c+" "+f+" 0 0 0\n",n+="M V30 BEGIN ATOM\n",n+=r,n+="M V30 END ATOM\n",n+="M V30 BEGIN BOND\n",n+=a,n+="M V30 END BOND\n",e&&l.length>0?(n+="M V30 BEGIN COLLECTION\n",n+=u,n+="M V30 END COLLECTION\n"):n=n.replace(/ CFG=\d/g," "),n+="M V30 END CTAB\n",n+="M END",n}function o(t){const e=s(t),n=e.atomIndex.length,r=(Math.max(...e.x)+Math.min(...e.x))/2,o=(Math.max(...e.y)+Math.min(...e.y))/2;for(let t=0;t<n;t++)e.x[t]-=r,e.y[t]-=o;const i=Math.PI,a=Math.cos(i),u=Math.sin(i);for(let t=0;t<n;t++){const n=e.x[t];e.x[t]=n*a-e.y[t]*u,e.y[t]=n*u+e.y[t]*a}const l=Math.max(...e.y);for(let t=0;t<n;t++)e.x[t]+=r,e.y[t]-=l;let c=t.indexOf("M V30 BEGIN ATOM");c=t.indexOf("\n",c);let f=c;for(let r=0;r<n;r++)c=t.indexOf("V30",c)+4,c=t.indexOf(" ",c)+1,c=t.indexOf(" ",c)+1,f=t.indexOf(" ",c)+1,f=t.indexOf(" ",f),c=(t=t.slice(0,c)+e.x[r]+" "+e.y[r]+t.slice(f)).indexOf("\n",c)+1;return t}function i(t){let e=(t=t.replaceAll("\r","")).indexOf("COUNTS")+7,n=t.indexOf(" ",e);const r=parseInt(t.substring(e,n));return e=n+1,n=t.indexOf(" ",e),{natom:r,nbond:parseInt(t.substring(e,n))}}function s(t){const e=i(t);let n=t.indexOf("M V30 BEGIN ATOM");n=t.indexOf("\n",n);let r=n;const o=Array(e.natom),s=Array(e.natom),a=Array(e.natom),u=Array(e.natom);for(let i=0;i<e.natom;i++)n=t.indexOf("V30",n)+4,r=t.indexOf(" ",n),o[i]=parseInt(t.substring(n,r)),n=r+1,r=t.indexOf(" ",n),s[i]=t.substring(n,r),n=r+1,r=t.indexOf(" ",n),a[i]=parseFloat(t.substring(n,r)),n=r+1,r=t.indexOf(" ",n),u[i]=parseFloat(t.substring(n,r)),n=t.indexOf("\n",n)+1;return{atomIndex:o,atomType:s,x:a,y:u}}n.d(e,{cx:()=>s,vS:()=>r})},537:(t,e,n)=>{"use strict";n.d(e,{iL:()=>i,q7:()=>o,ti:()=>r});const r={NUCLEOSIDE:"nucleoside",LINKAGE:"phosphateBackbone"},o="p",i="<?>"},480:(t,e,n)=>{"use strict";n.d(e,{C6:()=>u,Hs:()=>a,OT:()=>l,bD:()=>s});var r=n(686),o=n(67),i=n(537);function s(t,e,n,o){const i=Object.keys(o.jsonData.codesToHelmDict).concat([r.NO.HELM]);if(!t||-1!==e&&n!==r.NO.HELM)return{};if(!i.includes(n))throw new Error(`${n} format is not supported by SequenceTranslator`);const s=i.filter((t=>t!=n)).sort(((t,e)=>t.localeCompare(e))),u=o.createFormatConverter(t,n),l=Object.fromEntries(s.map((t=>{let e;try{e=u.convertTo(t)}catch{e=null}return[t,e]})).filter((([t,e])=>e))),c=a(n===r.NO.HELM?t:l[r.NO.HELM],o.monomerLibWrapper);return c&&(l.Nucleotides=c),l}function a(t,e){const n=new RegExp("\\([^()]*\\)","g"),o=t.match(n);return o?o.map((t=>{const n=t.replace(/[\[\]()]/g,"");return r.AL.includes(n)?n:e.getNaturalAnalogBySymbol(n)})).map((t=>t||i.iL)).join(""):null}function u(t,e,n,i){const s=i.createFormatConverter(t,e);return n===o.qP?a(s.convertTo(r.NO.HELM),i.monomerLibWrapper):s.convertTo(n)}function l(t){return Object.keys(t.jsonData.codesToHelmDict).concat([r.NO.HELM,o.qP]).sort()}},67:(t,e,n)=>{"use strict";n.d(e,{U_:()=>o,n_:()=>r,qP:()=>i});const r="Copied",o="Copy sequence",i="Nucleotides"},511:(t,e,n)=>{"use strict";n.d(e,{_package:()=>Wt,applyNotationProviderForCyclized:()=>qt});var r=n(328),o=n(82),i=n(439);const s=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}};o.SemanticValue;var a=n(890);class u{constructor(t,e,n=""){this.target=t,this.debugEnabled=e,this.prefix=n}error(t,e,n){return this.target.error(this.prefix+t,e,n)}warning(t,e){return this.target.warning(this.prefix+t,e)}info(t,e){return this.target.info(this.prefix+t,e)}debug(t,e){if(this.debugEnabled)return this.target.debug(this.prefix+t,e)}}const l="System:AppData/SequenceTranslator/monomers-sample",c="pattern-app-data.json",f="formats-to-helm.json",h="codes-to-symbols.json",p="linkers.json";var d=n(686);function g(t){return t.sort(((t,e)=>e.length-t.length))}class m{constructor(t,e){this.sequence=t,this.th=e,this.libWrapper=this.th.monomerLibWrapper}getInvalidCodeIndex(t){if(t===d.NO.HELM)return this.sequence.length;const e=["r","d"],n=g(this.libWrapper.getCodesByFormat(t));let r=0;for(;r<this.sequence.length;){const t=n.find((t=>t===this.sequence.substring(r,r+t.length)));if(!t)break;if(r>1&&d.AL.includes(this.sequence[r])&&e.includes(this.sequence[r-2]))break;if(e.includes(this.sequence[r+1])&&d.AL.includes(this.sequence[r])){r++;break}r+=t.length}return r===this.sequence.length&&(r=-1),r}isValidSequence(t){return-1===this.getInvalidCodeIndex(t)}}class y{constructor(t,e,n,r){this.patternAppData=t,this.codesToHelmDict=e,this.codesToSymbolsDict=n,this.monomersWithPhosphate=r}}async function v(t){const e=await Promise.all([c,f,h,p].map((e=>async function(t,e){const n=t.endsWith("/")?`${t}${e}`:`${t}/${e}`;try{const t=await r.dapi.files.readAsText(n);return JSON.parse(t)}catch(t){console.error(`Error loading json from '${n}':`,t)}}(t,e))));return new y(e[0],e[1],e[2],e[3])}class b{constructor(t,e){if(this.lib=t,this.jsonData=e,null===this.lib)throw new Error("SequenceTranslator: monomer library is null");this.allMonomers=this.getAllMonomers()}formatMonomerForViewer(t){const e={};return e.name=t.symbol,e.symbol=t.symbol,e.molfile=t.molfile,this.getAllFormats().forEach((n=>{if(n===d.NO.HELM)return;const r=this.jsonData.codesToSymbolsDict[n],o=Object.keys(r).filter((e=>r[e]===t.symbol));e[n]=o.join(", ")})),e}getAllMonomers(){const t=this.lib.getPolymerTypes();let e=[];for(const n of t){const t=this.lib.getMonomerSymbolsByType(n).map((t=>this.lib.getMonomer(n,t))).filter((t=>null!==t));e=e.concat(t)}return e}getMonomer(t){const e=this.lib.getMonomer("RNA",t);if(void 0===e)throw new Error(`SequenceTranslator: no monomer with symbol ${t}`);return e}getMolfileBySymbol(t){return this.getMonomer(t).molfile}getNaturalAnalogBySymbol(t){const e=this.getMonomer(t).naturalAnalog;if(!e)throw new Error(`ST: no natural analog for ${t}`);return e}isModification(t){return!!this.getMolfileBySymbol(t).includes("MODIFICATION")}getCodeToSymbolMap(t){return new Map(Object.entries(this.jsonData.codesToSymbolsDict[t]))}getCodesByFormat(t){return Object.keys(this.jsonData.codesToSymbolsDict[t])}getAllFormats(){return Object.keys(this.jsonData.codesToSymbolsDict)}getTableForViewer(){const t=this.allMonomers.map((t=>this.formatMonomerForViewer(t)));return o.DataFrame.fromObjects(t)}getCodesToWeightsMap(){const t=new Map;return Object.entries(this.jsonData.codesToSymbolsDict).forEach((([e,n])=>{Object.entries(n).forEach((([e,n])=>{const r=this.getMonomer(n),o=r.meta?.molecularWeight;t.set(e,o)}))})),t}}var C=n(537);const w=(t,e)=>e.length-t.length;class A{constructor(t){this.th=t,this.formats=this.getFormats()}getFormatNames(){return this.formats.sort()}getCodesByFormat(t){if(this.validateFormat(t),this.isHelm(t))throw new Error("Codes cannot be obtained for HELM");return this.getFormatCodes(t)}getHelmToFormatDict(t){return this.validateFormat(t),function(t){const e={};return Object.values(t).forEach((t=>{Object.entries(t).forEach((([t,n])=>{const r=n.replace(/\)p/g,")").replace(/\]p/g,"]");void 0===e[r]?e[r]=[t]:e[r].push(t)}))})),Object.entries(e).forEach((([t,n])=>{const r=n.sort(w);e[t]=r[0]})),e}(this.th.jsonData.codesToHelmDict[t])}getFormatToHelmDict(t){this.validateFormat(t);const e=this.th.jsonData.codesToHelmDict[t];return Object.assign({},...Object.values(e))}getTargetFormatHelmCodes(t){this.validateFormat(t);const e=this.getHelmToFormatDict(t);return Object.keys(e).sort(w)}getTargetFormatHelmCodesRegExp(t){this.validateFormat(t);const e=this.getTargetFormatHelmCodes(t);return new RegExp(_(e)+"|.","g")}getFormatRegExp(t){if(this.validateFormat(t),this.isHelm(t))throw new Error("Helm RegExp can be built for non-HELM target formats");return this.getNonHelmFormatRegExp(t)}getPhosphateHelmCodesRegExp(t){this.validateFormat(t);const e=this.th.jsonData.codesToHelmDict[t],n=_(Array.from(new Set(Object.values(e[C.ti.LINKAGE]))).sort(w));return new RegExp(`${C.q7}.(${n})`,"g")}isValidFormat(t){return this.formats.includes(t)}getFormats(){return Object.keys(this.th.jsonData.codesToHelmDict)}validateFormat(t){if(!this.isValidFormat(t))throw new Error(`Invalid format: ${t}`)}isHelm(t){return t===d.NO.HELM}getFormatCodes(t){const e=this.getFormatToHelmDict(t);return Object.keys(e).sort(w)}getNonHelmFormatRegExp(t){const e=this.getCodesByFormat(t);return new RegExp(_(e)+"|\\([^()]*\\)|.","g")}}function _(t){return t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).map((t=>t.includes("(")||t.includes(")")?t:`(?<!\\([^()]*)${t}(?![^()]*\\))`)).join("|")}const E={LEFT:"RNA1{",RIGHT:"}$$$$"};class x{constructor(t,e,n){this.sequence=t,this.sourceFormat=e,this.th=n,this.formats=new A(this.th)}convertTo(t){const e=this.formats.getFormatNames();if(this.sourceFormat===d.NO.HELM&&e.includes(t))return this.helmToFormat(this.sequence,t);if(e.includes(this.sourceFormat)&&t===d.NO.HELM)return this.formatToHelm(this.sequence,this.sourceFormat);if([this.sourceFormat,t].every((t=>e.includes(t)))){const e=this.formatToHelm(this.sequence,this.sourceFormat);return this.helmToFormat(e,t)}throw new Error(`ST: unsupported translation direction ${this.sourceFormat} -> ${t}`)}helmToFormat(t,e){const n=new RegExp(_(Object.values(E)),"g");let r=t.replace(n,"");const o=this.formats.getHelmToFormatDict(e),i=this.formats.getTargetFormatHelmCodes(e),s=this.formats.getTargetFormatHelmCodesRegExp(e);return r=r.replace(s,(t=>i.includes(t)?o[t]:"p"===t||"."===t?t:"?")).replace(/\?+/g,C.iL).replace(/p\.|\./g,""),r=r.replace(/<empty>/g,""),r=r.replace(/\/\//g,"/"),r}formatToHelm(t,e){const n=this.formats.getFormatToHelmDict(e),r=this.formats.getCodesByFormat(e),o=this.formats.getFormatRegExp(e),i=this.formats.getPhosphateHelmCodesRegExp(e);let s=t?t.replace(o,(t=>r.includes(t)?n[t]+".":"?")):"";return s=s.replace(/\?+/g,`${C.iL}.`),s=s.slice(0,-1),s[s.length-1]===C.q7&&(s=s.slice(0,-1)),s=s.replace(i,((t,e)=>e)),s=s.replace(/<empty>/g,""),`${E.LEFT+s+E.RIGHT}`}}class T{constructor(t,e){this.sequence=t,this.th=e,this.libWrapper=this.th.monomerLibWrapper,this.formats=Object.keys(this.th.jsonData.codesToHelmDict)}getFormat(){if(this.sequence.startsWith("RNA"))return d.NO.HELM;const t=this.getListOfPossibleSynthesizersByFirstMatchedCode();if(0===t.length)return null;const e=this.th.createSequenceValidator(this.sequence),n=Array(t.length).fill(0);for(let r=0;r<t.length;++r){const o=t[r];n[r]=e.getInvalidCodeIndex(o)}const r=n.some((t=>-1===t))?-1:Math.max(...n);return t[n.indexOf(r)]}getListOfPossibleSynthesizersByFirstMatchedCode(){const t=this.sequence,e=[];for(const n of this.formats){const r=g(this.libWrapper.getCodesByFormat(n));let o=0;for(let e=0;e<t.length;e++)if(")"===t[e]&&e!==t.length-1){o=e+1;break}r.some((e=>e===t.slice(o,o+e.length)))&&e.push(n)}return e}}var I=n(389);const P=$;var S=n.n(P);class L extends o.Package{get helmHelper(){if(!this._helmHelper)throw new Error("Package SequenceTranslator .helmHelper is not initialized");return this._helmHelper}get seqHelper(){return this._helmHelper.seqHelper}get monomerLib(){if(!this._monomerLib)throw new Error("Monomer lib not loaded");return this._monomerLib}get jsonData(){if(!this._jsonData)throw new Error("Json data not loaded");return this._jsonData}get monomerLibWrapper(){if(!this._monomerLibWrapper)throw new Error("Monomer lib wrapper not loaded");return this._monomerLibWrapper}get initPromise(){return this._initPromise}constructor(t={debug:!1}){super(),this.highlightInvalidSubsequence=t=>function(t,e){let n=0;const r=e.createFormatDetector(t).getFormat();null!==r&&(n=new m(t,e).getInvalidCodeIndex(r));const o=n<0||""===t,i=I.span([]);S()(i).css("-webkit-text-fill-color","var(--grey-6)");const s=I.span([]);return S()(s).css("-webkit-text-fill-color","red"),o?i.innerHTML=t:(i.innerHTML=t.slice(0,n),s.innerHTML=t.slice(n)),[i,s]}(t,this),super._logger=new u(super.logger,t.debug)}startInit(t){this._initPromise=t}completeInit(t){this._helmHelper=t}async initLibData(){return this.initLibDataPromise||(this.initLibDataPromise=(async()=>{let t=(await this.getSettings()).MonomersPath;t&&await r.dapi.files.exists(t)||(this.logger.warning(`Monomers path '${t}' not found. Fallback to monomers sample path '${l}'.`),t=l),[this._jsonData,this._monomerLib]=await Promise.all([v(t),M(t)]),this._monomerLibWrapper=new b(this.monomerLib,this.jsonData)})()),this.initLibDataPromise}async getTranslationHelper(){return await r.functions.call(`${this.name}:getTranslationHelper`)}createSequenceValidator(t){return new m(t,this)}createFormatConverter(t,e){return new x(t,e,this)}createFormatDetector(t){return new T(t,this)}}async function M(t){const e=o.TaskBarProgressIndicator.create("Initializing Oligo Toolkit monomer library ...");try{const e=await(0,a.pj)();return await e.readLibrary(t,"monomer-lib.json")}finally{e.close()}}const O=["SS","AS"],N={SS:"Sense strand",AS:"Anti sense"},R=["3'","5'"];var D,H,B,F;!function(t){t.IS_ANTISENSE_STRAND_INCLUDED="isAntisenseStrandIncluded",t.NUCLEOTIDE_SEQUENCES="nucleotideSequences",t.PHOSPHOROTHIOATE_LINKAGE_FLAGS="phosphorothioateLinkageFlags",t.STRAND_TERMINUS_MODIFICATIONS="strandTerminusModifications"}(D||(D={})),function(t){t.PATTERN_NAME="patternName",t.PATTERN_COMMENT="patternComment",t.NUCLEOTIDES_WITH_NUMERIC_LABELS="nucleotidesWithNumericLabels"}(H||(H={})),function(t){t.PATTERN_CONFIG="patternConfig",t.AUTHOR_ID="authorID",t.DATE="date"}(B||(B={})),function(t){t.CREATE="create",t.MODIFY="modify"}(F||(F={})),D.IS_ANTISENSE_STRAND_INCLUDED,D.NUCLEOTIDE_SEQUENCES,D.PHOSPHOROTHIOATE_LINKAGE_FLAGS,D.STRAND_TERMINUS_MODIFICATIONS,H.PATTERN_NAME,H.PATTERN_COMMENT,H.NUCLEOTIDES_WITH_NUMERIC_LABELS,Error,Error,n(802);const k=rxjs;var G;rxjs.operators,function(t){t.getTruncatedStrandData=function(t,e,n){return{nucleotides:t.slice(0,n),ptoFlags:e.slice(0,n+1)}},t.getExtendedStrandData=function(t,e,n,r){const o=n-t.length,i=t.concat(new Array(n-t.length).fill(r)),s=0===t.length?n+1:o;return{nucleotides:i,ptoFlags:e.concat(new Array(s).fill(!0))}}}(G||(G={}));var j=n(543),U=n.n(j),V=n(72),W=n.n(V),q=n(825),Y=n.n(q),K=n(659),z=n.n(K),J=n(56),Q=n.n(J),X=n(540),Z=n.n(X),tt=n(113),et=n.n(tt),nt=n(252),rt={};rt.styleTagTransform=et(),rt.setAttributes=Q(),rt.insert=z().bind(null,"head"),rt.domAPI=Y(),rt.insertStyleElement=Z(),W()(nt.A,rt),nt.A&&nt.A.locals&&nt.A.locals;class ot{constructor(t,e,n){this.eventBus=t,this.initialPatternConfig=e,this.subscriptions=n}create(){return I.divV([I.h1("PTO"),I.divH([this.createAllPtoActivationInput().root,...this.createFirstPtoInputs().map((t=>t.root))],{style:{gap:"12px"}})])}areAllPtoLinkagesSet(t){return O.map((e=>t[e].filter((t=>t)).length)).reduce(((t,e)=>t+e),0)===O.map((t=>this.initialPatternConfig.nucleotideSequences[t].length)).reduce(((t,e)=>t+e),0)+O.filter((e=>t[e].length)).length}createAllPtoActivationInput(){const t=this.initialPatternConfig.phosphorothioateLinkageFlags,e=this.areAllPtoLinkagesSet(t),n=I.input.bool("All PTO",{value:e});n.onInput.subscribe((()=>{const t=n.value;this.eventBus.setAllPTOLinkages(t)}));const r=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((()=>{const t=this.eventBus.getPatternConfig().phosphorothioateLinkageFlags,e=this.areAllPtoLinkagesSet(t);n.value=e}));return this.subscriptions.add(r),this.addStyleToPtoInput(n),I.tooltip.bind(n.captionLabel,"Activate all phosphothioates"),n}addStyleToPtoInput(t){const e=t.captionLabel;e.classList.add("ui-label-right"),Object.assign(e.style,{textAlign:"left",maxWidth:"100px",minWidth:"40px",width:"auto"})}createFirstPtoInputs(){return O.map((t=>{if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return;const e=this.isFirstPtoActive(t),n=I.input.bool(`First ${t} PTO`,{value:e});n.onInput.subscribe((()=>{const e=n.value;this.eventBus.setPhosphorothioateLinkageFlag(t,0,e)}));const r=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((e=>{const r=e[t][0];n.value=r}));return this.subscriptions.add(r),this.addStyleToPtoInput(n),I.tooltip.bind(n.captionLabel,`Activate first phosphothioate in ${t}`),n})).filter((t=>void 0!==t))}isFirstPtoActive(t){return this.initialPatternConfig.phosphorothioateLinkageFlags[t][0]}}class it{constructor(t,e,n){this.eventBus=t,this.dataManager=e,this.subscriptions=n;const r=this.eventBus.nucleotideSequencesChanged$.subscribe((()=>{this.displayedInputLabels=this.computeDisplayedInputLabels()}));this.subscriptions.add(r)}create(){const t=O.map((t=>this.constructControlsPanel(t)));return I.divH(t,{style:{gap:"24px"}})}constructControlsPanel(t){if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return I.div([]);const e=this.constructHeader(),n=this.createControls(t);return I.block([I.h1(`${N[t]}`),e,n],{style:{paddingTop:"12px"}})}constructHeader(){return I.divH([I.div([I.divText("#")],{style:{width:"20px"}}),I.block75([I.divText("Modification")]),I.div([I.divText("PTO")])])}createControls(t){const e=this.createNucleobaseInputs(t),n=this.createLabelDivs(t),r=this.createPTOFlagInputs(t);return I.div(e.map(((t,e)=>I.divH([n[e],I.block75([t.root]),r[e].root],{style:{alignItems:"center"}}))))}createNucleobaseInputs(t){const e=this.dataManager.fetchAvailableNucleotideBases().sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase())));return this.eventBus.getNucleotideSequences()[t].map(((n,r)=>{const o=I.input.choice("",{value:n,items:e});return o.onInput.subscribe((()=>{const e=o.value;this.eventBus.setNucleotide(t,r,e)})),o}))}createPTOFlagInputs(t){return this.eventBus.getPhosphorothioateLinkageFlags()[t].slice(1).map(((e,n)=>{const r=I.input.bool("",{value:e});r.onInput.subscribe((()=>{const e=r.value;this.eventBus.setPhosphorothioateLinkageFlag(t,n+1,e)}));const o=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((e=>{const o=e[t][n+1];r.value=o}));return this.subscriptions.add(o),r}))}computeDisplayedInputLabels(){const t=this.eventBus.getNucleotideSequences(),e=new Map;return O.forEach((n=>{let r=1;const o=t[n].map((t=>{if(function(t){return t.endsWith("(o)")}(t))return"";const e=String(r);return r++,e}));e.set(n,o)})),e}createLabelDivs(t){const e=this.createLabels(t).map((t=>I.div([t],{style:{width:"20px"}}))),n=this.eventBus.nucleotideSequencesChanged$.subscribe((()=>{this.createLabels(t).forEach(((t,n)=>{S()(e[n]).empty(),S()(e[n]).append(t)}))}));return this.subscriptions.add(n),e}createLabels(t){return this.eventBus.getNucleotideSequences()[t].map(((e,n)=>{const r=this.displayedInputLabels.get(t)[n];return I.label(r)}))}}class st{constructor(){this.rxjsSubscriptions=[],this.dgSubscriptions=[]}add(t){t instanceof k.Subscription?this.rxjsSubscriptions.push(t):this.dgSubscriptions.push(t)}unsubscribeAll(){for(const t of[this.rxjsSubscriptions,this.dgSubscriptions])t.forEach((t=>t.unsubscribe())),t.length=0}}class at{constructor(t,e){this.eventBus=t,this.dataManager=e,this.subscriptions=new st}static open(t,e){at.isDialogOpen||(at.instance||(at.instance=new at(t,e)),at.instance.openDialog())}openDialog(){this.initialPatternConfig=U().cloneDeep(this.eventBus.getPatternConfig()),at.isDialogOpen=!0,this.createDialog().show()}createDialog(){const t=I.divV([]);this.subscriptions.add(this.eventBus.strandsUpdated$.subscribe((()=>this.onStrandsUpdated(t))));const e=I.dialog("Edit strands").add(t).onOK((()=>{})).onCancel((()=>this.resetToInitialState()));return this.subscriptions.add(e.onClose.subscribe((()=>{at.isDialogOpen=!1,this.subscriptions.unsubscribeAll()}))),e}onStrandsUpdated(t){const e=new ot(this.eventBus,this.initialPatternConfig,this.subscriptions).create(),n=new it(this.eventBus,this.dataManager,this.subscriptions).create();S()(t).empty(),S()(t).append(e,n)}resetToInitialState(){this.eventBus.setPatternConfig(this.initialPatternConfig)}}at.isDialogOpen=!1;class ut{constructor(t){this.eventBus=t,this.subscriptions=new st}static open(t){ut.isDialogOpen||(ut.instance||(ut.instance=new ut(t)),ut.instance.openDialog())}openDialog(){this.initialPatternConfig=U().cloneDeep(this.eventBus.getPatternConfig()),ut.isDialogOpen=!0,this.createDialog().show()}createDialog(){const t=I.divV([]);this.subscriptions.add(this.eventBus.strandsUpdated$.subscribe((()=>this.onStrandsUpdated(t))));const e=I.dialog("Edit terminal modifications").add(t).onOK((()=>{})).onCancel((()=>this.resetToInitialState()));return this.subscriptions.add(e.onClose.subscribe((()=>{ut.isDialogOpen=!1,this.subscriptions.unsubscribeAll()}))),e}onStrandsUpdated(t){const e=new lt(this.eventBus).create();S()(t).empty(),S()(t).append(e)}resetToInitialState(){this.eventBus.setPatternConfig(this.initialPatternConfig)}}ut.isDialogOpen=!1;class lt{constructor(t){this.eventBus=t}create(){const t=O.map((t=>this.constructControlsPanel(t)));return I.divH(t,{style:{gap:"24px"}})}constructControlsPanel(t){if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return I.div([]);const e=this.createInputs(t);return I.block([I.h1(`${N[t]}`),e],{style:{paddingTop:"12px"}})}createInputs(t){const e=("SS"===t?[...R].reverse():R).map((e=>this.createInputForTerminus(t,e)));return I.form(e)}createInputForTerminus(t,e){const n=this.eventBus.getTerminalModifications()[t][e],r=I.input.textArea(e,{value:n});return this.applyStylingToInput(r),r.onInput.subscribe((()=>{const n=r.value;null!==n&&this.eventBus.updateTerminusModification(t,e,n)})),r}applyStylingToInput(t){const e=t.root.getElementsByTagName("textarea")[0];S()(e).css("resize","none")}}n(146);var ct=n(507),ft={};ft.styleTagTransform=et(),ft.setAttributes=Q(),ft.insert=z().bind(null,"head"),ft.domAPI=Y(),ft.insertStyleElement=Z(),W()(ct.A,ft),ct.A&&ct.A.locals&&ct.A.locals;var ht,pt=n(74),dt={};dt.styleTagTransform=et(),dt.setAttributes=Q(),dt.insert=z().bind(null,"head"),dt.domAPI=Y(),dt.insertStyleElement=Z(),W()(pt.A,dt),pt.A&&pt.A.locals&&pt.A.locals,function(t){t.TYPE="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t[t.MAX_ATOM_COUNT=999]="MAX_ATOM_COUNT",t.RGP_LINE_START="M RGP",t.ATOM_ALIAS_LINE_START="A ",t.END="M END"}(ht||(ht={})),Error,Error,n(670);var gt=n(3);n(480),n(67);var mt=n(254),yt={};yt.styleTagTransform=et(),yt.setAttributes=Q(),yt.insert=z().bind(null,"head"),yt.domAPI=Y(),yt.insertStyleElement=Z(),W()(mt.A,yt),mt.A&&mt.A.locals&&mt.A.locals;var vt=n(70);n(124);var bt=n(312),Ct=n(991),wt=n.n(Ct);"object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,new Set;const At="object"==typeof process&&process?process:{};let _t=globalThis.AbortController,Et=globalThis.AbortSignal;if(void 0===_t){Et=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},_t=class{constructor(){e()}signal=new Et;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==At.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{var n,r,o,i;t&&(t=!1,n="AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",r="NO_ABORT_CONTROLLER",o="ENOTSUP",i=e,"function"==typeof At.emitWarning?At.emitWarning(n,r,o,i):console.error(`[${o}] ${r}: ${n}`))}}Symbol("type"),Symbol.iterator,Symbol.toStringTag,Map,n(151);var xt=n(599);function Tt(t,e){const n=t.tableColumn;if(!n)return;const r=function(t){return t.temp.MonomerHoverLinks??[]}(n);for(let n=r.length-1;n>=0;--n){const o=r[n],i=t.grid.col(o.targetCol.name);if(i&&!o.handler(t,e,i))break}}n(717),n(699),n(229),n(125);class It extends o.InputBase{constructor(t,e){super(I.input.column(t,e).dart,e?.onValueChanged),this.options=e}setColumnInputTable(t){I.input.setColumnInputTable(this,t,this.options?.filter)}}I.input.column2=function(t,e){return new It(t,e)},n(296),n(820),o.JsInputBase,o.JsInputBase;var Pt,St=n(269);!function(t){t.table="table",t.seqCol="seqCol",t.generateHelm="generateHelm",t.chiralityEngine="chiralityEngine",t.rules="rules"}(Pt||(Pt={}));var Lt=n(291);class Mt{onKeyDown(t,e){}onKeyPress(t,e){}onMouseEnter(t,e){}onMouseLeave(t,e){}onMouseDown(t,e){}onMouseUp(t,e){}onMouseMove(t,e){}onClick(t,e){}onDoubleClick(t,e){}}class Ot extends Mt{constructor(t,e,n){super(),this.gridCol=t,this.tableCol=e,this.logger=n,this.subs=[],this.dirty=!0,this.destroyed=!1,this.viewerId=++Ot.viewerCounter,this.errors=[],this._onRendered=new k.Subject,this.tableCol&&this.tableCol.dataFrame&&this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{this.dirty=!0}))),this.tableCol&&this.subs.push(r.events.onTableRemoved.subscribe((t=>{try{const e=t.args.dataFrame;this.tableCol?.dataFrame.id!==e.id||this.destroyed||this.destroy()}catch(t){this.logger.error(t)}}))),this.gridCol&&this.subs.push(r.events.onViewRemoving.subscribe((t=>{try{const e=t.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===e.id&&!this.destroyed&&this.destroy()}catch(t){this.logger.error(t)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const t of this.subs)t.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}reset(){this.dirty=!1}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`${t} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,vt.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,`${n}, ${e}`),this.errors.length>0){const t=this.errors[0];throw this.errors=[],t}this.logger.debug(`${n}, end`)}}Ot.viewerCounter=-1;var Nt=n(192);const $t=Lt.zS;var Rt,Dt,Ht;!function(t){t.maxMonomerLength=".mm.cellRenderer.maxMonomerLength"}(Rt||(Rt={})),function(t){t.applyToBackground=".m.cellRenderer.applyToBackground"}(Dt||(Dt={})),function(t){t.MSA="MSA",t.classic="classic"}(Ht||(Ht={}));const Bt=new class{constructor(){this.color="rgb(100,100,100)",this.pivot=0,this.left=!1,this.transparencyRate=1,this.separator="",this.last=!1,this.drawStyle=Ht.classic,this.maxWord=[],this.wordIdx=0,this.gridCell=null,this.referenceSequence=null,this.maxLengthOfMonomer=null,this.monomerTextSizeMap={},this.logger=void 0}};function Ft(t,e,n,r,o,i,s){var a,u,l;const c=Object.assign(Object.assign({},Bt),s);s.logger?.debug("Bio: printLeftOrCentered(), start"),t.textAlign="start";let f=e.substring(0),h=c.last?"":c.separator;c.drawStyle===Ht.MSA&&(h="");let p=!0,d=!0,g="difference";if(null!=c.gridCell&&null!=c.gridCell.cell.column&&(p=c.gridCell.cell.column.temp["color-code"]??!0,d=c.gridCell.cell.column.temp["compare-with-current"]??!0,g=c.gridCell.cell.column.temp["highlight-difference"]??"difference"),c.referenceSequence){const t=c.referenceSequence[c.wordIdx];d&&c.referenceSequence.length>0&&"difference"===g&&(c.transparencyRate=f==t?.3:c.transparencyRate),d&&c.referenceSequence.length>0&&"equal"===g&&(c.transparencyRate=f!=t?.3:c.transparencyRate)}null!=c.maxLengthOfMonomer&&(f=$t(f,c.maxLengthOfMonomer));const m=f+h;(a=c.monomerTextSizeMap)[m]??(a[m]=t.measureText(m));let y=c.monomerTextSizeMap[m];(u=c.monomerTextSizeMap)[f]??(u[f]=t.measureText(f));let v=c.monomerTextSizeMap[f].width;const b=i/2-(y.fontBoundingBoxAscent+y.fontBoundingBoxDescent)/2+1;(l=c.monomerTextSizeMap)[h]??(l[h]=t.measureText(h));const C=c.monomerTextSizeMap[h].width;function w(e,o){const i=p?c.color:"rgb(0,0,0)";t.fillStyle=i,t.globalAlpha=c.transparencyRate,c.drawStyle===Ht.classic&&(t.fillText(f,n+e,r+b),t.fillStyle="#808080",t.fillText(h,n+o,r+b)),c.drawStyle===Ht.MSA&&t.fillText(f,n+e,r+b)}y=y.width,c.drawStyle===Ht.MSA&&(v=c.maxWord[c.wordIdx],y=c.maxWord[c.wordIdx]);const A=(c.maxWord[c.wordIdx]??0)-(c.maxWord[0]??0);if(c.left||y>o)return w(A,A+v),n+A+v+C;{const t=(o-y)/2;return w(t,t+v),n+A+t+v}}const kt="rgb(100,100,100)";class Gt extends Ot{constructor(t,e,n,r,i){super(t,e,n),this.monomerLengthLimit=r,this.propsProvider=i,this.colWidth=0,this._monomerLengthList=null,this.separatorWidth=5,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this.sysMonomerLib=null,this.padding=5,this.props=this.propsProvider(),this._processedRows=o.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),this.tableCol&&this.gridCol&&this.subs.push(this.tableCol.dataFrame.onCurrentRowChanged.subscribe((()=>{const t=this.tableCol.dataFrame;this.gridCol.grid,-1===t.currentRowIdx&&(this.tableCol.temp["reference-sequence"]=null,this.tableCol.temp["current-word"]=null,this.invalidateGrid())})))}async init(){await Promise.all([(async()=>{this.seqHelper=await(0,bt.Q)(),this.invalidateGrid()})(),(async()=>{const t=await(0,a.pj)();this.sysMonomerLib=t.getMonomerLib()})()]),this.subs.push(this.sysMonomerLib.onChanged.subscribe((()=>{this.reset()}))),this.reset()}toLog(){return`MonomerPlacer<${this.viewerId}>`}getMonomerLib(){return this.tableCol.temp[".mm.cellRenderer.overriddenLibrary"]??this.sysMonomerLib}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=o.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={},super.reset(),this.invalidateGrid()}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}getCellMonomerLengths(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol);if(this.colWidth<e&&(this.colWidth=e,this.dirty=!0),this.dirty)try{this.reset()}catch(t){const[e,n]=(0,Nt.AP)(t);this.logger.error(e,void 0,n)}const r=n.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(t),o=new Array(r.length+1);o[0]=5;for(let t=1;t<o.length;t++)o[t]=o[t-1]+r[t-1];return[r,o]}getCellMonomerLengthsForSeq(t){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const e=this.seqHelper.getSeqHandler(this.tableCol),n=this.props.separatorWidth+1*this.props.monomerCharWidth,r=Math.ceil(this.colWidth/n),o=e.getSplitted(t),i=Math.min(r,o.length);let s=this._monomerLengthList[t];if(null===s||s.length<i){s=this._monomerLengthList[t]=new Array(o.length);let n=0;for(let t=0;t<i;++t){const r=o.getOriginal(t),i=this.props.monomerToShort(r,this.monomerLengthLimit),a=(e.isSeparator()?this.separatorWidth:this.props.separatorWidth)+i.length*this.props.monomerCharWidth;if(s[t]=a,n+=a,n>this.colWidth)break}}return s}getCellMonomerLengthsForSeqMsa(){var t;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(t=this._monomerLengthList)[0]??(t[0]=new Array(0));const e=this._monomerLengthList[0],{startIdx:n,endIdx:r}=(()=>{try{const t=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return t&&t.dart?{startIdx:Math.max(Math.floor((t?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((t?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(t){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),o=this.props.separatorWidth+1*this.props.monomerCharWidth,i=Math.ceil(this.colWidth/o);for(let t=n;t<r;t++){if(this._processedRows.get(t)&&i<=this._processedMaxVisibleSeqLength)continue;const n=this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t,i),r=Math.min(i,n.length);r>e.length&&e.push(...new Array(r-e.length).fill(o));let s=0;for(let t=0;t<r;++t){const r=n.getOriginal(t),o=this.props.monomerToShort(r,this.monomerLengthLimit),i=this.props.separatorWidth+o.length*this.props.monomerCharWidth;if(e[t]=Math.max(e[t]??0,i),s+=i,s>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,i)}return e}getPosition(t,e,n){const[r,o]=this.getCellMonomerLengths(t,n);return 0===this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t).length?null:function(t,e){let n,r=100,o=0,i=t.length-1;for(;o<=i;){if(n=Math.floor((i+o)/2),t[n]<=e&&e<t[n+1])return n;if(e<t[n]?i=n-1:o=n+1,--r<=0)throw new Error(`Get position for pointer x = ${e} searching has not converged on ${JSON.stringify(t)}. `)}return null}(o,e)}setMonomerLengthLimit(t){this.monomerLengthLimit!=t&&(this.monomerLengthLimit=t,this.dirty=!0)}setSeparatorWidth(t){this.separatorWidth!=t&&(this.props.separatorWidth=t,this.dirty=!0)}render(t,e,n,r,o,i,s){if(!this.seqHelper)return;const a=this.gridCol,u=this.tableCol,l=window.devicePixelRatio,c=`${this.toLog()}.render()`;this.logger.debug(`${c}, start`);let f=this.monomerLengthLimit;if(Rt.maxMonomerLength in u.tags){const t=parseInt(u.getTag(Rt.maxMonomerLength));f=!isNaN(t)&&t?t:50}if(".mm.cellRenderer.maxMonomerLength"in u.temp){const t=u.temp[".mm.cellRenderer.maxMonomerLength"];f=!isNaN(t)&&t?t:50}t.save();try{const s=this.seqHelper.getSeqHandler(u);if("1"===u.temp[".mm.cellRenderer.settingsChanged"]||this.monomerLengthLimit!=f){let t=0;const e=8;t=u.temp[".mm.cellRenderer.gapLength"]??t,this.setMonomerLengthLimit(f),this.setSeparatorWidth(s.isMsa()?e:t),u.temp[".mm.cellRenderer.settingsChanged"]="0"}const[c,h]=this.getCellMonomerLengths(i.tableRowIndex,r),p=(c.length,i.cell.value,i.cell.rowIndex),d=(u.getTag(gt.gp.alphabet),50);r=function(t,e,n,r,o){return t?Math.max(Math.min(t.canvas.width/o-n,r)):Math.max(e.canvas.width/o-n,0)}(a?.grid,t,e,r,l),t.beginPath(),t.rect(e+this.padding,n+this.padding,r-this.padding-1,o-2*this.padding),t.clip(),t.font="12px monospace",t.textBaseline="top";const g=u.meta.units,m=u.getTag(gt.gp.aligned),y=u.getTag(gt.gp.separator)??"",v=this.props.separatorWidth+1*this.props.monomerCharWidth,b=Math.ceil(r/v),C=u.temp["reference-sequence"],w=this.tableCol.temp["current-word"];w&&-1===u?.dataFrame?.currentRowIdx&&(this.tableCol.temp["current-word"]=null);const A=(()=>{const t=s.getSplitter(b)(null!=C&&""!=C?C:w??"");return wt().count(0).take(t.length).map((e=>t.getOriginal(e))).toArray()})(),_=s.getSplitted(p);let E=Ht.classic;m&&m.includes("MSA")&&g==gt.Hi.SEPARATOR&&(E=Ht.MSA);const x=Math.min(_.length,b);for(let a=0;a<x;++a){const u=_.getOriginal(a),l=_.getCanonical(a);let c=kt;const p=this.getMonomerLib();if(p){const t=s.defaultBiotype;c=p.getMonomerTextColor(t,l)}t.fillStyle=kt;const g={color:c,pivot:0,left:!0,transparencyRate:1,separator:y,last:a===_.length-1,drawStyle:E,maxWord:h,wordIdx:a,gridCell:i,referenceSequence:A,maxLengthOfMonomer:f,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger};if(Ft(t,u,e+this.padding,n,r,o,g),d>r)break}}catch(t){const[e,n]=(0,Nt.AP)(t);this.logger.error(e,void 0,n),this.errors.push(t)}finally{t.restore()}}onMouseMove(t,e){const n=`${this.toLog()}.onMouseMove()`;if(!this.seqHelper||null==t.tableRowIndex)return;const r=t.bounds,o=e.offsetX-t.gridColumn.left+(t.gridColumn.left-r.x),i=this.getPosition(t.tableRowIndex,o,r.width);this.logger.debug(`${n}, start, argsX: ${o}, left: ${i}`);const s=this.seqHelper.getSeqHandler(this.tableCol),a=s.getSplitted(t.tableRowIndex);if(null!==i&&i<a.length){const n=s.alphabet??gt.YI.UN,r={position:i,biotype:n===gt.YI.RNA||n===gt.YI.DNA?xt.o.NUCLEOTIDE:xt.o.AA,symbol:a.getCanonical(i)},o=[];let u=this._monomerStructureMap[r.symbol];{const t=this.getMonomerLib();u=this._monomerStructureMap[r.symbol]=t?t.getTooltip(r.biotype,r.symbol):I.divText("Monomer library is not available")}o.push(u),I.tooltip.show(I.divV(o),e.x+16,e.y+16),Tt(t,r)}else I.tooltip.hide(),Tt(t,null)}}class jt extends Gt{constructor(t,e,n,r){super(t,e,Wt.logger,n,(()=>({seqHandler:r.getSeqHandler(e),monomerCharWidth:7,separatorWidth:11,monomerToShort:gt.zS})))}onMouseMove(t,e){const n=t.bounds,r=e.offsetX-t.gridColumn.left+(t.gridColumn.left-n.x);this.getPosition(t.tableRowIndex,r,n.width),super.onMouseMove(t,e)}}class Ut{get defaultGapOriginal(){return""}constructor(t,e){this.separator=t,this.helmHelper=e,this.separatorSplitter=(0,gt.dh)(this.separator),this.splitter=this._splitter.bind(this)}setUnits(){}_splitter(t){const e=this.separatorSplitter(t);return new Vt(wt().count(0).take(e.length).map((t=>e.getOriginal(t))).toArray(),i.b9[i.Hi.SEPARATOR])}getHelm(t,e){return St.s.parseNotation(t,this.helmHelper).getNotationHelm()}createCellRendererBack(t,e){const n=new jt(t,e,4,this.helmHelper.seqHelper);return n.init().then((()=>{})),n}}class Vt extends Lt.Mu{getCanonical(t){if(this.isGap(t))return i._S;const e=this.getOriginal(t);let n=e;return e.startsWith("{")?n=e.slice(1):e.endsWith("}")?n=e.slice(0,-1):e.startsWith("(")?n=e.replace(/^\(.\d+\)/,""):e.endsWith(")")&&(n=e.replace(/\(\d+\)$/,"")),n}constructor(t,e){super(t,e)}}const Wt=new L({debug:!0});function qt(t,e){t.meta.units=i.Hi.CUSTOM,t.tags["polytool-data-role"]="template",t.temp[s.notationProvider]=new Ut(e,Wt.helmHelper)}},269:(t,e,n)=>{"use strict";n.d(e,{s:()=>s});var r=n(599),o=n(125),i=n(699);class s{constructor(t,e,n,r){this.helmHelper=r,this.linkages=e,this.monomers=t,this.mol=n}static parseHelm(t,e){const n=/(\w+\{.*\})\$(.*)\$(.*)\$(.*)\$/g.exec(t),i=[n[1],n[2],n[3],n[4]],a=i[0].split("|"),u=i[1].split("|"),l=new Array(a.length),c=[],f=e.createHelmWebEditor().editor.m;let h=0;const p=new JSDraw2.Point(0,0);for(let t=0;t<a.length;t++){const e=a[t].indexOf("{"),n=a[t].indexOf("}");l[t]=a[t].slice(e+1,n).split(".").map((t=>{return(e=t).startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e;var e}));for(let e=0;e<l[t].length;e++){const n=l[t][e],o={type:r.o.AA,i:t,j:e,continuousId:h},i=new JSDraw2.Atom(p,n,o);if(f.addAtom(i),0!==e){const t=f.atoms[h-1],e=f.atoms[h],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,f.addBond(n)}h++,p.x+=JSDraw2.Editor.BONDLENGTH}p.y+=4*JSDraw2.Editor.BONDLENGTH}for(let t=0;t<u.length;t++)if(""!==u[t]&&"V2.0"!==u[t]){const e=u[t].split(","),n=parseInt(e[0].replace("PEPTIDE",""))-1,r=parseInt(e[1].replace("PEPTIDE",""))-1,i=e[2].split("-"),s=i[0].split(":"),a=i[1].split(":");c.push({fChain:n,sChain:r,fMonomer:(0,o.jX)(parseInt(s[0]),n,l),sMonomer:(0,o.jX)(parseInt(a[0]),r,l),fR:parseInt(s[1].replace("R","")),sR:parseInt(a[1].replace("R",""))})}for(let t=0;t<c.length;t++){const e=f.atoms[c[t].fMonomer-1],n=f.atoms[c[t].sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=c[t].fR,r.r2=c[t].sR,f.addBond(r)}return new s(l,c,f,e)}applyRules(t){const e=this.getNotation();return s.fromNotation(e,t,this.helmHelper)}static fromNotation(t,e,n){const o=e.heterodimerCode,i=e.homodimerCode,a=[],u=[],l=null!==o?t.split(`(${e.heterodimerCode})`):"";null!==o&&l.length>1?(u.push({fChain:0,sChain:1,fMonomer:1,sMonomer:1,fR:1,sR:1}),a.push(l[1].replaceAll("{","").replaceAll("}","")),a.push(l[2].replaceAll("{","").replaceAll("}",""))):a.push(t);for(let t=0;t<a.length;t++)if(null!==i&&a[t].includes(`(${i})`)){const e=a.length;u.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=a[t].replace(`(${i})`,""),r=n.indexOf("{"),o=n.slice(0,r),s=n.replace(o,"").replaceAll("{","").replaceAll("}","");a[t]=o+s,a.push(s)}for(let t=0;t<a.length;t++)if(null!==i&&a[t].includes(`(${i})`)){const e=a.length;u.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=a[t].replace(`(${i})`,""),r=n.indexOf("{"),o=n.slice(0,r),s=n.replace(o,"").replaceAll("{","").replaceAll("}","");a[t]=o+s,a.push(s)}const c=new Array(a.length);for(let t=0;t<a.length;t++){const n=a[t].split("-"),r=this.getLinkedPositions(n,e.linkRules),[o,i,s,l,f]=this.getAllCycles(e.linkRules,n,r);new Array(o.length);for(let e=0;e<i.length;e++)u.push({fChain:t,sChain:t,fMonomer:i[e],sMonomer:s[e],fR:l[e],sR:f[e]});c[t]=o}const f=[],h=n.createHelmWebEditor().editor.m;let p=0;const d=new JSDraw2.Point(0,0);for(let t=0;t<c.length;t++){const n=this.getLinkedPositions(c[t],e.reactionRules),[o,i,s,a]=this.getAllReactants(e.reactionRules,c[t],n);if(i.length>=1){const n=new Array(s[0]-1),l=new Array(o.length-s[0]);for(let e=0;e<s[0]-1;e++){const i=n[e]=o[e],s={type:r.o.AA,i:t,j:e,continuousId:p},a=new JSDraw2.Atom(d,i,s);if(h.addAtom(a),e>0){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}for(let e=s[0];e<o.length;e++){const n=l[e-s[0]]=o[e],i={type:r.o.AA,i:t,j:e,continuousId:p},a=new JSDraw2.Atom(d,n,i);if(h.addAtom(a),e>s[0]){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}h.atoms[i[0]-1].elem=n[i[0]-1]=e.reactionRules[a[0]].name;for(let t=0;t<u.length;t++)u[t].fMonomer>s[0]&&(u[t].fMonomer-=s[0],u[t].fChain++),u[t].sMonomer>s[0]&&(u[t].sMonomer-=s[0],u[t].sChain++);u.push({fChain:0,sChain:0,fMonomer:i[0],sMonomer:s[0]-1,fR:3,sR:2}),u.push({fChain:0,sChain:1,fMonomer:i[0],sMonomer:1,fR:4,sR:1});const c=new Array(n.length);for(let t=0;t<n.length;t++)c[t]=`[${n[t]}]`;const g=new Array(l.length);for(let t=0;t<l.length;t++)g[t]=`[${l[t]}]`;f.push(n),f.push(l)}else{for(let e=0;e<c[t].length;e++){const n=c[t][e],o={type:r.o.AA,i:t,j:e,continuousId:p},i=new JSDraw2.Atom(d,n,o);if(h.addAtom(i),e>0){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}f.push(c[t])}}for(const t of u){const e=h.atoms[t.fMonomer-1],n=h.atoms[t.sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=t.fR,r.r2=t.sR,h.addBond(r)}return new s(f,u,h,n)}static parseNotation(t,e){const n=[],o=[],i=e.createHelmWebEditor().editor.m,a=/(\(.\d+\))?\{[^\}]*\}/g,u=[];u.push(t.replaceAll(a,""));const l=t.matchAll(a);for(const t of l){const e=t[0];e&&u.push(e)}let c=0;for(let t=0;t<u.length;t++){const e=u[t].split("-"),r=new Array(e.length);let i=0;for(let n=0;n<e.length;n++){const s=e[n].replace("{","").replace("}","");""!==s?(r[n]=s,c++,i++):o.push({fChain:t,sChain:t+1,fMonomer:c,sMonomer:c+1,fR:1,sR:1})}n.push(r.slice(0,i))}c=0;const f=new JSDraw2.Point(0,0);for(let t=0;t<n.length;t++)for(let e=0;e<n[t].length;e++){if(n[t][e]){const o=n[t][e],s={type:r.o.AA,i:t,j:e,continuousId:c},a=new JSDraw2.Atom(f,o,s);if(i.addAtom(a),0!==e){const t=i.atoms[c-1],e=i.atoms[c],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,i.addBond(n)}c++,f.x+=JSDraw2.Editor.BONDLENGTH}f.y+=4*JSDraw2.Editor.BONDLENGTH}for(let t=0;t<o.length;t++){const e=i.atoms[o[t].fMonomer-1],n=i.atoms[o[t].sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=o[t].fR,r.r2=o[t].sR,i.addBond(r)}return new s(n,o,i,e)}getHelmChanged(t,e){let n=0,r=0,o=0;t:for(let e=0;e<this.monomers.length;e++)for(let i=0;i<this.monomers[e].length;i++){if(n==t){r=e,o=i;break t}n++}const i=this.monomers[r][o];this.monomers[r][o]=`[${e}]`;const s=this.getHelm();return this.monomers[r][o]=i,s}getNotationHelm(){return this.getHelm()}getHelm(){let t="";for(let e=0;e<this.monomers.length;e++){e>0&&(t+="|"),t+=`PEPTIDE${e+1}{`;for(let n=0;n<this.monomers[e].length;n++){n>0&&(t+=".");const r=this.monomers[e][n];t+=r.length>1?`[${r}]`:r}t+="}"}t+="$";for(let e=0;e<this.linkages.length;e++)e>0&&(t+="|"),t+=`PEPTIDE${this.linkages[e].fChain+1},PEPTIDE${this.linkages[e].sChain+1},`,t+=`${(0,o.MH)(this.linkages[e].fMonomer-1,this.monomers)[0]+1}:R${this.linkages[e].fR}-`,t+=`${(0,o.MH)(this.linkages[e].sMonomer-1,this.monomers)[0]+1}:R${this.linkages[e].sR}`;return t+="$$$V2.0",t}getNotation(){const t=this.mol.atoms,e=this.mol.bonds,n=[],r=[];for(let t=0;t<e.length;t++)e[t].a1.bio.i!==e[t].a2.bio.i&&r.push(t);for(let e=0;e<t.length;e++){const r=t[e].bio?.i;r+1>n.length?n.push(1):n[r]++}const o=new Array(n.length);let i=0;for(let e=0;e<n.length;e++){const r=new Array(n[e]);for(let o=0;o<n[e];o++)r[o]=t[i].elem,i++;o[e]=r}let s="";for(let t=0;t<o.length;t++){let n="";for(let e=0;e<o[t].length;e++)n+=`${0==e?"":"-"}${o[t][e]}`;if(0!==t){const t=/(\(.\d+\))/,e=n.match(t);n=n.replace(e?.[0],""),n=`${e?e?.[0]:""}{${n}}`}else if(o.length>1){const t=0==e[r[0]].a1.bio.i&&0==e[r[0]].a1.bio.j,o=1==e[r[0]].a2.bio.i&&0==e[r[0]].a1.bio.j;t&&o&&(n+="-")}s+=n}return s}static getLinkedPositions(t,e){const n=[];for(let r=0;r<e.length;r++){let o=!1,s=!1,a=!1,u=-1,l=-1;const c=`(${e[r].code})`,[f,h]=(0,i.Ln)(e[r]);if(f.length>0)for(let e=0;e<f.length;e++){for(let n=0;n<t.length;n++)if(t[n].includes(c)){if(o){if(a&&t[n]==h[e]+c){s=!0,l=n;break}if(a||t[n]!=f[e]+c)continue;s=!0,l=n;break}if(t[n]==f[e]+c)o=!0,a=!0,u=n;else{if(t[n]!=h[e]+c)continue;o=!0,a=!1,u=n}}o&&s&&(a?n.push([u,l,r]):n.push([l,u,r]))}else{for(let e=0;e<t.length;e++)if(t[e].includes(c)){if(o){if(a&&t[e]){s=!0,l=e;break}if(!a&&t[e]){s=!0,l=e;break}continue}o=!0,a=!0,u=e}if(!o||!s)continue;a?n.push([u,l,r]):n.push([l,u,r])}}return n}static getAllCycles(t,e,n){const r=[],o=[],i=[],s=[],a=n.length;for(let u=0;u<a;u++){if(-1==n[u][0])continue;const a=n[u][2],l=t[a].code;e[n[u][0]]=e[n[u][0]].replace(`(${l})`,""),e[n[u][1]]=e[n[u][1]].replace(`(${l})`,""),r.push(n[u][0]+1),o.push(n[u][1]+1),i.push(t[a].firstLinkingGroup),s.push(t[a].secondLinkingGroup)}return[e,r,o,i,s]}static getAllReactants(t,e,n){const r=[],o=[],i=[],s=n.length;for(let a=0;a<s;a++){if(-1==n[a][0])continue;const s=t[n[a][2]].code;e[n[a][0]]=e[n[a][0]].replace(`(${s})`,""),e[n[a][1]]=e[n[a][1]].replace(`(${s})`,""),r.push(n[a][0]+1),o.push(n[a][1]+1),i.push(n[a][2])}return[e,r,o,i]}check(t=!1){const e=[],n=this.monomers.map((t=>t.length)).reduce(((t,e)=>t+e),0);this.mol.atoms.length!==n&&e.push(`The mol atoms count ${this.mol.atoms.length} does not match the total number ${n} of chains' monomers.`);const r=this.monomers.map((t=>t.length-1)).reduce(((t,e)=>t+e),0)+this.linkages.length;this.mol.bonds.length!==r&&e.push(`The mol bonds count ${this.mol.bonds.length} does not match the total number ${r} in- and inter-chain linkages.`);let o=0;for(let t=0;t<this.monomers.length;++t){const n=this.monomers[t];for(let t=0;t<n.length;++t)try{const r=n[t],i=this.mol.atoms[o];i.bio.continuousId!==o&&e.push(`Atom #${o} has incorrect .bio.continuousId: ${i.bio.continuousId}.`),i.elem!==r&&e.push(`Atom #${o} elem: '${i.elem}' does not match chain monomer: '${r}'.`)}finally{o++}}if(t&&e.length>0)throw new Error(`Chain errors:\n${e.map((t=>` ${t}`)).join("\n")}`);return e}}},229:(t,e,n)=>{"use strict";n.d(e,{b:()=>s});var r=n(192),o=n(269),i=n(511);function s(t,e,n){const s=new Array(t.length);for(let a=0;a<t.length;a++)try{if(null==t[a])s[a]="";else{const r=o.s.fromNotation(t[a],e,n);s[a]=r.getHelm()}}catch(t){const[e,n]=(0,r.AP)(t);i._package.logger.error(e,void 0,n),s[a]=""}return s}},125:(t,e,n)=>{"use strict";n.d(e,{AM:()=>y,MH:()=>f,Tl:()=>m,jX:()=>h});var r=n(328),o=n(991),i=n.n(o),s=n(890),a=n(717),u=n(699),l=n(296),c=n(192);function f(t,e){let n,r=t;for(n=0;n<e.length&&r>=e[n].length;++n)r-=e[n].length;return[r,n]}function h(t,e,n){let r=0;for(let t=0;t<e;++t)r+=n[t].length;return r+t}function p(t,e){const n=t.molfile;let r=e.molfile;const o=t.rgroups.length,i=r.indexOf("M RGP");if(-1!==i){const t=r.substring(i+6,i+9),e=Number(t);for(let t=0;t<e;t++){const e=i+9+4+8*t,n=i+9+8+8*t,s=r.substring(e,n),a=Number(s)+o,u=Math.floor(Math.log10(a)+1),l=" ".repeat(4-u)+String(a);r=r.substring(0,e)+l+r.substring(n,r.length)}}return[n,r]}function d(t,e,n,o,i){let s=null,a=null,u=null,f=null,h=null,p=null,d="";try{if(s=t.get_rxn(e),!s)throw new l.J5(e);a=new t.MolList,u=t.get_mol(n),f=t.get_mol(o),a.append(u),a.append(f),h=s.run_reactants(a,1),p=h.get(0).next(),d=p?.get_molblock()}catch(t){const[e,n]=(0,c.AP)(t);throw r.shell.error(`Can not assemble monomer '${i}': ${e}.`),t}finally{s?.delete(),a?.delete(),u?.delete(),f?.delete(),h?.delete(),p?.delete()}return d}function g(t,e){const n=new Array(t?.rgroups.length+e?.rgroups.length),r=t?.rgroups.length,o=e?.rgroups.length;for(let e=0;e<r;e++)n[e]=t?.rgroups[e];for(let t=0;t<o;t++){const o=e?.rgroups[t].label.replace("R",""),i=Number(o)+r,s={capGroupSMILES:e?.rgroups[t].capGroupSMILES.replace(o,String(i)),alternateId:e?.rgroups[t].alternateId.replace(o,String(i)),capGroupName:e?.rgroups[t].capGroupName,label:e?.rgroups[t].label.replace(o,String(i))};n[t+r]=s}return n}function m(t,e,n){const r=n.reaction,o=n.name,[i,s]=(0,u.Ln)(n),a=new Array(i.length),c=new Array(i.length);for(let n=0;n<i.length;n++){const u=e.getMonomer("PEPTIDE",i[n]);if(!u)throw new l.bl("PEPTIDE",i[n]);const f=e.getMonomer("PEPTIDE",s[n]);if(!f)throw new l.bl("PEPTIDE",s[n]);const[h,m]=p(u,f),y={symbol:o,name:o,molfile:d(t,r,h,m,o),author:"",id:0,rgroups:g(u,f),smiles:"",polymerType:"PEPTIDE",monomerType:"Backbone",createDate:null};y.meta=Object.assign(y.meta??{},{colors:{default:{line:"#2083D5",text:"#2083D5",background:"#F2F2F5"}}}),a[n]=o,c[n]=y}return[a,c]}async function y(t){const e=(await(0,s.pj)()).getMonomerLib(),n=await(0,a.j)(),r={};for(let o=0;o<t.reactionRules.length;o++){const[i,s]=m(n,e,t.reactionRules[o]);for(let t=0;t<i.length;t++)r[i[t]]=s[t]}const o={PEPTIDE:r};return e.override(o,"ST-PT-reactions."+i().repeat(1).map((()=>Math.floor(36*Math.random()).toString(36))).take(4).toArray().join(""))}},699:(t,e,n)=>{"use strict";n.d(e,{Ln:()=>p,Q4:()=>h});var r=n(82);n(328),n(389),n(991),n(511),n(124),n(229),n(439);const o="System:AppData/SequenceTranslator/polytool-rules/",i="code",s="firstMonomers",a="secondMonomers",u="name",l="firstLinkingGroup",c="secondLinkingGroup";class f{constructor(t,e,n,r){this.homodimerCode=t,this.heterodimerCode=e,this.linkRules=n,this.reactionRules=r}set homodimer(t){this.homodimerCode=t}set heterodimer(t){this.heterodimerCode=t}addLinkRules(t){for(let e=0;e<t.length;e++)this.linkRules.push(t[e])}addSynthesisRules(t){for(let e=0;e<t.length;e++)this.reactionRules.push(t[e])}getLinkRulesDf(){const t=this.linkRules.length,e=r.Column.int(i,t),n=r.Column.string(s,t),o=r.Column.string(a,t),u=r.Column.int(l,t),f=r.Column.int(c,t);for(let r=0;r<t;r++)e.set(r,this.linkRules[r].code),n.set(r,this.linkRules[r].firstMonomers.toString()),o.set(r,this.linkRules[r].secondMonomers.toString()),u.set(r,this.linkRules[r].firstLinkingGroup),f.set(r,this.linkRules[r].secondLinkingGroup);return r.DataFrame.fromColumns([e,n,o,u,f])}getSynthesisRulesDf(){const t=this.reactionRules.length,e=r.Column.int(i,t),n=r.Column.string(s,t),o=r.Column.string(a,t),l=r.Column.string(u,t),c=r.Column.string("firstReactant",t),f=r.Column.string("secondReactant",t),h=r.Column.string("product",t);for(let r=0;r<t;r++){e.set(r,this.reactionRules[r].code),n.set(r,this.reactionRules[r].firstMonomers.toString()),o.set(r,this.reactionRules[r].secondMonomers.toString()),l.set(r,this.reactionRules[r].name);const t=this.reactionRules[r].reaction.split(">>"),i=t[0].split(".");c.set(r,i[0]),f.set(r,i[1]),h.set(r,t[1])}return c.semType=r.SEMTYPE.MOLECULE,f.semType=r.SEMTYPE.MOLECULE,h.semType=r.SEMTYPE.MOLECULE,r.DataFrame.fromColumns([l,c,f,h,e,n,o])}setLinkRules(t){const e=t.rowCount,n=new Array(e),r=t.columns.byName(i),o=t.columns.byName(s),u=t.columns.byName(a),f=t.columns.byName(l),h=t.columns.byName(c);for(let t=0;t<e;t++){const e={code:r.get(t),firstMonomers:o.get(t).split(","),secondMonomers:u.get(t).split(","),firstLinkingGroup:f.get(t),secondLinkingGroup:h.get(t)};n[t]=e}this.linkRules=n}setSynthesisRules(t){const e=t.rowCount,n=new Array(e),r=t.columns.byName(i),o=t.columns.byName(s),l=t.columns.byName(a),c=t.columns.byName(u),f=t.columns.byName("firstReactant"),h=t.columns.byName("secondReactant"),p=t.columns.byName("product");for(let t=0;t<e;t++){const e=`${f.get(t)}.${h.get(t)}>>${p.get(t)}`,i={code:r.get(t),firstMonomers:o.get(t).split(","),secondMonomers:l.get(t).split(","),reaction:e,name:c.get(t)};n[t]=i}this.reactionRules=n}}async function h(t){const e=new r.FileSource(o),n=new f(null,null,[],[]);for(let r=0;r<t.length;r++){const i=await e.readAsText(t[r].replace(o,"")),s=JSON.parse(i);n.homodimer=s.homodimerCode,n.heterodimer=s.heterodimerCode,n.addLinkRules(s.linkRules),n.addSynthesisRules(s.reactionRules)}return n}function p(t){const e=t.firstMonomers.length*t.secondMonomers.length,n=new Array(e),r=new Array(e);let o=0;for(let e=0;e<t.firstMonomers.length;e++)for(let i=0;i<t.secondMonomers.length;i++)n[o]=t.firstMonomers[e],r[o]=t.secondMonomers[i],o++;return[n,r]}},820:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(296);function o(t,e,n,r){const o=new Array(r.length*(n-e+1));for(let i=0;i<r.length;++i){const s=n-e+1;for(let n=0;n<s;++n){const a=e+n,u=r[i],l=o[i*s+n]=t.clone(),c=l.atoms[a].elem;l.atoms[a].elem=u;const f=c?.length>1?`[${c}]`:c,h=u?.length>1?`[${u}]`:u;l.name=`${t.name}-${f}${a+1}${h}`}}return o}function i(t,e,n){const i=new JSDraw2.MolHandler,s=new org.helm.webeditor.Plugin(i);org.helm.webeditor.IO.parseHelm(s,t,new JSDraw2.Point(0,0),void 0);const a=i.m;a.name=e;let u=[];if(n.placeholders)switch(n.type){case r.aK.Single:u=function(t,e){return e.map((e=>o(t,e.position,e.position,e.monomers))).reduce(((t,e)=>t.concat(e)),[])}(i.m,n.placeholders);break;case r.aK.Matrix:u=function(t,e){let n=[t];for(const t of e){const e=n.map((e=>o(e,t.position,t.position,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(i.m,n.placeholders)}let l=[];n.breadthPlaceholders&&(l=function(t,e){if(0==e.length)return[];let n=[t];for(const t of e){const e=n.map((e=>o(e,t.start,t.end,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(i.m,n.breadthPlaceholders)),u=u.concat(l),n.keepOriginal&&(u=[a,...u]);const c=u.map((t=>[org.helm.webeditor.IO.getHelm(t),t.name]));return c}},296:(t,e,n)=>{"use strict";var r;n.d(e,{J5:()=>i,aK:()=>r,bl:()=>o}),function(t){t.Single="single",t.Matrix="matrix"}(r||(r={}));class o extends Error{constructor(t,e,n){super(`Monomer '${e}' of polymer type '${t}' not found`,n),this.type="MonomerNotFoundError"}}class i extends Error{constructor(t,e){super(`Invalid reaction '${t}'.`),this.type="InvalidReactionError"}}},82:t=>{"use strict";t.exports=DG},328:t=>{"use strict";t.exports=grok},389:t=>{"use strict";t.exports=ui},991:t=>{"use strict";t.exports=wu}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.u=t=>t+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=r[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href,n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{_package:()=>O,initAutoTests:()=>$,test:()=>N,tests:()=>e.CN});var t=n(82),e=n(70),o=n(328),i=n(686);class s extends t.Package{async getTranslationHelper(){return await o.functions.call(`${this.name}:getTranslationHelper`)}}function a(t,e,n){return n.createFormatConverter(t,e).convertTo(i.NO.HELM)}function u(t,e,n){return n.createFormatConverter(t,i.NO.HELM).convertTo(e)}const l={Axolabs:{UfAfsCfsGfuacg:"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"},BioSpring:{"A*GC*123456789":"RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p.d([m5C])}$$$$"},Mermade12:{hefglijkLIJKHEFG:"RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"}},c={"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACG","RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p}$$$$":"AGCUACGUACG","RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACGUACGUACG"};(0,e.L1)("Formats to HELM",(()=>{let t;(0,e.gM)((async()=>{t=await O.getTranslationHelper()}));for(const n of Object.keys(l))for(const[r,o]of Object.entries(l[n]))(0,e.t6)(`${n} to HELM`,(async()=>{const i=o,s=a(r,n,t);(0,e.E3)(s,i)}))})),(0,e.L1)("HELM to Formats",(()=>{let t;(0,e.gM)((async()=>{t=await O.getTranslationHelper()}));for(const n of Object.keys(l))for(const[r,o]of Object.entries(l[n]))(0,e.t6)(`${n} to HELM`,(async()=>{const i=r,s=u(o,n,t);(0,e.E3)(s,i)}))}));var f=n(480);(0,e.L1)("HELM to Nucleotides",(()=>{let t;(0,e.gM)((async()=>{t=await O.getTranslationHelper()})),Object.entries(c).forEach((([n,r],o)=>{(0,e.t6)(`Sequence ${o+1} to nucleotides`,(async()=>{const o=r,i=(0,f.Hs)(n,t.monomerLibWrapper);(0,e.E3)(i,o)}))}))}));const h={[i.NO.AXOLABS]:"Afcgacsu",[i.NO.HELM]:"RNA1{[fR](A)p.[25r](C)p.[25r](G)p.[25r](A)p.[25r](C)[sp].[25r](U)}$$$$"};(0,e.L1)("Formats support",(()=>{let t;(0,e.gM)((async()=>{t=await O.getTranslationHelper()})),Object.entries(h).forEach((([n,r])=>{(0,e.t6)(`All formats for ${n}`,(async()=>{const o=function(t,e,n){const r=n.createSequenceValidator(t).getInvalidCodeIndex(e);return(0,f.bD)(t,r,e,n)}(r,n,t),i=Object.keys(o).length,s=Object.keys(l).length+1;(0,e.E3)(!0,s<=i)}))}))}));var p=n(192);(0,e.L1)("files",(()=>{let n;(0,e.gM)((async()=>{n=await O.getTranslationHelper()})),(0,e.t6)("list",(async()=>{let r;const o=t.DataFrame.fromColumns([t.Column.string("subTest"),r=t.Column.bool("success"),t.Column.string("format"),t.Column.string("src"),t.Column.string("res"),t.Column.string("tgt"),t.Column.string("error"),t.Column.string("stack")]),i=await O.files.list("tests",!0,".csv");for(const r of i){const i=t.DataFrame.fromCsv(await r.readAsString()),s=i.columns.byIndex(0),u=s.name,l=i.columns.byIndex(1),c=i.rowCount;for(let t=0;t<c;++t){const i=o.rows.addNew();i.subTest=`${r.name}, row: ${t}`;try{const r=s.get(t),o=l.get(t);i.format=u,i.src=r,i.tgt=o;const c=i.res=a(r,u,n);(0,e.E3)(c,o),i.success=!0}catch(t){const[e,n]=(0,p.AP)(t);i.error=e,i.stack=n,i.success=!1}}}0==o.rowCount&&o.rows.addNew(["empty",!0,"",""]);const s=r.toList().findIndex((t=>1!=t));if(-1!=s){const t=o.rows.get(s);throw new Error(`Subtest '${t.subTest}' failed: ${t.error}`)}return o}),{skipReason:"Can not create test in async manner based on files in Shares."})}));var d=n(312),g=n(3);class m{constructor(t,e,n,r,o,i){this.units=t,this.aligned=e,this.alphabet=n,this.alphabetSize=r,this.alphabetIsMultichar=o,this.separator=i}}async function y(e,n){const r=(await e()).getCol(n),i=await o.functions.call("Bio:detectMacromolecule",{col:r});if(i&&(r.semType=i),r.semType===t.SEMTYPE.MACROMOLECULE){const t=`Negative test detected semType='${r.semType}', units='${r.meta.units}'.`;throw new Error(t)}}async function v(n,r,i,s,a,u,l,c,f=null){const h=(await n()).col(r),p=await o.functions.call("Bio:detectMacromolecule",{col:h});p&&(h.semType=p),(0,e.E3)(h.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(h.meta.units,s),(0,e.E3)(h.getTag(g.gp.aligned),a),(0,e.E3)(h.getTag(g.gp.alphabet),u),f&&(0,e.E3)(h.getTag(g.gp.separator),f);const d=i.getSeqHandler(h);(0,e.E3)(d.getAlphabetSize(),l),(0,e.E3)(d.getAlphabetIsMultichar(),c),d.isHelm()||((0,e.E3)(d.aligned,a),(0,e.E3)(d.alphabet,u))}(0,e.L1)("PolyTool: detectors",(()=>{let n;(0,e.gM)((async()=>{n=await(0,d.Q)()}));const r={cyclized1:{csv:"n,seq\n1,R-F-C(1)-T-G-H-F-Y-G-H-F-Y-G-H-F-Y-P-C(1)-meI\n2,C(1)-T-G-H-F-Y-P-C(1)-meI\n3,R-F-C(1)-T-G-H-F-Y-P-C(1)\n4,C(1)-T-G-H-F-H-P-C(1)\n5,R-F-D(2)-T-G-H-F-Y-P-NH2(2)\n6,R-F-aG(4)-T-G-H-F-Y-P-azG(4)-meI",pos:{seq:new m(g.Hi.CUSTOM,"SEQ",g.YI.UN,13,!0,"-")}}};for(const[o,i]of Object.entries(r))(0,e.t6)(`${o}`,(async()=>{const e=async()=>t.DataFrame.fromCsv(i.csv);for(const t of i.neg??[])await y(e,t);for(const[t,r]of Object.entries(i.pos??{}))await v(e,t,n,r.units,r.aligned,r.alphabet,r.alphabetSize,r.alphabetIsMultichar,r.separator)}))}));var b=n(890);const C="Libraries";let w=Promise.resolve();async function A(){let t;return w=w.then((async()=>{const e=o.userSettings.getValue(C,"Settings",!0);t=e?JSON.parse(e):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await w,t}async function _(t){w=w.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),o.userSettings.add(C,"Settings",JSON.stringify(t),!0)})),await w}var E=n(717),x=n(124),T=n(229),I=n(125),P=n(699);(0,e.L1)("PolyTool: Convert",(()=>{let n,r,i,s,a;(0,e.gM)((async()=>{n=await(0,x.b2)(),r=await(0,d.Q)(),i=await(0,E.j)(),s=await(0,b.pj)(),a=await A(),await s.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await _(a),await s.loadMonomerLib(!0)}));const u={"cyclized-C(1)-2-1":{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0",mol:{atomCount:95,bondCount:100,inchiKey:"LMJUFVBPWWJJPN-AJJYTACESA-N"}}},"cyclized-C(1)-0-1":{src:{seq:"C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$V2.0",mol:{atomCount:73,bondCount:77,inchiKey:"KLFRBMUPPMMGJM-HXTBFBBASA-N"}}},"cyclized-C(1)-2-0":{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)"},tgt:{helm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0",mol:{atomCount:86,bondCount:91,inchiKey:"WIHSRTQGMICACU-DDDKLKPZSA-N"}}},"cyclized-C(1)-0-0":{src:{seq:"C(1)-T-G-H-F-Y-P-C(1)"},tgt:{helm:"PEPTIDE1{C.T.G.H.F.Y.P.C}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$V2.0",mol:{atomCount:64,bondCount:68,inchiKey:"LOSMDBLEXLWPLB-OFZKBENXSA-N"}}},"cyclized-D(2)-NH2(2)-3-0":{src:{seq:"R-F-D(2)-T-G-H-F-Y-P-NH2(2)"},tgt:{helm:"PEPTIDE1{R.F.D.T.G.H.F.Y.P.[NH2]}$PEPTIDE1,PEPTIDE1,10:R2-3:R3$$$V2.0",mol:{atomCount:81,bondCount:86,inchiKey:"CBMGNYKOZWNVNK-AHGCAHLCSA-N"}}},"cyclized-D(2)-NH2(2)-0-0":{src:{seq:"D(2)-T-G-H-F-Y-P-NH2(2)"},tgt:{helm:"PEPTIDE1{D.T.G.H.F.Y.P.[NH2]}$PEPTIDE1,PEPTIDE1,8:R2-1:R3$$$V2.0",mol:{atomCount:59,bondCount:63,inchiKey:"HGRHAUQBJXFERJ-MUFWPYSASA-N"}}},"cyclized-azG(4)-aG(4)-2-1":{src:{seq:"R-F-azG(4)-T-G-H-F-Y-P-aG(4)-meI"},tgt:{helm:"PEPTIDE1{R.F.[GGaz].T.G.H.F.Y.P}|PEPTIDE2{[meI]}$PEPTIDE1,PEPTIDE1,3:R3-9:R2|PEPTIDE1,PEPTIDE2,3:R4-1:R1$$$V2.0",mol:{atomCount:97,bondCount:103,inchiKey:"WJSYGVBGPCCSJF-PERUNASMSA-N"}}}};for(const[t,r]of Object.entries(u))(0,e.t6)(`toHelm-${t}`,(async()=>{const t=await(0,P.Q4)(["rules_example.json"]),o=(0,T.b)([r.src.seq],t,n);(0,e.E3)(o[0],r.tgt.helm)}));for(const[o,s]of Object.entries(u))(0,e.t6)(`toAtomicLevel-${o}`,(async()=>{const o=await(0,P.Q4)(["rules_example.json"]),a=(0,T.b)([s.src.seq],o,n),u=await(0,I.AM)(o),l=t.Column.fromStrings("helm",a);l.semType=t.SEMTYPE.MACROMOLECULE,l.meta.units=g.Hi.HELM;const c=await r.helmToAtomicLevel(l,!1,!1,u);if(c.warnings&&c.warnings.length>0)throw new Error(c.warnings[0]);(0,e.E3)(null!=c.molCol,!0,".molCol is not null");const f=c.molCol.get(0),h=i.get_mol(f);try{const t={atomCount:h.get_num_atoms(),bondCount:h.get_num_bonds(),inchiKey:i.get_inchikey_for_inchi(h.get_inchi())};(0,e.Xk)(t,s.tgt.mol)}finally{h.delete()}}));(0,e.t6)("ui-col-wo-table",(async()=>{const n=O.name,r=Object.values(u).map((t=>t.src.seq)),i=Object.values(u).map((t=>t.tgt.helm)),s=t.Column.fromStrings("seq",r),a=await o.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});(0,e.J6)(a.toList(),i),(0,e.E3)(a.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(a.meta.units,g.Hi.HELM),(0,e.E3)(a.dataFrame,null)})),(0,e.t6)("ui-col",(async()=>{const n=O.name,r=Object.values(u).map((t=>t.src.seq)),i=Object.values(u).map((t=>t.tgt.helm)),s=t.Column.fromStrings("seq",r),a=t.DataFrame.fromColumns([s]),l=o.shell.addTableView(a),c=await o.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});(0,e.J6)(c.toList(),i),(0,e.E3)(c.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(c.meta.units,g.Hi.HELM),(0,e.E3)(c.dataFrame.id,a.id),await(0,e.PE)(l.grid.onAfterDrawContent,(()=>{}),(async()=>{l.grid.invalidate()}),15e3),(0,e.E3)(c.getTag(t.TAGS.CELL_RENDERER),"helm")}))}));var S=n(296),L=n(820);(0,e.L1)("PolyTool: Enumerate",(()=>{let t,n,r;(0,e.gM)((async()=>{t=await(0,x.b2)(),n=await(0,b.pj)(),r=await A(),await n.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await _(r),await n.loadMonomerLib(!0)}));const o={single1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},"single-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},matrix1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Matrix,placeholders:[{position:1,monomers:["D","L"]},{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7T"}]}};for(const[t,n]of Object.entries(o))(0,e.t6)(`${t}`,(async()=>{const t=(0,L.o)(n.src,"",n.params);(0,e.J6)(t,n.tgt.map((t=>[t.seq,t.name])))}))})),(0,e.L1)("PolyTool: Enumerate",(()=>{let t,n,r;(0,e.gM)((async()=>{t=await(0,x.b2)(),n=await(0,b.pj)(),r=await A(),await n.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await _(r),await n.loadMonomerLib(!0)}));const o={breadth1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},"breadth1-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},breadth2:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K","Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5Y"}]},"breadth-double":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]},{start:2,end:4,monomers:["Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-K3Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-K4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-K5Y"}]}};for(const[t,n]of Object.entries(o))(0,e.t6)(`${t}`,(async()=>{const t=(0,L.o)(n.src,"",n.params);(0,e.J6)(t,n.tgt.map((t=>[t.seq,t.name])))}))}));var M=n(269);(0,e.L1)("PolyTool: Chain: parseNotation",(()=>{let t;(0,e.gM)((async()=>{t=await(0,x.b2)()}));const n={cyclized:{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{R.F.[C(1)].T.G.H.F.Y.P.[C(1)].[meI]}$$$$V2.0"}},dimerized1:{src:{seq:"(#3)Succ-{A(CHOL)-F-C(1)-T-G-H-Y-P-C(1)-NH2}"},tgt:{helm:"PEPTIDE1{[(#3)Succ]}|PEPTIDE2{[A(CHOL)].F.[C(1)].T.G.H.Y.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0"}},dimerized2:{src:{seq:"($3)Succ-{R-F-C(1)-T-G-H-F-P-C(1)-NH2}($2){A(CHOL)-F-C(1)-T-G-H-F-P-C(1)-NH2}"},tgt:{helm:"PEPTIDE1{[($3)Succ]}|PEPTIDE2{R.F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}|PEPTIDE3{[($2)A(CHOL)].F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0"}}};for(const[r,o]of Object.entries(n))(0,e.t6)(`${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=await M.s.parseNotation(o.src.seq,t),r=n.mol,i=t.createHelmWebEditor();i.editor.setMol(r);const s=i.editor.getHelm(),a=n.getNotationHelm();(0,e.E3)(s,o.tgt.helm),(0,e.E3)(a,o.tgt.helm)}),"reaction2"==r?{skipReason:"reverse reaction"}:void 0);const r={"0-in-4-4-3":{inIdx:0,spIdx:0,outIdx:0,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"3-in-4-4-3":{inIdx:3,spIdx:0,outIdx:3,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"4-in-4-4-3":{inIdx:0,spIdx:1,outIdx:4,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"7-in-4-4-3":{inIdx:3,spIdx:1,outIdx:7,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"8-in-4-4-3":{inIdx:0,spIdx:2,outIdx:8,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"0-in-1-1-6-3":{inIdx:0,spIdx:0,outIdx:0,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"1-in-1-1-6-3":{inIdx:0,spIdx:1,outIdx:1,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"2-in-1-1-6-3":{inIdx:0,spIdx:2,outIdx:2,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"3-in-1-1-6-3":{inIdx:1,spIdx:2,outIdx:3,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"7-in-1-1-6-3":{inIdx:5,spIdx:2,outIdx:7,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"8-in-1-1-6-3":{inIdx:0,spIdx:3,outIdx:8,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]}};for(const[t,{inIdx:n,spIdx:o,outIdx:i,monomers:s}]of Object.entries(r))(0,e.t6)(`innerIdx-${t}`,(async()=>{const[t,r]=(0,I.MH)(i,s);(0,e.E3)(t,n),(0,e.E3)(r,o)}));for(const[t,{inIdx:n,spIdx:o,outIdx:i,monomers:s}]of Object.entries(r))(0,e.t6)(`outerIdx-${t}`,(async()=>{const t=(0,I.jX)(n,o,s);(0,e.E3)(t,i)}))})),(0,e.L1)("PolyTool: Chain",(()=>{let t;(0,e.gM)((async()=>{t=await(0,x.b2)()}));const n={cyclized:{data:{templateSeq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI",templateHelm:"PEPTIDE1{R.F.[C(1)].T.G.H.F.Y.P.[C(1)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[11],linkageCount:1}}},reaction1:{data:{templateSeq:"R-F-azG(4)-T-G-H-F-Y-P-aG(4)-meI",templateHelm:"PEPTIDE1{R.F.[azG(4)].T.G.H.F.Y.P.[aG(4)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F.[GGaz].T.G.H.F.Y.P}|PEPTIDE2{[meI]}$PEPTIDE1,PEPTIDE1,3:R3-9:R2|PEPTIDE1,PEPTIDE2,3:R4-1:R1$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[9,1],linkageCount:2}}},reaction2:{data:{templateSeq:"R-F-aG(4)-T-G-H-F-Y-P-azG(4)-meI",templateHelm:"PEPTIDE1{R.F.[aG(4)].T.G.H.F.Y.P.[azG(4)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F}|PEPTIDE2{T.G.H.F.Y.P.[GGaz].[meI]}$PEPTIDE1,PEPTIDE2,2:R2-7:R3|PEPTIDE2,PEPTIDE2,1:R1-7:R4,$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[2,8],linkageCount:2}}},dimerized1:{data:{templateSeq:"(#3)Succ-{A(CHOL)-F-C(1)-T-G-H-Y-P-C(1)-NH2}",templateHelm:"PEPTIDE1{[(#3)Succ]}|PEPTIDE2{[A(CHOL)].F.[C(1)].T.G.H.Y.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0",mmHelm:"PEPTIDE1{[(#3)Succ].[{A(CHOL)].F.C.T.G.H.Y.P.C.[NH2}]}$PEPTIDE1,PEPTIDE1,4:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[1,10],linkageCount:1},mmChain:{monomerCount:[11],linkageCount:1}}},dimerized2:{data:{templateSeq:"($3)Succ-{R-F-C(1)-T-G-H-F-P-C(1)-NH2}($3){A(CHOL)-F-C(1)-Y-H-G-D-N-C(1)-meI}",templateHelm:"PEPTIDE1{[($3)Succ]}|PEPTIDE2{R.F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}|PEPTIDE3{[($3)A(CHOL)].F.[C(1)].Y.H.G.D.N.[C(1)].[meI]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0",mmHelm:"PEPTIDE1{[($3)Succ].[{R].F.C.T.G.H.F.P.C.[NH2}($3){A(CHOL)].F.[C(1)].Y.H.G.D.N.[C(1)].[meI}]}$PEPTIDE1,PEPTIDE1,4:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[1,10,10],linkageCount:1},mmChain:{monomerCount:[20],linkageCount:1}}}};for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`fromNotation-${r}`,(async()=>{const n=await(0,P.Q4)(["rules_example.json"]),r=M.s.fromNotation(o.templateSeq,n,t);r.check(!0),(0,e.J6)(r.monomers.map((t=>t.length)),i.mmChain.monomerCount),(0,e.E3)(r.linkages.length,i.mmChain.linkageCount),(0,e.E3)(r.getHelm(),o.mmHelm)}),"reaction2"==r?{skipReason:"reverse reaction"}:void 0);for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`parseNotation-${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=M.s.parseNotation(o.templateSeq,t);n.check(!0),(0,e.J6)(n.monomers.map((t=>t.length)),i.templateChain.monomerCount),(0,e.E3)(n.linkages.length,i.templateChain.linkageCount),(0,e.E3)(n.getHelm(),o.templateHelm),(0,e.E3)(n.getNotation(),o.templateSeq)}));for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`parseHelm-${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=M.s.parseHelm(o.templateHelm,t);n.check(!0),(0,e.J6)(n.monomers.map((t=>t.length)),i.templateChain.monomerCount),(0,e.E3)(n.linkages.length,i.templateChain.linkageCount),(0,e.E3)(n.getHelm(),o.templateHelm),(0,e.E3)(n.getNotation(),o.templateSeq)}));for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`applyRules-${r}`,(async()=>{const n=await(0,P.Q4)(["rules_example.json"]),r=M.s.parseNotation(o.templateSeq,t),s=await r.applyRules(n);s.check(!0),(0,e.J6)(s.monomers.map((t=>t.length)),i.mmChain.monomerCount),(0,e.E3)(s.linkages.length,i.mmChain.linkageCount),(0,e.E3)(s.getHelm(),o.mmHelm)}),{skipReason:"applyRules is not implemented"})})),(0,e.L1)("toAtomicLevel",(()=>{let n,r,o;(0,e.gM)((async()=>{r=await(0,b.pj)(),n=await A(),o=await(0,E.j)(),await r.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await _(n),await r.loadMonomerLib(!0)})),(0,e.t6)("override",(async()=>{const n=r.getMonomerLib(),i=await O.files.readAsText("tests/polytool-reaction-lib.json"),s=JSON.parse(i).find((t=>"GGaz"===t.symbol));(0,e.E3)(null!=s,!0,"Monomer 'GGaz' not found.");const a={PEPTIDE:{GGaz:s}},u=n.override(a,"test"),l=await(0,d.Q)(),c=t.Column.fromList(t.COLUMN_TYPE.STRING,"helm",["PEPTIDE1{F.P.Y.[GGaz].H.A.A.G.G.A.C}|PEPTIDE2{A.A.A}$PEPTIDE1,PEPTIDE2,4:R4-1:R1|PEPTIDE1,PEPTIDE1,11:R2-4:R3$$$V2.0"]);c.semType=t.SEMTYPE.MACROMOLECULE,c.meta.units=g.Hi.HELM;const f=await l.helmToAtomicLevel(c,!1,!1,u);(0,e.E3)(null!=f.molCol,!0,"Result molCol is null");const h=f.molCol.get(0);(0,e.E3)(!!h,!0,"Molfile is empty");const p=o.get_mol(h);try{const t=p.get_inchi(),n=o.get_inchikey_for_inchi(t);(0,e.E3)(p.get_num_bonds(),103),(0,e.E3)(p.get_num_atoms(),98),(0,e.E3)(n,"XPQUTLNSNIMERR-WKBTUBAPSA-N")}finally{p.delete()}})),(0,e.t6)("getNewMonomer",(async()=>{const t=await(0,E.j)(),n=r.getMonomerLib(),o=(await(0,P.Q4)(["rules_example.json"])).reactionRules.find((t=>"GGaz"==t.name)),[i,s]=(0,I.Tl)(t,n,o);(0,e.E3)(i[0],o.name);const a=t.get_mol(s[0].molfile);try{const n=a.get_inchi();t.get_inchikey_for_inchi(n),(0,e.E3)(a.get_num_bonds(),18),(0,e.E3)(a.get_num_atoms(),18)}finally{a.delete()}}))}));const O=new s;async function N(n,r,o){const i=await(0,e.N$)({category:n,test:r,testContext:o,verbose:!0});return t.DataFrame.fromObjects(i)}async function $(){await(0,e.Xb)(O,O.getModule("package-test.js"))}})(),sequencetranslator_test=r})();
2
+ var sequencetranslator_test;(()=>{var t={717:(t,e,n)=>{"use strict";n.d(e,{j:()=>o});var r=n(82);async function o(){const t=r.Func.find({package:"Chem",name:"getRdKitModule"});if(0===t.length)throw new Error('Package "Chem" must be installed for getRdKitModule.');return(await t[0].prepare().call()).getOutputParamValue()}},599:(t,e,n)=>{"use strict";n.d(e,{o:()=>r.o});var r=n(869)},124:(t,e,n)=>{"use strict";n.d(e,{b2:()=>i});var r=n(389),o=n(82);async function i(){const t="Helm",e=o.Func.find({package:t,name:"getHelmHelper"});if(0===e.length)throw new Error(`Package '${t}' must be installed for HelmHelper.`);return(await e[0].prepare().call()).getOutputParamValue()}o.JsInputBase,Error,r.input.helmAsync=async function(t,e){return(await i()).createHelmInput(t,e)}},890:(t,e,n)=>{"use strict";n.d(e,{pj:()=>p});var r,o,i,s,a,u,l,c=n(82);n(328);class f{constructor(t,e=!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 t){const n=t,r=f._createBuffer(n);if(e)for(let t=0;t<r.length;t++)r[t]=-1;this._data=r,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,r){if(t<e||t>n)throw new Error(`Argument ${r} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let r=0;r<n;r++)e[r]=t[r]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new f(t._length);n._length=t._length,n._data=f._createBuffer(n._length),n._version=0;const r=t.lengthInInts;for(let o=0;o<r;o++)n._data[o]=t._data[o]&e._data[o];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new f(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new f(t);for(let r=0;r<t;++r)n.setBit(r,e(r));return n._version=0,n}static fromString(t){return f.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new f(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new f(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let r=0,o=0;for(;e-o>=4;)n._data[r++]=255&t[o]|(255&t[o+1])<<8|(255&t[o+2])<<16|(255&t[o+3])<<24,o+=4;return e-o==3&&(n._data[r]=(255&t[o+2])<<16),e-o==2&&(n._data[r]|=(255&t[o+1])<<8),e-o==1&&(n._data[r]|=255&t[o]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new f(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,r=this.lengthInInts;for(let t=0;t<r;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,r=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(r)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,r=!0,o=!0){if(n&&o&&this.setAll(!e,!1),o)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(r)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return f.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return n}setRange(t,e,n,r=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const o=Math.min(t,e),i=Math.max(t,e);if(n)for(let t=o;t<=i;t++)this.setTrue(t);else for(let t=o;t<=i;t++)this.setFalse(t);return this.incrementVersion(r),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const r=this._length;this.setLength(this._length+e);for(let n=r-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let r=t;r<t+e;r++)this.setBit(r,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let r=-1;-1!=(r=t.findNext(r,!e));)this.setFast(n++,this.getBit(r));this._length=n,this._version++}return this}getBit(t){return!!(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=f._onBitCount[255&t];let n=this._data[e];const r=31&this._length;for(0!=r&&(n&=~(4294967295<<r));0!=n;n>>>=8)this._selectedCount+=f._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const r=this.lengthInInts;let o=0;for(;o<r-1;o++)for(let e=this._data[o]&t._data[o];0!=e;e>>>=8)n+=f._onBitCount[255&e];let i=this._data[o]&t._data[o];const s=31&this._length;for(0!=s&&(i&=~(4294967295<<s));0!=i;i>>>=8)n+=f._onBitCount[255&i];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=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(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const r=this.lengthInInts;for(let o=Math.floor(t/32);o<r;o++){let r=e?this._data[o]:~this._data[o];if(0!=n)r&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==r)continue;for(let e=0;0!=r;e+=8,r>>>=8){const n=f._firstOnBit[255&r];if(n>=0)return(t=n+32*o+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let r=Math.floor(t/32);r>=0;r--){let t=e?this._data[r]:~this._data[r];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=f._lastOnBit[t>>>24];if(n>=0)return n+32*r+e}}return-1}}f._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]),f._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]),f._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(r||(r={})),function(t){t.Euclidean="Euclidean"}(o||(o={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(i||(i={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(s||(s={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(u||(u={})),function(t){t.CommonItems="Common Items"}(l||(l={}));new Uint32Array(65536);var h;async function p(){const t=c.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}!function(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(h||(h={})),h.HAMMING,h.LEVENSHTEIN,h.NEEDLEMANN_WUNSCH,h.MONOMER_CHEMICAL_DISTANCE,i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Cosine,i.Tanimoto,i.Asymmetric,i.Cosine,i.Sokal,h.HAMMING,h.LEVENSHTEIN,h.MONOMER_CHEMICAL_DISTANCE,h.NEEDLEMANN_WUNSCH,n(151),n(439)},151:(t,e,n)=>{"use strict";new RegExp("[rd]\\((\\w)\\)p?","g")},192:(t,e,n)=>{"use strict";function r(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?r(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function o(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?o(t.$thrownJsError):void 0}function i(t){return[r(t),o(t)]}n.d(e,{AP:()=>i})},439:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>r,YI:()=>o,_S:()=>u,b9:()=>l,gp:()=>i});var r,o,i,s=n(738);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm",t.CUSTOM="custom"}(r||(r={})),function(t){t.DNA="DNA",t.RNA="RNA",t.PT="PT",t.UN="UN"}(o||(o={})),function(t){t.aligned="aligned",t.alphabet="alphabet",t.alphabetSize=".alphabetSize",t.alphabetIsMultichar=".alphabetIsMultichar",t.separator="separator",t.isHelmCompatible=".isHelmCompatible",t.positionNames=".positionNames",t.positionLabels=".positionLabels",t.regions=".regions"}(i||(i={}));const a=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"])}}},u=(new s.a(o.PT,a.fasta.peptide,.5),new s.a(o.DNA,a.fasta.dna,.55),new s.a(o.RNA,a.fasta.rna,.55),""),l={[r.FASTA]:"-",[r.SEPARATOR]:"",[r.HELM]:"*"}},3:(t,e,n)=>{"use strict";n.d(e,{Hi:()=>r.Hi,YI:()=>r.YI,dh:()=>o.dh,gp:()=>r.gp,zS:()=>o.zS});var r=n(439),o=n(291)},738:(t,e,n)=>{"use strict";n.d(e,{a:()=>r});class r{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}},291:(t,e,n)=>{"use strict";n.d(e,{Mu:()=>m,dh:()=>y,zS:()=>b});var r=n(82),o=n(991),i=n.n(o),s=(n(738),n(439));class a{static makePalette(t,e=!1,n=a){const r={};return t.forEach((t=>{const n=t[0],o=t[1];n.forEach(((t,n)=>{r[t]=this.colourPalette[o][e?0:n]}))})),new n(r)}constructor(t){this._palette=t}get(t,e){return this._palette[t]}}a.undefinedColor="rgb(100,100,100)",a.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)"]};class u extends a{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,u)),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,u)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new u({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(t){const e=t in u.aaSynonyms?u.aaSynonyms[t]:t;return super.get(e)}}u.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class l{static getPalette(t="grok"){switch(t){case"grok":return u.GrokGroups;case"lesk":return u.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",r="";for(const o of t)"("==o?e++:")"==o?e--:e?n+=o:r+=o;return isNaN(parseInt(n))?[r,n]:[r,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[r,o]=this.getInnerOuter(t);if(r=r.length>6?`${r.slice(0,3)}...`:r,o=o.length>6?`${o.slice(0,3)}...`:o,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,o,1]:[this.undefinedColor,r,o,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,o,2]:[this.undefinedColor,r,o,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,o,3]:[this.undefinedColor,r,o,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,o,4]:[this.undefinedColor,r,o,4]}return[this.undefinedColor,r,o,0]}}l.SemType="Aminoacids",l.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",l.undefinedColor="rgb(100,100,100)",l.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"},l.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"},l.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(*)*"},l.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"};class c{}c.SemType="Nucleotides",c.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",c.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};var f=n(890);function h(t,e=!0){if(null==t)return"rgb(100,100,100)";const n=r.Color.fromHtml(t);if(e){const t=r.Color.g(n),e=r.Color.r(n),o=r.Color.b(n),i=Math.sqrt(Math.pow(0-e,2)+Math.pow(0-t,2)+Math.pow(0-o,2));if(i>210)return`rgb(${e/i*210},${t/i*210},${o/i*210})`}return r.Color.toRgb(n)}class p{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class d{}class g extends d{static get palette(){return console.log("UnknownColorPalette.palette"),null===g._pallete&&(g._pallete=g.buildPalette()),g._pallete}static buildPalette(){return(0,f.pj)().then((t=>{t.awaitLoaded(1/0).then((()=>{const e=t.getMonomerLib();e.onChanged.subscribe((()=>{g.customMonomerColors={},g.polymerTypes=e.getPolymerTypes();for(const t of this.polymerTypes){const n=e.getMonomerSymbolsByType(t);for(const r of n){const n=e.getMonomer(t,r);n?.meta?.colors?.default?.background&&(this.customMonomerColors[r]||(this.customMonomerColors[r]={}),this.customMonomerColors[r][t]=h(n.meta.colors.default.background))}}}))}))})),[].concat(...Object.values(a.colourPalette))}get(t,e){const n=g.customMonomerColors[t],r=e??"PEPTIDE";if(n&&n[r])return n[r];const o=p.hashCode(t)%g.palette.length;return h(g.palette[o])}}g._pallete=null,g.customMonomerColors={},g.polymerTypes=[];class m{get length(){return this.mList.length}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");const e=this.mList[t];return e!==this.gapOriginalMonomer?e:s._S}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}function y(t,e=void 0){return n=>{if(n){let r;const o=new RegExp(`(?<=^|\\${t})("-"|'-'|[^\\${t}]*)(?=\\${t}|$)`,"g");return void 0!==e?(o.lastIndex=0,r=i()(n.matchAll(o)).take(e).map((t=>t[0])).toArray()):r=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e),new m(r,s.b9[s.Hi.SEPARATOR])}return new m([],s.b9[s.Hi.SEPARATOR])}}const v=/([^\W_]+)/g;function b(t,e){if(t.length<=e)return t;const n=t.match(v),r=t.length>e||(n?.length??0)>1,o=n?.[0]??" ";return r?o.substring(0,e-1)+"…":o}},312:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o});var r=n(82);async function o(){const t=r.Func.find({package:"Bio",name:"getSeqHelper"});if(0===t.length)throw new Error("Package 'Bio' must be installed for SeqHelper.");return(await t[0].prepare().call()).getOutputParamValue()}},869:(t,e,n)=>{"use strict";var r;n.d(e,{o:()=>r}),function(t){t.BASE="HELM_BASE",t.SUGAR="HELM_SUGAR",t.LINKER="HELM_LINKER",t.AA="HELM_AA",t.CHEM="HELM_CHEM",t.BLOB="HELM_BLOB",t.NUCLEOTIDE="HELM_NUCLETIDE"}(r||(r={}))},70:(t,e,n)=>{"use strict";n.d(e,{Pl:()=>M,gM:()=>L,L1:()=>S,E3:()=>x,J6:()=>P,Xk:()=>I,Xb:()=>O,N$:()=>$,t6:()=>_,PE:()=>E,CN:()=>p});var r=n(328),o=n(82);n(982);const i=o.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,,,,,,,,,,,,,,,,,,,,,');i.columns.add(o.Column.fromList(o.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var s=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};const a=3e4,u=108e5,l=console.log.bind(console),c=console.info.bind(console),f=console.warn.bind(console),h=console.error.bind(console),p={},d="Auto Tests",g="Demo",m="Detectors",y="Core",v={};let b;var C;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(C||(C={}));class w{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class A{constructor(t,e,n,r){var o;this.category=t,this.name=e,null!=r||(r={}),null!==(o=r.timeout)&&void 0!==o||(r.timeout=a),this.options=r,this.test=()=>s(this,void 0,void 0,(function*(){return new Promise(((t,e)=>s(this,void 0,void 0,(function*(){let r="";try{r=yield n()}catch(t){e(t)}t(r)}))))}))}}function E(t,e,n,r=0,o="timeout"){return s(this,void 0,void 0,(function*(){return new Promise(((i,s)=>{const a=t.subscribe((t=>{try{e(t),i("OK")}catch(t){s(t)}finally{a.unsubscribe(),clearTimeout(u)}})),u=setTimeout((()=>{a.unsubscribe(),s(o)}),r);n()}))}))}function _(t,e,n){null==p[b]&&(p[b]={}),null==p[b].tests&&(p[b].tests=[]),p[b].tests.push(new A(b,t,e,n))}function x(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function T(t,e,n=.001,r){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const o=Math.abs(t-e)<n;if(x(o,!0,`${null!=r?r:""} (tolerance = ${n})`),!o)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function I(t,e){for(const[n,r]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&r instanceof Array)P(e,r);else if(e instanceof Object&&r instanceof Object)I(e,r);else if(Number.isFinite(e)&&Number.isFinite(r))T(e,r);else if(e!=r)throw new Error(`Expected (${r}) for key '${n}', got (${e})`)}}function P(t,e){const n=t.length,r=e.length;if(n!=r)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${r}`);for(let r=0;r<n;r++)if(t[r]instanceof Array&&e[r]instanceof Array)P(t[r],e[r]);else if(t[r]instanceof Object&&e[r]instanceof Object)I(t[r],e[r]);else if(t[r]!=e[r])throw new Error(`Expected ${e[r]} at position ${r}, got ${t[r]}`)}function S(t,e,n){var r;b=t,e(),p[b]&&(p[b].clear=null===(r=null==n?void 0:n.clear)||void 0===r||r,p[b].timeout=null==n?void 0:n.timeout,p[b].benchmarks=null==n?void 0:n.benchmarks,p[b].stressTests=null==n?void 0:n.stressTests)}function L(t){null==p[b]&&(p[b]={}),p[b].before=t}function M(t){null==p[b]&&(p[b]={}),p[b].after=t}function N(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function O(t,e){var n,l,c,f,h,b;return s(this,void 0,void 0,(function*(){const C=t.id;if(v[C])return;const w=e?e.tests:p;if(void 0!==w[d]||void 0!==w[g]||Object.keys(w).find((t=>t.startsWith(d)||t.startsWith(y))))return void(v[C]=!0);if("DevTools"===t.name||e&&"DevTools"===e._package.name)for(const t of window.dartTests){const e=t.name.split(/\s*\|\s*!/g);let r=null!==(n=e.pop())&&void 0!==n?n:t.name,o=e.length?y+": "+e.join(": "):y,i=r.split(" | ");r=i[i.length-1],i.unshift(o),i.pop(),o=i.join(": "),void 0===w[o]&&(w[o]={tests:[],clear:!0}),w[o].tests.push(new A(o,r,t.test,{isAggregated:!1,timeout:null!==(c=null===(l=t.options)||void 0===l?void 0:l.timeout)&&void 0!==c?c:a,skipReason:null===(f=t.options)||void 0===f?void 0:f.skipReason}))}const E=[],_=[],T=[],I=yield r.dapi.functions.filter(`package.id = "${C}"`).list(),P=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const e of I){const n=e.options.test,l=e.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let t=0;t<n.length;t++){const i=n[t].matchAll(P),l={};Array.from(i).forEach((t=>{t[0].startsWith("skip")?l.skip=t[1]:t[0].startsWith("wait")?l.wait=parseInt(t[2]):t[0].startsWith("cat")?l.cat=t[3]:t[0].startsWith("timeout")&&(l.timeout=parseInt(t[4]))}));const c=new A(d,1===n.length?e.name:`${e.name} ${t+1}`,(()=>s(this,void 0,void 0,(function*(){const o=yield r.functions.eval(N(n[t],e));if(l.wait&&(yield F(l.wait)),"boolean"==typeof o&&!o)throw`Failed: ${n[t]}, expected true, got ${o}`}))),{skipReason:l.skip,timeout:o.Test.isInBenchmark?null!==(h=l.benchmarkTimeout)&&void 0!==h?h:u:null!==(b=l.timeout)&&void 0!==b?b:a});if(l.cat){const t=d+": "+l.cat;c.category=t,void 0===w[t]&&(w[t]={tests:[],clear:!0}),w[t].tests.push(c)}else E.push(c)}if(l){const t=e.options.demoWait?parseInt(e.options.demoWait):void 0,n=new A(g,e.friendlyName,(()=>s(this,void 0,void 0,(function*(){r.shell.isInDemo=!0,void 0===r.shell.view(o.View.BROWSE)&&(r.shell.v=o.View.createByType(o.View.BROWSE)),yield F(300),r.shell.clearLastError(),yield e.apply(),yield F(t||2e3);const n=yield r.shell.lastError;if(n)throw new Error(n);r.shell.isInDemo=!1}))),{skipReason:e.options.demoSkip});_.push(n)}if(e.hasTag("semTypeDetector")){let n=i;e.options.testData&&(n=yield r.data.files.openTable(`System:AppData/${t.nqName}/${e.options.testData}`));const o=new A(m,e.friendlyName,(()=>s(this,void 0,void 0,(function*(){const r=[];console.log(`System:AppData/${t.nqName}/${e.options.testData}`);for(const t of n.clone().columns){const n=yield e.apply([t]);r.push(n||t.semType)}const o=r.filter((t=>t));x(o.length,1),e.options.testDataColumnName&&x(o[0],e.options.testDataColumnName)}))),{skipReason:e.options.skipTest});T.push(o)}}v[C]=!0,E.length>0&&(w[d]={tests:E,clear:!0}),_.length>0&&(w[g]={tests:_,clear:!0}),T.length>0&&(w[m]={tests:T,clear:!1})}))}function $(t){var e,n,i,d;return s(this,void 0,void 0,(function*(){const g=null===(n=null===(e=r.functions.getCurrentCall())||void 0===e?void 0:e.func)||void 0===n?void 0:n.package;yield O(g);const m=[];console.log("Running tests"),null!=t||(t={}),null!==(i=(d=t).testContext)&&void 0!==i||(d.testContext=new w),r.shell.clearLastError();const y=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),f(...e)},console.error=(...e)=>{t.push(...e),h(...e)},t}();yield function(t,e){var n,i,p,d,b,C,w,A,E,_,x,T,I,P,S,L;return s(this,void 0,void 0,(function*(){try{for(const[s,c]of Object.entries(t)){if((null==e?void 0:e.category)&&!s.toLowerCase().startsWith(null==e?void 0:e.category.toLowerCase())||(null===(n=e.exclude)||void 0===n?void 0:n.some((t=>s.startsWith(t)))))continue;l(`Started ${s} category`);const t=null===(i=c.tests)||void 0===i?void 0:i.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));t||(c.beforeStatus=yield v(c.before,null!==(p=e.category)&&void 0!==p?p:""));let f=null!==(d=c.tests)&&void 0!==d?d:[];e.stressTest&&(f=f.filter((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.stressTest})),f=H(f)),(null!==(C=null===(b=e.tags)||void 0===b?void 0:b.length)&&void 0!==C?C:0)>0&&(f=f.filter((t=>{var n,r;return null===(r=null===(n=t.options)||void 0===n?void 0:n.tags)||void 0===r?void 0:r.some((t=>{var n;return(null!==(n=null==e?void 0:e.tags)&&void 0!==n?n:[]).includes(t)}))})));const h=[];if(c.clear)for(let t=0;t<f.length;t++){f[t].options&&void 0===(null===(w=f[t].options)||void 0===w?void 0:w.benchmark)&&(f[t].options||(f[t].options={}),f[t].options.benchmark=null!==(A=c.benchmarks)&&void 0!==A&&A);let n=yield D(f[t],null==e?void 0:e.test,y,o.Test.isInBenchmark?null!==(_=null===(E=f[t].options)||void 0===E?void 0:E.benchmarkTimeout)&&void 0!==_?_:u:null!==(T=null===(x=f[t].options)||void 0===x?void 0:x.timeout)&&void 0!==T?T:a,g.name,e.verbose);n&&h.push(n),r.shell.closeAll(),o.Balloon.closeAll()}else for(let t=0;t<f.length;t++){let n=yield D(f[t],null==e?void 0:e.test,y,o.Test.isInBenchmark?null!==(P=null===(I=f[t].options)||void 0===I?void 0:I.benchmarkTimeout)&&void 0!==P?P:u:null===(S=f[t].options)||void 0===S?void 0:S.timeout,g.name,e.verbose);n&&h.push(n)}const M=h.filter((t=>"skipped"!=t.result));t||(c.afterStatus=yield v(c.after,null!==(L=e.category)&&void 0!==L?L:"")),c.afterStatus&&M.push({date:(new Date).toISOString(),logs:"",category:s,name:"after",result:c.afterStatus,success:!1,ms:0,skipped:!1}),c.beforeStatus&&M.push({date:(new Date).toISOString(),logs:"",category:s,name:"before",result:c.beforeStatus,success:!1,ms:0,skipped:!1}),m.push(...M)}}finally{console.log=l,console.info=c,console.warn=f,console.error=h}if(e.testContext.catchUnhandled&&!o.Test.isInBenchmark){yield F(1e3);const t=yield r.shell.lastError,e={logs:"",date:(new Date).toISOString(),category:"Unhandled exceptions",name:"Exception",result:null!=t?t:"",success:!t,ms:0,skipped:!1};m.push(e),e.package=g.name,null!=r.shell.reportTest?yield r.shell.reportTest("package",e):yield fetch(`${r.dapi.root}/log/tests/package`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)})}}))}(p,t);for(let t of m)t.result=t.result.toString().replace(/"/g,"'"),null!=t.logs&&(t.logs=t.logs.toString().replace(/"/g,"'"));return m;function v(t,e){return s(this,void 0,void 0,(function*(){var n=void 0;try{void 0!==t&&(yield B((()=>s(this,void 0,void 0,(function*(){yield t()}))),1e5,`before ${e}: timeout error`))}catch(t){n=yield R(t)}return n}))}}))}function R(t){return s(this,void 0,void 0,(function*(){return`${t.toString()}\n${t.stack?yield o.Logger.translateStackTrace(t.stack):""}`}))}function D(t,e,n,i,u,c){var f,p,d,g,m,y;return s(this,void 0,void 0,(function*(){let s;n.length=0;let v="package";const b=null!=e&&t.name.toLowerCase()!==e.toLowerCase();let C=(null===(f=t.options)||void 0===f?void 0:f.skipReason)||b,w=b?"skipped":null===(p=t.options)||void 0===p?void 0:p.skipReason;if(o.Test.isInBenchmark&&!(null===(d=t.options)||void 0===d?void 0:d.benchmark))return void l(`SKIPPED: ${t.category} ${t.name} doesnt available in benchmark mode`);C||l(`Started ${t.category} ${t.name}`);const A=Date.now();try{if(C)s={date:(new Date).toISOString(),success:!0,result:w,ms:0,skipped:!0};else{let e=null!=i?i:a;s={date:(new Date).toISOString(),success:!0,result:null!==(g=yield B(t.test,e))&&void 0!==g?g:"OK",ms:0,skipped:!1}}}catch(t){h(t),s={date:(new Date).toISOString(),success:!1,result:yield R(t),ms:0,skipped:!1}}if((null===(m=t.options)||void 0===m?void 0:m.isAggregated)&&s.result.constructor===o.DataFrame){const t=s.result.col("success");if(t&&(s.success=t.stats.sum===t.length),!c){const t=s.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),s.result=t}s.result=s.result.toCsv()}if(s.logs=n.join("\n"),s.ms=Date.now()-A,C||l(`Finished ${t.category} ${t.name} for ${s.ms} ms`),s.category=t.category,s.name=t.name,!b){let e={success:s.success,result:s.result,ms:s.ms,skipped:s.skipped,package:u,category:t.category,name:t.name,logs:s.logs};if(s.result.constructor==Object){const t=Object.keys(s.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:s.result[e]})),{});e=Object.assign(Object.assign({},e),t)}e.result instanceof o.DataFrame&&(e.result=JSON.stringify(null===(y=e.result)||void 0===y?void 0:y.toJson())||""),null!=r.shell.reportTest?yield r.shell.reportTest(v,e):yield fetch(`${r.dapi.root}/log/tests/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify(e)})}return s}))}function H(t){const e=t.slice();return e.sort((()=>Math.random()-.5)),e}function F(t){return s(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function B(t,e,n="EXECUTION TIMEOUT"){return s(this,void 0,void 0,(function*(){let r=null;const o=new Promise(((t,o)=>{r=setTimeout((()=>{o(n)}),e)}));try{return yield Promise.race([t(),o])}finally{r&&clearTimeout(r)}}))}o.DataFrame.fromColumns([o.Column.fromStrings("col",["val1","val2","val3"])])},74:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,".st-colored-text-input > textarea {\n width: 100%;\n -webkit-text-fill-color: transparent;\n background-color: transparent;\n position: relative;\n z-index: 1;\n resize: none;\n height: 22px; /* Fine tuned value to avoid \"jumping\" of the textarea upon autoresize */\n}\n\n.st-colored-text-input > div {\n /* The values here are fine tuned to those of the ui.input textarea in order\n * to achieve precise overlap */\n overflow: auto;\n position: absolute;\n pointer-events: none;\n cursor: text;\n z-index: 0;\n max-width: 100%;\n padding: 2px;\n line-height: normal;\n font-family: 'Roboto', 'Roboto Local', sans-serif;\n font-size: 13px;\n padding-top: 6px !important;\n color: transparent;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n","",{version:3,sources:["webpack://./src/apps/common/view/components/colored-input/style.css"],names:[],mappings:"AAAA;EACE,WAAW;EACX,oCAAoC;EACpC,6BAA6B;EAC7B,kBAAkB;EAClB,UAAU;EACV,YAAY;EACZ,YAAY,EAAE,wEAAwE;AACxF;;AAEA;EACE;iCAC+B;EAC/B,cAAc;EACd,kBAAkB;EAClB,oBAAoB;EACpB,YAAY;EACZ,UAAU;EACV,eAAe;EACf,YAAY;EACZ,mBAAmB;EACnB,iDAAiD;EACjD,eAAe;EACf,2BAA2B;EAC3B,kBAAkB;EAClB,qBAAqB;EACrB,qBAAqB;AACvB",sourcesContent:[".st-colored-text-input > textarea {\n width: 100%;\n -webkit-text-fill-color: transparent;\n background-color: transparent;\n position: relative;\n z-index: 1;\n resize: none;\n height: 22px; /* Fine tuned value to avoid \"jumping\" of the textarea upon autoresize */\n}\n\n.st-colored-text-input > div {\n /* The values here are fine tuned to those of the ui.input textarea in order\n * to achieve precise overlap */\n overflow: auto;\n position: absolute;\n pointer-events: none;\n cursor: text;\n z-index: 0;\n max-width: 100%;\n padding: 2px;\n line-height: normal;\n font-family: 'Roboto', 'Roboto Local', sans-serif;\n font-size: 13px;\n padding-top: 6px !important;\n color: transparent;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n"],sourceRoot:""}]);const a=s},252:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-pattern-text-input > textarea {\n resize: none;\n}\n","",{version:3,sources:["webpack://./src/apps/pattern/view/style.css"],names:[],mappings:"AAAA,gGAAgG;;AAEhG;EACE,YAAY;AACd",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-pattern-text-input > textarea {\n resize: none;\n}\n"],sourceRoot:""}]);const a=s},507:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-structure-body {\n padding-right: 20px;\n}\n\n.st-structure-mol-img {\n margin-right: 30px;\n float: right;\n}\n\n.st-structure-bool-button-block {\n justify-content: right;\n margin-bottom: 10px;\n}\n\n.st-structure-bottom {\n flex-direction: row-reverse;\n padding-top: 20px;\n}\n\n.st-structure-clear-buttons {\n justify-content: space-between;\n padding: 13px 10px 13px 10px;\n}\n\n.st-direction-inputs {\n align-items: end;\n}\n\n.st-structure-inputs {\n flex-grow: 2;\n padding-left: 10px;\n}","",{version:3,sources:["webpack://./src/apps/structure/view/style.css"],names:[],mappings:"AAAA,gGAAgG;;AAEhG;EACE,mBAAmB;AACrB;;AAEA;EACE,kBAAkB;EAClB,YAAY;AACd;;AAEA;EACE,sBAAsB;EACtB,mBAAmB;AACrB;;AAEA;EACE,2BAA2B;EAC3B,iBAAiB;AACnB;;AAEA;EACE,8BAA8B;EAC9B,4BAA4B;AAC9B;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,YAAY;EACZ,kBAAkB;AACpB",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n\n.st-structure-body {\n padding-right: 20px;\n}\n\n.st-structure-mol-img {\n margin-right: 30px;\n float: right;\n}\n\n.st-structure-bool-button-block {\n justify-content: right;\n margin-bottom: 10px;\n}\n\n.st-structure-bottom {\n flex-direction: row-reverse;\n padding-top: 20px;\n}\n\n.st-structure-clear-buttons {\n justify-content: space-between;\n padding: 13px 10px 13px 10px;\n}\n\n.st-direction-inputs {\n align-items: end;\n}\n\n.st-structure-inputs {\n flex-grow: 2;\n padding-left: 10px;\n}"],sourceRoot:""}]);const a=s},254:(t,e,n)=>{"use strict";n.d(e,{A:()=>a});var r=n(354),o=n.n(r),i=n(314),s=n.n(i)()(o());s.push([t.id,"/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n.st-translator-input-table {\n /* width: 100%; */\n margin-right: 20px;\n}\n\n.st-translator-input-table td:has(textarea) {\n width: 100%;\n}\n\n.st-translator-input-table td:has(select) {\n min-width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table {\n margin-top: 20px;\n margin-right: 20px;\n margin-bottom: 10px;\n}\n\n.st-translator-output-table table {\n width: 100%;\n table-layout: fixed;\n}\n\n.st-translator-output-table td {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.st-translator-output-table tr:nth-child(even) {\n background-color: var(--grey-1);\n}\n\n.st-translator-output-table td:nth-child(odd) {\n width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table td a {\n overflow-wrap: break-word;\n}\n","",{version:3,sources:["webpack://./src/apps/translator/view/style.css"],names:[],mappings:"AAAA,gGAAgG;AAChG;EACE,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;AACrB;;AAEA;EACE,WAAW;EACX,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;EAChB,mBAAmB;AACrB;AACA;EACE,+BAA+B;AACjC;;AAEA;EACE,YAAY;EACZ,mBAAmB;AACrB;;AAEA;EACE,yBAAyB;AAC3B",sourcesContent:["/* Naming convention: class names should begin with st and app name to avoid naming collitions */\n.st-translator-input-table {\n /* width: 100%; */\n margin-right: 20px;\n}\n\n.st-translator-input-table td:has(textarea) {\n width: 100%;\n}\n\n.st-translator-input-table td:has(select) {\n min-width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table {\n margin-top: 20px;\n margin-right: 20px;\n margin-bottom: 10px;\n}\n\n.st-translator-output-table table {\n width: 100%;\n table-layout: fixed;\n}\n\n.st-translator-output-table td {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.st-translator-output-table tr:nth-child(even) {\n background-color: var(--grey-1);\n}\n\n.st-translator-output-table td:nth-child(odd) {\n width: 120px;\n vertical-align: top;\n}\n\n.st-translator-output-table td a {\n overflow-wrap: break-word;\n}\n"],sourceRoot:""}]);const a=s},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(s[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);r&&s[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},354:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),i="/*# ".concat(o," */");return[e].concat([i]).join("\n")}return[e].join("\n")}},982:function(t,e,n){var r;!function(){var e={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,r,o,i){for(var s,a,u,l,c,f,h,p,d,g,m,y,v;i>=64;){for(s=n[0],a=n[1],u=n[2],l=n[3],c=n[4],f=n[5],h=n[6],p=n[7],g=0;g<16;g++)m=o+4*g,t[g]=(255&r[m])<<24|(255&r[m+1])<<16|(255&r[m+2])<<8|255&r[m+3];for(g=16;g<64;g++)y=((d=t[g-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,v=((d=t[g-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[g]=(y+t[g-7]|0)+(v+t[g-16]|0);for(g=0;g<64;g++)y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&f^~c&h)|0)+(p+(e[g]+t[g]|0)|0)|0,v=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&a^s&u^a&u)|0,p=h,h=f,f=c,c=l+y|0,l=u,u=a,a=s,s=y+v|0;n[0]+=s,n[1]+=a,n[2]+=u,n[3]+=l,n[4]+=c,n[5]+=f,n[6]+=h,n[7]+=p,o+=64,i-=64}return o}var r=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var r=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[r++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(r=n(this.temp,this.state,t,r,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[r++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,r=this.bufferLength,o=e/536870912|0,i=e<<3,s=e%64<56?64:128;this.buffer[r]=128;for(var a=r+1;a<s-8;a++)this.buffer[a]=0;this.buffer[s-8]=o>>>24&255,this.buffer[s-7]=o>>>16&255,this.buffer[s-6]=o>>>8&255,this.buffer[s-5]=o>>>0&255,this.buffer[s-4]=i>>>24&255,this.buffer[s-3]=i>>>16&255,this.buffer[s-2]=i>>>8&255,this.buffer[s-1]=i>>>0&255,n(this.temp,this.state,this.buffer,0,s),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=r;var o=function(){function t(t){this.inner=new r,this.outer=new r,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new r).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function i(t){var e=(new r).update(t),n=e.digest();return e.clean(),n}function s(t,e){var n=new o(t).update(e),r=n.digest();return n.clean(),r}function a(t,e,n,r){var o=r[0];if(0===o)throw new Error("hkdf: cannot expand more");e.reset(),o>1&&e.update(t),n&&e.update(n),e.update(r),e.finish(t),r[0]++}t.HMAC=o,t.hash=i,t.default=i,t.hmac=s;var u=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,r){void 0===e&&(e=u),void 0===r&&(r=32);for(var i=new Uint8Array([1]),l=s(e,t),c=new o(l),f=new Uint8Array(c.digestLength),h=f.length,p=new Uint8Array(r),d=0;d<r;d++)h===f.length&&(a(f,c,n,i),h=0),p[d]=f[h++];return c.clean(),f.fill(0),i.fill(0),p},t.pbkdf2=function(t,e,n,r){for(var i=new o(t),s=i.digestLength,a=new Uint8Array(4),u=new Uint8Array(s),l=new Uint8Array(s),c=new Uint8Array(r),f=0;f*s<r;f++){var h=f+1;a[0]=h>>>24&255,a[1]=h>>>16&255,a[2]=h>>>8&255,a[3]=h>>>0&255,i.reset(),i.update(e),i.update(a),i.finish(l);for(var p=0;p<s;p++)u[p]=l[p];for(p=2;p<=n;p++){i.reset(),i.update(l).finish(l);for(var d=0;d<s;d++)u[d]^=l[d]}for(p=0;p<s&&f*s+p<r;p++)c[f*s+p]=u[p]}for(f=0;f<s;f++)u[f]=l[f]=0;for(f=0;f<4;f++)a[f]=0;return i.clean(),c}}(e);var o=e.default;for(var i in e)o[i]=e[i];"object"==typeof t.exports?t.exports=o:void 0===(r=function(){return o}.call(e,n,e,t))||(t.exports=r)}()},543:function(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,l=128,c=1/0,f=9007199254740991,h=NaN,p=4294967295,d=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",m="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",C="[object Function]",w="[object GeneratorFunction]",A="[object Map]",E="[object Number]",_="[object Object]",x="[object Promise]",T="[object RegExp]",I="[object Set]",P="[object String]",S="[object Symbol]",L="[object WeakMap]",M="[object ArrayBuffer]",N="[object DataView]",O="[object Float32Array]",$="[object Float64Array]",R="[object Int8Array]",D="[object Int16Array]",H="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",k="[object Uint16Array]",G="[object Uint32Array]",j=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,W=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Y=RegExp(W.source),K=RegExp(q.source),z=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,Ct=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Et="\\u2700-\\u27bf",_t="a-z\\xdf-\\xf6\\xf8-\\xff",xt="A-Z\\xc0-\\xd6\\xd8-\\xde",Tt="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="["+wt+"]",St="["+It+"]",Lt="["+At+"]",Mt="\\d+",Nt="["+Et+"]",Ot="["+_t+"]",$t="[^"+wt+It+Mt+Et+_t+xt+"]",Rt="\\ud83c[\\udffb-\\udfff]",Dt="[^"+wt+"]",Ht="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",Bt="["+xt+"]",kt="\\u200d",Gt="(?:"+Ot+"|"+$t+")",jt="(?:"+Bt+"|"+$t+")",Ut="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Wt="(?:"+Lt+"|"+Rt+")?",qt="["+Tt+"]?",Yt=qt+Wt+"(?:"+kt+"(?:"+[Dt,Ht,Ft].join("|")+")"+qt+Wt+")*",Kt="(?:"+[Nt,Ht,Ft].join("|")+")"+Yt,zt="(?:"+[Dt+Lt+"?",Lt,Ht,Ft,Pt].join("|")+")",Jt=RegExp("['’]","g"),Qt=RegExp(Lt,"g"),Xt=RegExp(Rt+"(?="+Rt+")|"+zt+Yt,"g"),Zt=RegExp([Bt+"?"+Ot+"+"+Ut+"(?="+[St,Bt,"$"].join("|")+")",jt+"+"+Vt+"(?="+[St,Bt+Gt,"$"].join("|")+")",Bt+"?"+Gt+"+"+Ut,Bt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mt,Kt].join("|"),"g"),te=RegExp("["+kt+wt+At+Tt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,oe={};oe[O]=oe[$]=oe[R]=oe[D]=oe[H]=oe[F]=oe[B]=oe[k]=oe[G]=!0,oe[g]=oe[m]=oe[M]=oe[y]=oe[N]=oe[v]=oe[b]=oe[C]=oe[A]=oe[E]=oe[_]=oe[T]=oe[I]=oe[P]=oe[L]=!1;var ie={};ie[g]=ie[m]=ie[M]=ie[N]=ie[y]=ie[v]=ie[O]=ie[$]=ie[R]=ie[D]=ie[H]=ie[A]=ie[E]=ie[_]=ie[T]=ie[I]=ie[P]=ie[S]=ie[F]=ie[B]=ie[k]=ie[G]=!0,ie[b]=ie[C]=ie[L]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ce="object"==typeof self&&self&&self.Object===Object&&self,fe=le||ce||Function("return this")(),he=e&&!e.nodeType&&e,pe=he&&t&&!t.nodeType&&t,de=pe&&pe.exports===he,ge=de&&le.process,me=function(){try{return pe&&pe.require&&pe.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=me&&me.isArrayBuffer,ve=me&&me.isDate,be=me&&me.isMap,Ce=me&&me.isRegExp,we=me&&me.isSet,Ae=me&&me.isTypedArray;function Ee(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function _e(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function xe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Te(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Pe(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Se(t,e){return!(null==t||!t.length)&&Be(t,e,0)>-1}function Le(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Me(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Ne(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Oe(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function $e(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Re(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var De=Ue("length");function He(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Fe(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Be(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,Ge,n)}function ke(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Ge(t){return t!=t}function je(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:h}function Ue(t){return function(e){return null==e?o:e[t]}}function Ve(t){return function(e){return null==t?o:t[e]}}function We(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function qe(t,e){for(var n,r=-1,i=t.length;++r<i;){var s=e(t[r]);s!==o&&(n=n===o?s:n+s)}return n}function Ye(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,hn(t)+1).replace(rt,""):t}function ze(t){return function(e){return t(e)}}function Je(t,e){return Me(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function Xe(t,e){for(var n=-1,r=t.length;++n<r&&Be(e,t[n],0)>-1;);return n}function Ze(t,e){for(var n=t.length;n--&&Be(e,t[n],0)>-1;);return n}var tn=Ve({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=Ve({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n];s!==e&&s!==a||(t[n]=a,i[o++]=n)}return i}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function cn(t){return rn(t)?function(t){for(var e=Xt.lastIndex=0;Xt.test(t);)++e;return e}(t):De(t)}function fn(t){return rn(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.split("")}(t)}function hn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var pn=Ve({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),dn=function t(e){var n,r=(e=null==e?fe:dn.defaults(fe.Object(),e,dn.pick(fe,ne))).Array,ot=e.Date,wt=e.Error,At=e.Function,Et=e.Math,_t=e.Object,xt=e.RegExp,Tt=e.String,It=e.TypeError,Pt=r.prototype,St=At.prototype,Lt=_t.prototype,Mt=e["__core-js_shared__"],Nt=St.toString,Ot=Lt.hasOwnProperty,$t=0,Rt=(n=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Dt=Lt.toString,Ht=Nt.call(_t),Ft=fe._,Bt=xt("^"+Nt.call(Ot).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kt=de?e.Buffer:o,Gt=e.Symbol,jt=e.Uint8Array,Ut=kt?kt.allocUnsafe:o,Vt=sn(_t.getPrototypeOf,_t),Wt=_t.create,qt=Lt.propertyIsEnumerable,Yt=Pt.splice,Kt=Gt?Gt.isConcatSpreadable:o,zt=Gt?Gt.iterator:o,Xt=Gt?Gt.toStringTag:o,te=function(){try{var t=li(_t,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,le=ot&&ot.now!==fe.Date.now&&ot.now,ce=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=Et.ceil,pe=Et.floor,ge=_t.getOwnPropertySymbols,me=kt?kt.isBuffer:o,De=e.isFinite,Ve=Pt.join,gn=sn(_t.keys,_t),mn=Et.max,yn=Et.min,vn=ot.now,bn=e.parseInt,Cn=Et.random,wn=Pt.reverse,An=li(e,"DataView"),En=li(e,"Map"),_n=li(e,"Promise"),xn=li(e,"Set"),Tn=li(e,"WeakMap"),In=li(_t,"create"),Pn=Tn&&new Tn,Sn={},Ln=Hi(An),Mn=Hi(En),Nn=Hi(_n),On=Hi(xn),$n=Hi(Tn),Rn=Gt?Gt.prototype:o,Dn=Rn?Rn.valueOf:o,Hn=Rn?Rn.toString:o;function Fn(t){if(ta(t)&&!Us(t)&&!(t instanceof jn)){if(t instanceof Gn)return t;if(Ot.call(t,"__wrapped__"))return Fi(t)}return new Gn(t)}var Bn=function(){function t(){}return function(e){if(!Zs(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function kn(){}function Gn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wn;++e<n;)this.add(t[e])}function Yn(t){var e=this.__data__=new Vn(t);this.size=e.size}function Kn(t,e){var n=Us(t),r=!n&&js(t),o=!n&&!r&&Ys(t),i=!n&&!r&&!o&&ua(t),s=n||r||o||i,a=s?Ye(t.length,Tt):[],u=a.length;for(var l in t)!e&&!Ot.call(t,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||mi(l,u))||a.push(l);return a}function zn(t){var e=t.length;return e?t[Wr(0,e-1)]:o}function Jn(t,e){return Ni(Io(t),ir(e,0,t.length))}function Qn(t){return Ni(Io(t))}function Xn(t,e,n){(n!==o&&!Bs(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Zn(t,e,n){var r=t[e];Ot.call(t,e)&&Bs(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Bs(t[n][0],e))return n;return-1}function er(t,e,n,r){return cr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function nr(t,e){return t&&Po(e,La(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,s=r(i),a=null==t;++n<i;)s[n]=a?o:xa(t,e[n]);return s}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function sr(t,e,n,r,i,s){var a,u=1&e,l=2&e,c=4&e;if(n&&(a=i?n(t,r,i,s):n(t)),a!==o)return a;if(!Zs(t))return t;var f=Us(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ot.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Io(t,a)}else{var h=hi(t),p=h==C||h==w;if(Ys(t))return wo(t,u);if(h==_||h==g||p&&!i){if(a=l||p?{}:di(t),!u)return l?function(t,e){return Po(t,fi(t),e)}(t,function(t,e){return t&&Po(e,Ma(e),t)}(a,t)):function(t,e){return Po(t,ci(t),e)}(t,nr(a,t))}else{if(!ie[h])return i?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case M:return Ao(t);case y:case v:return new o(+t);case N:return function(t,e){var n=e?Ao(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case $:case R:case D:case H:case F:case B:case k:case G:return Eo(t,n);case A:return new o;case E:case P:return new o(t);case T:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new o;case S:return r=t,Dn?_t(Dn.call(r)):{}}}(t,h,u)}}s||(s=new Yn);var d=s.get(t);if(d)return d;s.set(t,a),ia(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,o){a.set(o,sr(r,e,n,o,t,s))}));var m=f?o:(c?l?ni:ei:l?Ma:La)(t);return xe(m||t,(function(r,o){m&&(r=t[o=r]),Zn(a,o,sr(r,e,n,o,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=_t(t);r--;){var i=n[r],s=e[i],a=t[i];if(a===o&&!(i in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new It(i);return Pi((function(){t.apply(o,n)}),e)}function lr(t,e,n,r){var o=-1,i=Se,s=!0,a=t.length,u=[],l=e.length;if(!a)return u;n&&(e=Me(e,ze(n))),r?(i=Le,s=!1):e.length>=200&&(i=Qe,s=!1,e=new qn(e));t:for(;++o<a;){var c=t[o],f=null==n?c:n(c);if(c=r||0!==c?c:0,s&&f==f){for(var h=l;h--;)if(e[h]===f)continue t;u.push(c)}else i(e,f,r)||u.push(c)}return u}Fn.templateSettings={escape:z,evaluate:J,interpolate:Q,variable:"",imports:{_:Fn}},Fn.prototype=kn.prototype,Fn.prototype.constructor=Fn,Gn.prototype=Bn(kn.prototype),Gn.prototype.constructor=Gn,jn.prototype=Bn(kn.prototype),jn.prototype.constructor=jn,Un.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(t){var e=this.__data__;if(In){var n=e[t];return n===s?o:n}return Ot.call(e,t)?e[t]:o},Un.prototype.has=function(t){var e=this.__data__;return In?e[t]!==o:Ot.call(e,t)},Un.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=In&&e===o?s:e,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Vn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Vn.prototype.has=function(t){return tr(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Wn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(En||Vn),string:new Un}},Wn.prototype.delete=function(t){var e=ai(this,t).delete(t);return this.size-=e?1:0,e},Wn.prototype.get=function(t){return ai(this,t).get(t)},Wn.prototype.has=function(t){return ai(this,t).has(t)},Wn.prototype.set=function(t,e){var n=ai(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(t){return this.__data__.set(t,s),this},qn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Wn(r)}return n.set(t,e),this.size=n.size,this};var cr=Mo(vr),fr=Mo(br,!0);function hr(t,e){var n=!0;return cr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function pr(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],a=e(s);if(null!=a&&(u===o?a==a&&!aa(a):n(a,u)))var u=a,l=s}return l}function dr(t,e){var n=[];return cr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function gr(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=gi),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?gr(a,e-1,n,r,o):Ne(o,a):r||(o[o.length]=a)}return o}var mr=No(),yr=No(!0);function vr(t,e){return t&&mr(t,e,La)}function br(t,e){return t&&yr(t,e,La)}function Cr(t,e){return Pe(e,(function(e){return Js(t[e])}))}function wr(t,e){for(var n=0,r=(e=yo(e,t)).length;null!=t&&n<r;)t=t[Di(e[n++])];return n&&n==r?t:o}function Ar(t,e,n){var r=e(t);return Us(t)?r:Ne(r,n(t))}function Er(t){return null==t?t===o?"[object Undefined]":"[object Null]":Xt&&Xt in _t(t)?function(t){var e=Ot.call(t,Xt),n=t[Xt];try{t[Xt]=o;var r=!0}catch(t){}var i=Dt.call(t);return r&&(e?t[Xt]=n:delete t[Xt]),i}(t):function(t){return Dt.call(t)}(t)}function _r(t,e){return t>e}function xr(t,e){return null!=t&&Ot.call(t,e)}function Tr(t,e){return null!=t&&e in _t(t)}function Ir(t,e,n){for(var i=n?Le:Se,s=t[0].length,a=t.length,u=a,l=r(a),c=1/0,f=[];u--;){var h=t[u];u&&e&&(h=Me(h,ze(e))),c=yn(h.length,c),l[u]=!n&&(e||s>=120&&h.length>=120)?new qn(u&&h):o}h=t[0];var p=-1,d=l[0];t:for(;++p<s&&f.length<c;){var g=h[p],m=e?e(g):g;if(g=n||0!==g?g:0,!(d?Qe(d,m):i(f,m,n))){for(u=a;--u;){var y=l[u];if(!(y?Qe(y,m):i(t[u],m,n)))continue t}d&&d.push(m),f.push(g)}}return f}function Pr(t,e,n){var r=null==(t=xi(t,e=yo(e,t)))?t:t[Di(zi(e))];return null==r?o:Ee(r,t,n)}function Sr(t){return ta(t)&&Er(t)==g}function Lr(t,e,n,r,i){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,i,s){var a=Us(t),u=Us(e),l=a?m:hi(t),c=u?m:hi(e),f=(l=l==g?_:l)==_,h=(c=c==g?_:c)==_,p=l==c;if(p&&Ys(t)){if(!Ys(e))return!1;a=!0,f=!1}if(p&&!f)return s||(s=new Yn),a||ua(t)?Zo(t,e,n,r,i,s):function(t,e,n,r,o,i,s){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!i(new jt(t),new jt(e)));case y:case v:case E:return Bs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case T:case P:return t==e+"";case A:var a=on;case I:var u=1&r;if(a||(a=un),t.size!=e.size&&!u)return!1;var l=s.get(t);if(l)return l==e;r|=2,s.set(t,e);var c=Zo(a(t),a(e),r,o,i,s);return s.delete(t),c;case S:if(Dn)return Dn.call(t)==Dn.call(e)}return!1}(t,e,l,n,r,i,s);if(!(1&n)){var d=f&&Ot.call(t,"__wrapped__"),C=h&&Ot.call(e,"__wrapped__");if(d||C){var w=d?t.value():t,x=C?e.value():e;return s||(s=new Yn),i(w,x,n,r,s)}}return!!p&&(s||(s=new Yn),function(t,e,n,r,i,s){var a=1&n,u=ei(t),l=u.length;if(l!=ei(e).length&&!a)return!1;for(var c=l;c--;){var f=u[c];if(!(a?f in e:Ot.call(e,f)))return!1}var h=s.get(t),p=s.get(e);if(h&&p)return h==e&&p==t;var d=!0;s.set(t,e),s.set(e,t);for(var g=a;++c<l;){var m=t[f=u[c]],y=e[f];if(r)var v=a?r(y,m,f,e,t,s):r(m,y,f,t,e,s);if(!(v===o?m===y||i(m,y,n,r,s):v)){d=!1;break}g||(g="constructor"==f)}if(d&&!g){var b=t.constructor,C=e.constructor;b==C||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof C&&C instanceof C||(d=!1)}return s.delete(t),s.delete(e),d}(t,e,n,r,i,s))}(t,e,n,r,Lr,i))}function Mr(t,e,n,r){var i=n.length,s=i,a=!r;if(null==t)return!s;for(t=_t(t);i--;){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<s;){var l=(u=n[i])[0],c=t[l],f=u[1];if(a&&u[2]){if(c===o&&!(l in t))return!1}else{var h=new Yn;if(r)var p=r(c,f,l,t,e,h);if(!(p===o?Lr(f,c,3,r,h):p))return!1}}return!0}function Nr(t){return!(!Zs(t)||(e=t,Rt&&Rt in e))&&(Js(t)?Bt:gt).test(Hi(t));var e}function Or(t){return"function"==typeof t?t:null==t?nu:"object"==typeof t?Us(t)?Fr(t[0],t[1]):Hr(t):fu(t)}function $r(t){if(!wi(t))return gn(t);var e=[];for(var n in _t(t))Ot.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Rr(t,e){return t<e}function Dr(t,e){var n=-1,o=Ws(t)?r(t.length):[];return cr(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}function Hr(t){var e=ui(t);return 1==e.length&&e[0][2]?Ei(e[0][0],e[0][1]):function(n){return n===t||Mr(n,t,e)}}function Fr(t,e){return vi(t)&&Ai(e)?Ei(Di(t),e):function(n){var r=xa(n,t);return r===o&&r===e?Ta(n,t):Lr(e,r,3)}}function Br(t,e,n,r,i){t!==e&&mr(e,(function(s,a){if(i||(i=new Yn),Zs(s))!function(t,e,n,r,i,s,a){var u=Ti(t,n),l=Ti(e,n),c=a.get(l);if(c)Xn(t,n,c);else{var f=s?s(u,l,n+"",t,e,a):o,h=f===o;if(h){var p=Us(l),d=!p&&Ys(l),g=!p&&!d&&ua(l);f=l,p||d||g?Us(u)?f=u:qs(u)?f=Io(u):d?(h=!1,f=wo(l,!0)):g?(h=!1,f=Eo(l,!0)):f=[]:ra(l)||js(l)?(f=u,js(u)?f=ma(u):Zs(u)&&!Js(u)||(f=di(l))):h=!1}h&&(a.set(l,f),i(f,l,r,s,a),a.delete(l)),Xn(t,n,f)}}(t,e,a,n,Br,r,i);else{var u=r?r(Ti(t,a),s,a+"",t,e,i):o;u===o&&(u=s),Xn(t,a,u)}}),Ma)}function kr(t,e){var n=t.length;if(n)return mi(e+=e<0?n:0,n)?t[e]:o}function Gr(t,e,n){e=e.length?Me(e,(function(t){return Us(t)?function(e){return wr(e,1===t.length?t[0]:t)}:t})):[nu];var r=-1;e=Me(e,ze(si()));var o=Dr(t,(function(t,n,o){var i=Me(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t){var e=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var u=_o(o[r],i[r]);if(u)return r>=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));e--;)t[e]=t[e].value;return t}(o)}function jr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=wr(t,s);n(a,s)&&Jr(i,yo(s,t),a)}return i}function Ur(t,e,n,r){var o=r?ke:Be,i=-1,s=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Me(t,ze(n)));++i<s;)for(var u=0,l=e[i],c=n?n(l):l;(u=o(a,c,u,r))>-1;)a!==t&&Yt.call(a,u,1),Yt.call(t,u,1);return t}function Vr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;mi(o)?Yt.call(t,o,1):uo(t,o)}}return t}function Wr(t,e){return t+pe(Cn()*(e-t+1))}function qr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=pe(e/2))&&(t+=t)}while(e);return n}function Yr(t,e){return Si(_i(t,e,nu),t+"")}function Kr(t){return zn(Ba(t))}function zr(t,e){var n=Ba(t);return Ni(n,ir(e,0,n.length))}function Jr(t,e,n,r){if(!Zs(t))return t;for(var i=-1,s=(e=yo(e,t)).length,a=s-1,u=t;null!=u&&++i<s;){var l=Di(e[i]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=a){var f=u[l];(c=r?r(f,l,u):o)===o&&(c=Zs(f)?f:mi(e[i+1])?[]:{})}Zn(u,l,c),u=u[l]}return t}var Qr=Pn?function(t,e){return Pn.set(t,e),t}:nu,Xr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:nu;function Zr(t){return Ni(Ba(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=r(i);++o<i;)s[o]=t[o+e];return s}function eo(t,e){var n;return cr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!aa(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return ro(t,e,nu,n)}function ro(t,e,n,r){var i=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=n(e))!=e,u=null===e,l=aa(e),c=e===o;i<s;){var f=pe((i+s)/2),h=n(t[f]),p=h!==o,d=null===h,g=h==h,m=aa(h);if(a)var y=r||g;else y=c?g&&(r||p):u?g&&p&&(r||!d):l?g&&p&&!d&&(r||!m):!d&&!m&&(r?h<=e:h<e);y?i=f+1:s=f}return yn(s,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Bs(a,u)){var u=a;i[o++]=0===s?0:s}}return i}function io(t){return"number"==typeof t?t:aa(t)?h:+t}function so(t){if("string"==typeof t)return t;if(Us(t))return Me(t,so)+"";if(aa(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ao(t,e,n){var r=-1,o=Se,i=t.length,s=!0,a=[],u=a;if(n)s=!1,o=Le;else if(i>=200){var l=e?null:Yo(t);if(l)return un(l);s=!1,o=Qe,u=new qn}else u=e?[]:a;t:for(;++r<i;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,s&&f==f){for(var h=u.length;h--;)if(u[h]===f)continue t;e&&u.push(f),a.push(c)}else o(u,f,n)||(u!==a&&u.push(f),a.push(c))}return a}function uo(t,e){return null==(t=xi(t,e=yo(e,t)))||delete t[Di(zi(e))]}function lo(t,e,n,r){return Jr(t,e,n(wr(t,e)),r)}function co(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function fo(t,e){var n=t;return n instanceof jn&&(n=n.value()),Oe(e,(function(t,e){return e.func.apply(e.thisArg,Ne([t],e.args))}),n)}function ho(t,e,n){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,s=r(o);++i<o;)for(var a=t[i],u=-1;++u<o;)u!=i&&(s[i]=lr(s[i]||a,t[u],e,n));return ao(gr(s,1),e,n)}function po(t,e,n){for(var r=-1,i=t.length,s=e.length,a={};++r<i;){var u=r<s?e[r]:o;n(a,t[r],u)}return a}function go(t){return qs(t)?t:[]}function mo(t){return"function"==typeof t?t:nu}function yo(t,e){return Us(t)?t:vi(t,e)?[t]:Ri(ya(t))}var vo=Yr;function bo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var Co=se||function(t){return fe.clearTimeout(t)};function wo(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Ao(t){var e=new t.constructor(t.byteLength);return new jt(e).set(new jt(t)),e}function Eo(t,e){var n=e?Ao(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function _o(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,s=aa(t),a=e!==o,u=null===e,l=e==e,c=aa(e);if(!u&&!c&&!s&&t>e||s&&a&&l&&!u&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!s&&!c&&t<e||c&&n&&i&&!r&&!s||u&&n&&i||!a&&i||!l)return-1}return 0}function xo(t,e,n,o){for(var i=-1,s=t.length,a=n.length,u=-1,l=e.length,c=mn(s-a,0),f=r(l+c),h=!o;++u<l;)f[u]=e[u];for(;++i<a;)(h||i<s)&&(f[n[i]]=t[i]);for(;c--;)f[u++]=t[i++];return f}function To(t,e,n,o){for(var i=-1,s=t.length,a=-1,u=n.length,l=-1,c=e.length,f=mn(s-u,0),h=r(f+c),p=!o;++i<f;)h[i]=t[i];for(var d=i;++l<c;)h[d+l]=e[l];for(;++a<u;)(p||i<s)&&(h[d+n[a]]=t[i++]);return h}function Io(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Po(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var u=e[s],l=r?r(n[u],t[u],u,n,t):o;l===o&&(l=t[u]),i?rr(n,u,l):Zn(n,u,l)}return n}function So(t,e){return function(n,r){var o=Us(n)?_e:er,i=e?e():{};return o(n,t,si(r,2),i)}}function Lo(t){return Yr((function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:o,a=i>2?n[2]:o;for(s=t.length>3&&"function"==typeof s?(i--,s):o,a&&yi(n[0],n[1],a)&&(s=i<3?o:s,i=1),e=_t(e);++r<i;){var u=n[r];u&&t(e,u,r,s)}return e}))}function Mo(t,e){return function(n,r){if(null==n)return n;if(!Ws(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=_t(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function No(t){return function(e,n,r){for(var o=-1,i=_t(e),s=r(e),a=s.length;a--;){var u=s[t?a:++o];if(!1===n(i[u],u,i))break}return e}}function Oo(t){return function(e){var n=rn(e=ya(e))?fn(e):o,r=n?n[0]:e.charAt(0),i=n?bo(n,1).join(""):e.slice(1);return r[t]()+i}}function $o(t){return function(e){return Oe(Ja(ja(e).replace(Jt,"")),t,"")}}function Ro(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Bn(t.prototype),r=t.apply(n,e);return Zs(r)?r:n}}function Do(t){return function(e,n,r){var i=_t(e);if(!Ws(e)){var s=si(n,3);e=La(e),n=function(t){return s(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[s?e[a]:a]:o}}function Ho(t){return ti((function(e){var n=e.length,r=n,s=Gn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(i);if(s&&!u&&"wrapper"==oi(a))var u=new Gn([],!0)}for(r=u?r:n;++r<n;){var l=oi(a=e[r]),c="wrapper"==l?ri(a):o;u=c&&bi(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[oi(c[0])].apply(u,c[3]):1==a.length&&bi(a)?u[l]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Us(r))return u.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function Fo(t,e,n,i,s,a,u,c,f,h){var p=e&l,d=1&e,g=2&e,m=24&e,y=512&e,v=g?o:Ro(t);return function l(){for(var b=arguments.length,C=r(b),w=b;w--;)C[w]=arguments[w];if(m)var A=ii(l),E=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(C,A);if(i&&(C=xo(C,i,s,m)),a&&(C=To(C,a,u,m)),b-=E,m&&b<h){var _=an(C,A);return Wo(t,e,Fo,l.placeholder,n,C,_,c,f,h-b)}var x=d?n:this,T=g?x[t]:t;return b=C.length,c?C=function(t,e){for(var n=t.length,r=yn(e.length,n),i=Io(t);r--;){var s=e[r];t[r]=mi(s,n)?i[s]:o}return t}(C,c):y&&b>1&&C.reverse(),p&&f<b&&(C.length=f),this&&this!==fe&&this instanceof l&&(T=v||Ro(T)),T.apply(x,C)}}function Bo(t,e){return function(n,r){return function(t,e,n,r){return vr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function ko(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=so(n),r=so(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Go(t){return ti((function(e){return e=Me(e,ze(si())),Yr((function(n){var r=this;return t(e,(function(t){return Ee(t,r,n)}))}))}))}function jo(t,e){var n=(e=e===o?" ":so(e)).length;if(n<2)return n?qr(e,t):e;var r=qr(e,he(t/cn(e)));return rn(e)?bo(fn(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,i){return i&&"number"!=typeof i&&yi(e,n,i)&&(n=i=o),e=ha(e),n===o?(n=e,e=0):n=ha(n),function(t,e,n,o){for(var i=-1,s=mn(he((e-t)/(n||1)),0),a=r(s);s--;)a[o?s:++i]=t,t+=n;return a}(e,n,i=i===o?e<n?1:-1:ha(i),t)}}function Vo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ga(e),n=ga(n)),t(e,n)}}function Wo(t,e,n,r,i,s,a,l,c,f){var h=8&e;e|=h?u:64,4&(e&=~(h?64:u))||(e&=-4);var p=[t,e,i,h?s:o,h?a:o,h?o:s,h?o:a,l,c,f],d=n.apply(o,p);return bi(t)&&Ii(d,p),d.placeholder=r,Li(d,t,e)}function qo(t){var e=Et[t];return function(t,n){if(t=ga(t),(n=null==n?0:yn(pa(n),292))&&De(t)){var r=(ya(t)+"e").split("e");return+((r=(ya(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Yo=xn&&1/un(new xn([,-0]))[1]==c?function(t){return new xn(t)}:au;function Ko(t){return function(e){var n=hi(e);return n==A?on(e):n==I?ln(e):function(t,e){return Me(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function zo(t,e,n,s,c,f,h,p){var d=2&e;if(!d&&"function"!=typeof t)throw new It(i);var g=s?s.length:0;if(g||(e&=-97,s=c=o),h=h===o?h:mn(pa(h),0),p=p===o?p:pa(p),g-=c?c.length:0,64&e){var m=s,y=c;s=c=o}var v=d?o:ri(t),b=[t,e,n,s,c,m,y,f,h,p];if(v&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,s=r==l&&8==n||r==l&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!s)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var u=e[3];if(u){var c=t[3];t[3]=c?xo(c,u,e[4]):u,t[4]=c?an(t[3],a):e[4]}(u=e[5])&&(c=t[5],t[5]=c?To(c,u,e[6]):u,t[6]=c?an(t[5],a):e[6]),(u=e[7])&&(t[7]=u),r&l&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(b,v),t=b[0],e=b[1],n=b[2],s=b[3],c=b[4],!(p=b[9]=b[9]===o?d?0:t.length:mn(b[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)C=8==e||16==e?function(t,e,n){var i=Ro(t);return function s(){for(var a=arguments.length,u=r(a),l=a,c=ii(s);l--;)u[l]=arguments[l];var f=a<3&&u[0]!==c&&u[a-1]!==c?[]:an(u,c);return(a-=f.length)<n?Wo(t,e,Fo,s.placeholder,o,u,f,o,o,n-a):Ee(this&&this!==fe&&this instanceof s?i:t,this,u)}}(t,e,p):e!=u&&33!=e||c.length?Fo.apply(o,b):function(t,e,n,o){var i=1&e,s=Ro(t);return function e(){for(var a=-1,u=arguments.length,l=-1,c=o.length,f=r(c+u),h=this&&this!==fe&&this instanceof e?s:t;++l<c;)f[l]=o[l];for(;u--;)f[l++]=arguments[++a];return Ee(h,i?n:this,f)}}(t,e,n,s);else var C=function(t,e,n){var r=1&e,o=Ro(t);return function e(){return(this&&this!==fe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Li((v?Qr:Ii)(C,b),t,e)}function Jo(t,e,n,r){return t===o||Bs(t,Lt[n])&&!Ot.call(r,n)?e:t}function Qo(t,e,n,r,i,s){return Zs(t)&&Zs(e)&&(s.set(e,t),Br(t,e,o,Qo,s),s.delete(e)),t}function Xo(t){return ra(t)?o:t}function Zo(t,e,n,r,i,s){var a=1&n,u=t.length,l=e.length;if(u!=l&&!(a&&l>u))return!1;var c=s.get(t),f=s.get(e);if(c&&f)return c==e&&f==t;var h=-1,p=!0,d=2&n?new qn:o;for(s.set(t,e),s.set(e,t);++h<u;){var g=t[h],m=e[h];if(r)var y=a?r(m,g,h,e,t,s):r(g,m,h,t,e,s);if(y!==o){if(y)continue;p=!1;break}if(d){if(!Re(e,(function(t,e){if(!Qe(d,e)&&(g===t||i(g,t,n,r,s)))return d.push(e)}))){p=!1;break}}else if(g!==m&&!i(g,m,n,r,s)){p=!1;break}}return s.delete(t),s.delete(e),p}function ti(t){return Si(_i(t,o,Vi),t+"")}function ei(t){return Ar(t,La,ci)}function ni(t){return Ar(t,Ma,fi)}var ri=Pn?function(t){return Pn.get(t)}:au;function oi(t){for(var e=t.name+"",n=Sn[e],r=Ot.call(Sn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Ot.call(Fn,"placeholder")?Fn:t).placeholder}function si(){var t=Fn.iteratee||ru;return t=t===ru?Or:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function ui(t){for(var e=La(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Ai(o)]}return e}function li(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Nr(n)?n:o}var ci=ge?function(t){return null==t?[]:(t=_t(t),Pe(ge(t),(function(e){return qt.call(t,e)})))}:du,fi=ge?function(t){for(var e=[];t;)Ne(e,ci(t)),t=Vt(t);return e}:du,hi=Er;function pi(t,e,n){for(var r=-1,o=(e=yo(e,t)).length,i=!1;++r<o;){var s=Di(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Xs(o)&&mi(s,o)&&(Us(t)||js(t))}function di(t){return"function"!=typeof t.constructor||wi(t)?{}:Bn(Vt(t))}function gi(t){return Us(t)||js(t)||!!(Kt&&t&&t[Kt])}function mi(t,e){var n=typeof t;return!!(e=null==e?f:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yi(t,e,n){if(!Zs(n))return!1;var r=typeof e;return!!("number"==r?Ws(n)&&mi(e,n.length):"string"==r&&e in n)&&Bs(n[e],t)}function vi(t,e){if(Us(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||Z.test(t)||!X.test(t)||null!=e&&t in _t(e)}function bi(t){var e=oi(t),n=Fn[e];if("function"!=typeof n||!(e in jn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(An&&hi(new An(new ArrayBuffer(1)))!=N||En&&hi(new En)!=A||_n&&hi(_n.resolve())!=x||xn&&hi(new xn)!=I||Tn&&hi(new Tn)!=L)&&(hi=function(t){var e=Er(t),n=e==_?t.constructor:o,r=n?Hi(n):"";if(r)switch(r){case Ln:return N;case Mn:return A;case Nn:return x;case On:return I;case $n:return L}return e});var Ci=Mt?Js:gu;function wi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Lt)}function Ai(t){return t==t&&!Zs(t)}function Ei(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in _t(n))}}function _i(t,e,n){return e=mn(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,s=mn(o.length-e,0),a=r(s);++i<s;)a[i]=o[e+i];i=-1;for(var u=r(e+1);++i<e;)u[i]=o[i];return u[e]=n(a),Ee(t,this,u)}}function xi(t,e){return e.length<2?t:wr(t,to(e,0,-1))}function Ti(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Mi(Qr),Pi=ce||function(t,e){return fe.setTimeout(t,e)},Si=Mi(Xr);function Li(t,e,n){var r=e+"";return Si(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return xe(d,(function(n){var r="_."+n[0];e&n[1]&&!Se(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Mi(t){var e=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ni(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var s=Wr(n,i),a=t[s];t[s]=t[n],t[n]=a}return t.length=e,t}var Oi,$i,Ri=(Oi=Os((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ct,"$1"):n||t)})),e}),(function(t){return 500===$i.size&&$i.clear(),t})),$i=Oi.cache,Oi);function Di(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Hi(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fi(t){if(t instanceof jn)return t.clone();var e=new Gn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Bi=Yr((function(t,e){return qs(t)?lr(t,gr(e,1,qs,!0)):[]})),ki=Yr((function(t,e){var n=zi(e);return qs(n)&&(n=o),qs(t)?lr(t,gr(e,1,qs,!0),si(n,2)):[]})),Gi=Yr((function(t,e){var n=zi(e);return qs(n)&&(n=o),qs(t)?lr(t,gr(e,1,qs,!0),o,n):[]}));function ji(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:pa(n);return o<0&&(o=mn(r+o,0)),Fe(t,si(e,3),o)}function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=pa(n),i=n<0?mn(r+i,0):yn(i,r-1)),Fe(t,si(e,3),i,!0)}function Vi(t){return null!=t&&t.length?gr(t,1):[]}function Wi(t){return t&&t.length?t[0]:o}var qi=Yr((function(t){var e=Me(t,go);return e.length&&e[0]===t[0]?Ir(e):[]})),Yi=Yr((function(t){var e=zi(t),n=Me(t,go);return e===zi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Ir(n,si(e,2)):[]})),Ki=Yr((function(t){var e=zi(t),n=Me(t,go);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Ir(n,o,e):[]}));function zi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ji=Yr(Qi);function Qi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Xi=ti((function(t,e){var n=null==t?0:t.length,r=or(t,e);return Vr(t,Me(e,(function(t){return mi(t,n)?+t:t})).sort(_o)),r}));function Zi(t){return null==t?t:wn.call(t)}var ts=Yr((function(t){return ao(gr(t,1,qs,!0))})),es=Yr((function(t){var e=zi(t);return qs(e)&&(e=o),ao(gr(t,1,qs,!0),si(e,2))})),ns=Yr((function(t){var e=zi(t);return e="function"==typeof e?e:o,ao(gr(t,1,qs,!0),o,e)}));function rs(t){if(!t||!t.length)return[];var e=0;return t=Pe(t,(function(t){if(qs(t))return e=mn(t.length,e),!0})),Ye(e,(function(e){return Me(t,Ue(e))}))}function os(t,e){if(!t||!t.length)return[];var n=rs(t);return null==e?n:Me(n,(function(t){return Ee(e,o,t)}))}var is=Yr((function(t,e){return qs(t)?lr(t,e):[]})),ss=Yr((function(t){return ho(Pe(t,qs))})),as=Yr((function(t){var e=zi(t);return qs(e)&&(e=o),ho(Pe(t,qs),si(e,2))})),us=Yr((function(t){var e=zi(t);return e="function"==typeof e?e:o,ho(Pe(t,qs),o,e)})),ls=Yr(rs),cs=Yr((function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,os(t,n)}));function fs(t){var e=Fn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ps=ti((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof jn&&mi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[i],thisArg:o}),new Gn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)})),ds=So((function(t,e,n){Ot.call(t,n)?++t[n]:rr(t,n,1)})),gs=Do(ji),ms=Do(Ui);function ys(t,e){return(Us(t)?xe:cr)(t,si(e,3))}function vs(t,e){return(Us(t)?Te:fr)(t,si(e,3))}var bs=So((function(t,e,n){Ot.call(t,n)?t[n].push(e):rr(t,n,[e])})),Cs=Yr((function(t,e,n){var o=-1,i="function"==typeof e,s=Ws(t)?r(t.length):[];return cr(t,(function(t){s[++o]=i?Ee(e,t,n):Pr(t,e,n)})),s})),ws=So((function(t,e,n){rr(t,n,e)}));function As(t,e){return(Us(t)?Me:Dr)(t,si(e,3))}var Es=So((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),_s=Yr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yi(t,e[0],e[1])?e=[]:n>2&&yi(e[0],e[1],e[2])&&(e=[e[0]]),Gr(t,gr(e,1),[])})),xs=le||function(){return fe.Date.now()};function Ts(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,zo(t,l,o,o,o,o,e)}function Is(t,e){var n;if("function"!=typeof e)throw new It(i);return t=pa(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Ps=Yr((function(t,e,n){var r=1;if(n.length){var o=an(n,ii(Ps));r|=u}return zo(t,r,e,n,o)})),Ss=Yr((function(t,e,n){var r=3;if(n.length){var o=an(n,ii(Ss));r|=u}return zo(e,r,t,n,o)}));function Ls(t,e,n){var r,s,a,u,l,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new It(i);function g(e){var n=r,i=s;return r=s=o,f=e,u=t.apply(i,n)}function m(t){var n=t-c;return c===o||n>=e||n<0||p&&t-f>=a}function y(){var t=xs();if(m(t))return v(t);l=Pi(y,function(t){var n=e-(t-c);return p?yn(n,a-(t-f)):n}(t))}function v(t){return l=o,d&&r?g(t):(r=s=o,u)}function b(){var t=xs(),n=m(t);if(r=arguments,s=this,c=t,n){if(l===o)return function(t){return f=t,l=Pi(y,e),h?g(t):u}(c);if(p)return Co(l),l=Pi(y,e),g(c)}return l===o&&(l=Pi(y,e)),u}return e=ga(e)||0,Zs(n)&&(h=!!n.leading,a=(p="maxWait"in n)?mn(ga(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){l!==o&&Co(l),f=0,r=c=s=l=o},b.flush=function(){return l===o?u:v(xs())},b}var Ms=Yr((function(t,e){return ur(t,1,e)})),Ns=Yr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Os(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Os.Cache||Wn),n}function $s(t){if("function"!=typeof t)throw new It(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Os.Cache=Wn;var Rs=vo((function(t,e){var n=(e=1==e.length&&Us(e[0])?Me(e[0],ze(si())):Me(gr(e,1),ze(si()))).length;return Yr((function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Ee(t,this,r)}))})),Ds=Yr((function(t,e){var n=an(e,ii(Ds));return zo(t,u,o,e,n)})),Hs=Yr((function(t,e){var n=an(e,ii(Hs));return zo(t,64,o,e,n)})),Fs=ti((function(t,e){return zo(t,256,o,o,o,e)}));function Bs(t,e){return t===e||t!=t&&e!=e}var ks=Vo(_r),Gs=Vo((function(t,e){return t>=e})),js=Sr(function(){return arguments}())?Sr:function(t){return ta(t)&&Ot.call(t,"callee")&&!qt.call(t,"callee")},Us=r.isArray,Vs=ye?ze(ye):function(t){return ta(t)&&Er(t)==M};function Ws(t){return null!=t&&Xs(t.length)&&!Js(t)}function qs(t){return ta(t)&&Ws(t)}var Ys=me||gu,Ks=ve?ze(ve):function(t){return ta(t)&&Er(t)==v};function zs(t){if(!ta(t))return!1;var e=Er(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Zs(t))return!1;var e=Er(t);return e==C||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Qs(t){return"number"==typeof t&&t==pa(t)}function Xs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Zs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=be?ze(be):function(t){return ta(t)&&hi(t)==A};function na(t){return"number"==typeof t||ta(t)&&Er(t)==E}function ra(t){if(!ta(t)||Er(t)!=_)return!1;var e=Vt(t);if(null===e)return!0;var n=Ot.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==Ht}var oa=Ce?ze(Ce):function(t){return ta(t)&&Er(t)==T},ia=we?ze(we):function(t){return ta(t)&&hi(t)==I};function sa(t){return"string"==typeof t||!Us(t)&&ta(t)&&Er(t)==P}function aa(t){return"symbol"==typeof t||ta(t)&&Er(t)==S}var ua=Ae?ze(Ae):function(t){return ta(t)&&Xs(t.length)&&!!oe[Er(t)]},la=Vo(Rr),ca=Vo((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(Ws(t))return sa(t)?fn(t):Io(t);if(zt&&t[zt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[zt]());var e=hi(t);return(e==A?on:e==I?un:Ba)(t)}function ha(t){return t?(t=ga(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function pa(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function da(t){return t?ir(pa(t),0,p):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Zs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Zs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=dt.test(t);return n||mt.test(t)?ue(t.slice(2),n?2:8):pt.test(t)?h:+t}function ma(t){return Po(t,Ma(t))}function ya(t){return null==t?"":so(t)}var va=Lo((function(t,e){if(wi(e)||Ws(e))Po(e,La(e),t);else for(var n in e)Ot.call(e,n)&&Zn(t,n,e[n])})),ba=Lo((function(t,e){Po(e,Ma(e),t)})),Ca=Lo((function(t,e,n,r){Po(e,Ma(e),t,r)})),wa=Lo((function(t,e,n,r){Po(e,La(e),t,r)})),Aa=ti(or),Ea=Yr((function(t,e){t=_t(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&yi(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],a=Ma(s),u=-1,l=a.length;++u<l;){var c=a[u],f=t[c];(f===o||Bs(f,Lt[c])&&!Ot.call(t,c))&&(t[c]=s[c])}return t})),_a=Yr((function(t){return t.push(o,Qo),Ee(Oa,o,t)}));function xa(t,e,n){var r=null==t?o:wr(t,e);return r===o?n:r}function Ta(t,e){return null!=t&&pi(t,e,Tr)}var Ia=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),t[e]=n}),Za(nu)),Pa=Bo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Dt.call(e)),Ot.call(t,e)?t[e].push(n):t[e]=[n]}),si),Sa=Yr(Pr);function La(t){return Ws(t)?Kn(t):$r(t)}function Ma(t){return Ws(t)?Kn(t,!0):function(t){if(!Zs(t))return function(t){var e=[];if(null!=t)for(var n in _t(t))e.push(n);return e}(t);var e=wi(t),n=[];for(var r in t)("constructor"!=r||!e&&Ot.call(t,r))&&n.push(r);return n}(t)}var Na=Lo((function(t,e,n){Br(t,e,n)})),Oa=Lo((function(t,e,n,r){Br(t,e,n,r)})),$a=ti((function(t,e){var n={};if(null==t)return n;var r=!1;e=Me(e,(function(e){return e=yo(e,t),r||(r=e.length>1),e})),Po(t,ni(t),n),r&&(n=sr(n,7,Xo));for(var o=e.length;o--;)uo(n,e[o]);return n})),Ra=ti((function(t,e){return null==t?{}:function(t,e){return jr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function Da(t,e){if(null==t)return{};var n=Me(ni(t),(function(t){return[t]}));return e=si(e),jr(t,n,(function(t,n){return e(t,n[0])}))}var Ha=Ko(La),Fa=Ko(Ma);function Ba(t){return null==t?[]:Je(t,La(t))}var ka=$o((function(t,e,n){return e=e.toLowerCase(),t+(n?Ga(e):e)}));function Ga(t){return za(ya(t).toLowerCase())}function ja(t){return(t=ya(t))&&t.replace(vt,tn).replace(Qt,"")}var Ua=$o((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Va=$o((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Wa=Oo("toLowerCase"),qa=$o((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ya=$o((function(t,e,n){return t+(n?" ":"")+za(e)})),Ka=$o((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),za=Oo("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?o:e)===o?function(t){return ee.test(t)}(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Qa=Yr((function(t,e){try{return Ee(t,o,e)}catch(t){return zs(t)?t:new wt(t)}})),Xa=ti((function(t,e){return xe(e,(function(e){e=Di(e),rr(t,e,Ps(t[e],t))})),t}));function Za(t){return function(){return t}}var tu=Ho(),eu=Ho(!0);function nu(t){return t}function ru(t){return Or("function"==typeof t?t:sr(t,1))}var ou=Yr((function(t,e){return function(n){return Pr(n,t,e)}})),iu=Yr((function(t,e){return function(n){return Pr(t,n,e)}}));function su(t,e,n){var r=La(e),o=Cr(e,r);null!=n||Zs(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Cr(e,La(e)));var i=!(Zs(n)&&"chain"in n&&!n.chain),s=Js(t);return xe(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__);return(n.__actions__=Io(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ne([this.value()],arguments))})})),t}function au(){}var uu=Go(Me),lu=Go(Ie),cu=Go(Re);function fu(t){return vi(t)?Ue(Di(t)):function(t){return function(e){return wr(e,t)}}(t)}var hu=Uo(),pu=Uo(!0);function du(){return[]}function gu(){return!1}var mu,yu=ko((function(t,e){return t+e}),0),vu=qo("ceil"),bu=ko((function(t,e){return t/e}),1),Cu=qo("floor"),wu=ko((function(t,e){return t*e}),1),Au=qo("round"),Eu=ko((function(t,e){return t-e}),0);return Fn.after=function(t,e){if("function"!=typeof e)throw new It(i);return t=pa(t),function(){if(--t<1)return e.apply(this,arguments)}},Fn.ary=Ts,Fn.assign=va,Fn.assignIn=ba,Fn.assignInWith=Ca,Fn.assignWith=wa,Fn.at=Aa,Fn.before=Is,Fn.bind=Ps,Fn.bindAll=Xa,Fn.bindKey=Ss,Fn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Us(t)?t:[t]},Fn.chain=fs,Fn.chunk=function(t,e,n){e=(n?yi(t,e,n):e===o)?1:mn(pa(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var s=0,a=0,u=r(he(i/e));s<i;)u[a++]=to(t,s,s+=e);return u},Fn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Fn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Ne(Us(n)?Io(n):[n],gr(e,1))},Fn.cond=function(t){var e=null==t?0:t.length,n=si();return t=e?Me(t,(function(t){if("function"!=typeof t[1])throw new It(i);return[n(t[0]),t[1]]})):[],Yr((function(n){for(var r=-1;++r<e;){var o=t[r];if(Ee(o[0],this,n))return Ee(o[1],this,n)}}))},Fn.conforms=function(t){return function(t){var e=La(t);return function(n){return ar(n,t,e)}}(sr(t,1))},Fn.constant=Za,Fn.countBy=ds,Fn.create=function(t,e){var n=Bn(t);return null==e?n:nr(n,e)},Fn.curry=function t(e,n,r){var i=zo(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Fn.curryRight=function t(e,n,r){var i=zo(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Fn.debounce=Ls,Fn.defaults=Ea,Fn.defaultsDeep=_a,Fn.defer=Ms,Fn.delay=Ns,Fn.difference=Bi,Fn.differenceBy=ki,Fn.differenceWith=Gi,Fn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:pa(e))<0?0:e,r):[]},Fn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:pa(e)))<0?0:e):[]},Fn.dropRightWhile=function(t,e){return t&&t.length?co(t,si(e,3),!0,!0):[]},Fn.dropWhile=function(t,e){return t&&t.length?co(t,si(e,3),!0):[]},Fn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&yi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=pa(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:pa(r))<0&&(r+=i),r=n>r?0:da(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Fn.filter=function(t,e){return(Us(t)?Pe:dr)(t,si(e,3))},Fn.flatMap=function(t,e){return gr(As(t,e),1)},Fn.flatMapDeep=function(t,e){return gr(As(t,e),c)},Fn.flatMapDepth=function(t,e,n){return n=n===o?1:pa(n),gr(As(t,e),n)},Fn.flatten=Vi,Fn.flattenDeep=function(t){return null!=t&&t.length?gr(t,c):[]},Fn.flattenDepth=function(t,e){return null!=t&&t.length?gr(t,e=e===o?1:pa(e)):[]},Fn.flip=function(t){return zo(t,512)},Fn.flow=tu,Fn.flowRight=eu,Fn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Fn.functions=function(t){return null==t?[]:Cr(t,La(t))},Fn.functionsIn=function(t){return null==t?[]:Cr(t,Ma(t))},Fn.groupBy=bs,Fn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Fn.intersection=qi,Fn.intersectionBy=Yi,Fn.intersectionWith=Ki,Fn.invert=Ia,Fn.invertBy=Pa,Fn.invokeMap=Cs,Fn.iteratee=ru,Fn.keyBy=ws,Fn.keys=La,Fn.keysIn=Ma,Fn.map=As,Fn.mapKeys=function(t,e){var n={};return e=si(e,3),vr(t,(function(t,r,o){rr(n,e(t,r,o),t)})),n},Fn.mapValues=function(t,e){var n={};return e=si(e,3),vr(t,(function(t,r,o){rr(n,r,e(t,r,o))})),n},Fn.matches=function(t){return Hr(sr(t,1))},Fn.matchesProperty=function(t,e){return Fr(t,sr(e,1))},Fn.memoize=Os,Fn.merge=Na,Fn.mergeWith=Oa,Fn.method=ou,Fn.methodOf=iu,Fn.mixin=su,Fn.negate=$s,Fn.nthArg=function(t){return t=pa(t),Yr((function(e){return kr(e,t)}))},Fn.omit=$a,Fn.omitBy=function(t,e){return Da(t,$s(si(e)))},Fn.once=function(t){return Is(2,t)},Fn.orderBy=function(t,e,n,r){return null==t?[]:(Us(e)||(e=null==e?[]:[e]),Us(n=r?o:n)||(n=null==n?[]:[n]),Gr(t,e,n))},Fn.over=uu,Fn.overArgs=Rs,Fn.overEvery=lu,Fn.overSome=cu,Fn.partial=Ds,Fn.partialRight=Hs,Fn.partition=Es,Fn.pick=Ra,Fn.pickBy=Da,Fn.property=fu,Fn.propertyOf=function(t){return function(e){return null==t?o:wr(t,e)}},Fn.pull=Ji,Fn.pullAll=Qi,Fn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,si(n,2)):t},Fn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,o,n):t},Fn.pullAt=Xi,Fn.range=hu,Fn.rangeRight=pu,Fn.rearg=Fs,Fn.reject=function(t,e){return(Us(t)?Pe:dr)(t,$s(si(e,3)))},Fn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=si(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Vr(t,o),n},Fn.rest=function(t,e){if("function"!=typeof t)throw new It(i);return Yr(t,e=e===o?e:pa(e))},Fn.reverse=Zi,Fn.sampleSize=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:pa(e),(Us(t)?Jn:zr)(t,e)},Fn.set=function(t,e,n){return null==t?t:Jr(t,e,n)},Fn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Jr(t,e,n,r)},Fn.shuffle=function(t){return(Us(t)?Qn:Zr)(t)},Fn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&yi(t,e,n)?(e=0,n=r):(e=null==e?0:pa(e),n=n===o?r:pa(n)),to(t,e,n)):[]},Fn.sortBy=_s,Fn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Fn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,si(e,2)):[]},Fn.split=function(t,e,n){return n&&"number"!=typeof n&&yi(t,e,n)&&(e=n=o),(n=n===o?p:n>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=so(e))&&rn(t)?bo(fn(t),0,n):t.split(e,n):[]},Fn.spread=function(t,e){if("function"!=typeof t)throw new It(i);return e=null==e?0:mn(pa(e),0),Yr((function(n){var r=n[e],o=bo(n,0,e);return r&&Ne(o,r),Ee(t,this,o)}))},Fn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Fn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:pa(e))<0?0:e):[]},Fn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:pa(e)))<0?0:e,r):[]},Fn.takeRightWhile=function(t,e){return t&&t.length?co(t,si(e,3),!1,!0):[]},Fn.takeWhile=function(t,e){return t&&t.length?co(t,si(e,3)):[]},Fn.tap=function(t,e){return e(t),t},Fn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new It(i);return Zs(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ls(t,e,{leading:r,maxWait:e,trailing:o})},Fn.thru=hs,Fn.toArray=fa,Fn.toPairs=Ha,Fn.toPairsIn=Fa,Fn.toPath=function(t){return Us(t)?Me(t,Di):aa(t)?[t]:Io(Ri(ya(t)))},Fn.toPlainObject=ma,Fn.transform=function(t,e,n){var r=Us(t),o=r||Ys(t)||ua(t);if(e=si(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Zs(t)&&Js(i)?Bn(Vt(t)):{}}return(o?xe:vr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Fn.unary=function(t){return Ts(t,1)},Fn.union=ts,Fn.unionBy=es,Fn.unionWith=ns,Fn.uniq=function(t){return t&&t.length?ao(t):[]},Fn.uniqBy=function(t,e){return t&&t.length?ao(t,si(e,2)):[]},Fn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ao(t,o,e):[]},Fn.unset=function(t,e){return null==t||uo(t,e)},Fn.unzip=rs,Fn.unzipWith=os,Fn.update=function(t,e,n){return null==t?t:lo(t,e,mo(n))},Fn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:lo(t,e,mo(n),r)},Fn.values=Ba,Fn.valuesIn=function(t){return null==t?[]:Je(t,Ma(t))},Fn.without=is,Fn.words=Ja,Fn.wrap=function(t,e){return Ds(mo(e),t)},Fn.xor=ss,Fn.xorBy=as,Fn.xorWith=us,Fn.zip=ls,Fn.zipObject=function(t,e){return po(t||[],e||[],Zn)},Fn.zipObjectDeep=function(t,e){return po(t||[],e||[],Jr)},Fn.zipWith=cs,Fn.entries=Ha,Fn.entriesIn=Fa,Fn.extend=ba,Fn.extendWith=Ca,su(Fn,Fn),Fn.add=yu,Fn.attempt=Qa,Fn.camelCase=ka,Fn.capitalize=Ga,Fn.ceil=vu,Fn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ga(n))==n?n:0),e!==o&&(e=(e=ga(e))==e?e:0),ir(ga(t),e,n)},Fn.clone=function(t){return sr(t,4)},Fn.cloneDeep=function(t){return sr(t,5)},Fn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:o)},Fn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:o)},Fn.conformsTo=function(t,e){return null==e||ar(t,e,La(e))},Fn.deburr=ja,Fn.defaultTo=function(t,e){return null==t||t!=t?e:t},Fn.divide=bu,Fn.endsWith=function(t,e,n){t=ya(t),e=so(e);var r=t.length,i=n=n===o?r:ir(pa(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Fn.eq=Bs,Fn.escape=function(t){return(t=ya(t))&&K.test(t)?t.replace(q,en):t},Fn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Fn.every=function(t,e,n){var r=Us(t)?Ie:hr;return n&&yi(t,e,n)&&(e=o),r(t,si(e,3))},Fn.find=gs,Fn.findIndex=ji,Fn.findKey=function(t,e){return He(t,si(e,3),vr)},Fn.findLast=ms,Fn.findLastIndex=Ui,Fn.findLastKey=function(t,e){return He(t,si(e,3),br)},Fn.floor=Cu,Fn.forEach=ys,Fn.forEachRight=vs,Fn.forIn=function(t,e){return null==t?t:mr(t,si(e,3),Ma)},Fn.forInRight=function(t,e){return null==t?t:yr(t,si(e,3),Ma)},Fn.forOwn=function(t,e){return t&&vr(t,si(e,3))},Fn.forOwnRight=function(t,e){return t&&br(t,si(e,3))},Fn.get=xa,Fn.gt=ks,Fn.gte=Gs,Fn.has=function(t,e){return null!=t&&pi(t,e,xr)},Fn.hasIn=Ta,Fn.head=Wi,Fn.identity=nu,Fn.includes=function(t,e,n,r){t=Ws(t)?t:Ba(t),n=n&&!r?pa(n):0;var o=t.length;return n<0&&(n=mn(o+n,0)),sa(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Be(t,e,n)>-1},Fn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:pa(n);return o<0&&(o=mn(r+o,0)),Be(t,e,o)},Fn.inRange=function(t,e,n){return e=ha(e),n===o?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t<mn(e,n)}(t=ga(t),e,n)},Fn.invoke=Sa,Fn.isArguments=js,Fn.isArray=Us,Fn.isArrayBuffer=Vs,Fn.isArrayLike=Ws,Fn.isArrayLikeObject=qs,Fn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Er(t)==y},Fn.isBuffer=Ys,Fn.isDate=Ks,Fn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Fn.isEmpty=function(t){if(null==t)return!0;if(Ws(t)&&(Us(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||ua(t)||js(t)))return!t.length;var e=hi(t);if(e==A||e==I)return!t.size;if(wi(t))return!$r(t).length;for(var n in t)if(Ot.call(t,n))return!1;return!0},Fn.isEqual=function(t,e){return Lr(t,e)},Fn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?Lr(t,e,o,n):!!r},Fn.isError=zs,Fn.isFinite=function(t){return"number"==typeof t&&De(t)},Fn.isFunction=Js,Fn.isInteger=Qs,Fn.isLength=Xs,Fn.isMap=ea,Fn.isMatch=function(t,e){return t===e||Mr(t,e,ui(e))},Fn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Mr(t,e,ui(e),n)},Fn.isNaN=function(t){return na(t)&&t!=+t},Fn.isNative=function(t){if(Ci(t))throw new wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},Fn.isNil=function(t){return null==t},Fn.isNull=function(t){return null===t},Fn.isNumber=na,Fn.isObject=Zs,Fn.isObjectLike=ta,Fn.isPlainObject=ra,Fn.isRegExp=oa,Fn.isSafeInteger=function(t){return Qs(t)&&t>=-9007199254740991&&t<=f},Fn.isSet=ia,Fn.isString=sa,Fn.isSymbol=aa,Fn.isTypedArray=ua,Fn.isUndefined=function(t){return t===o},Fn.isWeakMap=function(t){return ta(t)&&hi(t)==L},Fn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Er(t)},Fn.join=function(t,e){return null==t?"":Ve.call(t,e)},Fn.kebabCase=Ua,Fn.last=zi,Fn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=pa(n))<0?mn(r+i,0):yn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Fe(t,Ge,i,!0)},Fn.lowerCase=Va,Fn.lowerFirst=Wa,Fn.lt=la,Fn.lte=ca,Fn.max=function(t){return t&&t.length?pr(t,nu,_r):o},Fn.maxBy=function(t,e){return t&&t.length?pr(t,si(e,2),_r):o},Fn.mean=function(t){return je(t,nu)},Fn.meanBy=function(t,e){return je(t,si(e,2))},Fn.min=function(t){return t&&t.length?pr(t,nu,Rr):o},Fn.minBy=function(t,e){return t&&t.length?pr(t,si(e,2),Rr):o},Fn.stubArray=du,Fn.stubFalse=gu,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=wu,Fn.nth=function(t,e){return t&&t.length?kr(t,pa(e)):o},Fn.noConflict=function(){return fe._===this&&(fe._=Ft),this},Fn.noop=au,Fn.now=xs,Fn.pad=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return jo(pe(o),n)+t+jo(he(o),n)},Fn.padEnd=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;return e&&r<e?t+jo(e-r,n):t},Fn.padStart=function(t,e,n){t=ya(t);var r=(e=pa(e))?cn(t):0;return e&&r<e?jo(e-r,n)+t:t},Fn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),bn(ya(t).replace(rt,""),e||0)},Fn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&yi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=ha(t),e===o?(e=t,t=0):e=ha(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Cn();return yn(t+i*(e-t+ae("1e-"+((i+"").length-1))),e)}return Wr(t,e)},Fn.reduce=function(t,e,n){var r=Us(t)?Oe:We,o=arguments.length<3;return r(t,si(e,4),n,o,cr)},Fn.reduceRight=function(t,e,n){var r=Us(t)?$e:We,o=arguments.length<3;return r(t,si(e,4),n,o,fr)},Fn.repeat=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:pa(e),qr(ya(t),e)},Fn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fn.result=function(t,e,n){var r=-1,i=(e=yo(e,t)).length;for(i||(i=1,t=o);++r<i;){var s=null==t?o:t[Di(e[r])];s===o&&(r=i,s=n),t=Js(s)?s.call(t):s}return t},Fn.round=Au,Fn.runInContext=t,Fn.sample=function(t){return(Us(t)?zn:Kr)(t)},Fn.size=function(t){if(null==t)return 0;if(Ws(t))return sa(t)?cn(t):t.length;var e=hi(t);return e==A||e==I?t.size:$r(t).length},Fn.snakeCase=qa,Fn.some=function(t,e,n){var r=Us(t)?Re:eo;return n&&yi(t,e,n)&&(e=o),r(t,si(e,3))},Fn.sortedIndex=function(t,e){return no(t,e)},Fn.sortedIndexBy=function(t,e,n){return ro(t,e,si(n,2))},Fn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Bs(t[r],e))return r}return-1},Fn.sortedLastIndex=function(t,e){return no(t,e,!0)},Fn.sortedLastIndexBy=function(t,e,n){return ro(t,e,si(n,2),!0)},Fn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Bs(t[n],e))return n}return-1},Fn.startCase=Ya,Fn.startsWith=function(t,e,n){return t=ya(t),n=null==n?0:ir(pa(n),0,t.length),e=so(e),t.slice(n,n+e.length)==e},Fn.subtract=Eu,Fn.sum=function(t){return t&&t.length?qe(t,nu):0},Fn.sumBy=function(t,e){return t&&t.length?qe(t,si(e,2)):0},Fn.template=function(t,e,n){var r=Fn.templateSettings;n&&yi(t,e,n)&&(e=o),t=ya(t),e=Ca({},e,r,Jo);var i,s,a=Ca({},e.imports,r.imports,Jo),u=La(a),l=Je(a,u),c=0,f=e.interpolate||bt,h="__p += '",p=xt((e.escape||bt).source+"|"+f.source+"|"+(f===Q?ft:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Ot.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(p,(function(e,n,r,o,a,u){return r||(r=o),h+=t.slice(c,u).replace(Ct,nn),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e})),h+="';\n";var g=Ot.call(e,"variable")&&e.variable;if(g){if(lt.test(g))throw new wt("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(j,""):h).replace(U,"$1").replace(V,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Qa((function(){return At(u,d+"return "+h).apply(o,l)}));if(m.source=h,zs(m))throw m;return m},Fn.times=function(t,e){if((t=pa(t))<1||t>f)return[];var n=p,r=yn(t,p);e=si(e),t-=p;for(var o=Ye(r,e);++n<t;)e(n);return o},Fn.toFinite=ha,Fn.toInteger=pa,Fn.toLength=da,Fn.toLower=function(t){return ya(t).toLowerCase()},Fn.toNumber=ga,Fn.toSafeInteger=function(t){return t?ir(pa(t),-9007199254740991,f):0===t?t:0},Fn.toString=ya,Fn.toUpper=function(t){return ya(t).toUpperCase()},Fn.trim=function(t,e,n){if((t=ya(t))&&(n||e===o))return Ke(t);if(!t||!(e=so(e)))return t;var r=fn(t),i=fn(e);return bo(r,Xe(r,i),Ze(r,i)+1).join("")},Fn.trimEnd=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.slice(0,hn(t)+1);if(!t||!(e=so(e)))return t;var r=fn(t);return bo(r,0,Ze(r,fn(e))+1).join("")},Fn.trimStart=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=so(e)))return t;var r=fn(t);return bo(r,Xe(r,fn(e))).join("")},Fn.truncate=function(t,e){var n=30,r="...";if(Zs(e)){var i="separator"in e?e.separator:i;n="length"in e?pa(e.length):n,r="omission"in e?so(e.omission):r}var s=(t=ya(t)).length;if(rn(t)){var a=fn(t);s=a.length}if(n>=s)return t;var u=n-cn(r);if(u<1)return r;var l=a?bo(a,0,u).join(""):t.slice(0,u);if(i===o)return l+r;if(a&&(u+=l.length-u),oa(i)){if(t.slice(u).search(i)){var c,f=l;for(i.global||(i=xt(i.source,ya(ht.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var h=c.index;l=l.slice(0,h===o?u:h)}}else if(t.indexOf(so(i),u)!=u){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+r},Fn.unescape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(W,pn):t},Fn.uniqueId=function(t){var e=++$t;return ya(t)+e},Fn.upperCase=Ka,Fn.upperFirst=za,Fn.each=ys,Fn.eachRight=vs,Fn.first=Wi,su(Fn,(mu={},vr(Fn,(function(t,e){Ot.call(Fn.prototype,e)||(mu[e]=t)})),mu),{chain:!1}),Fn.VERSION="4.17.21",xe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Fn[t].placeholder=Fn})),xe(["drop","take"],(function(t,e){jn.prototype[t]=function(n){n=n===o?1:mn(pa(n),0);var r=this.__filtered__&&!e?new jn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,p),type:t+(r.__dir__<0?"Right":"")}),r},jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),xe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:si(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),xe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");jn.prototype[t]=function(){return this[n](1).value()[0]}})),xe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");jn.prototype[t]=function(){return this.__filtered__?new jn(this):this[n](1)}})),jn.prototype.compact=function(){return this.filter(nu)},jn.prototype.find=function(t){return this.filter(t).head()},jn.prototype.findLast=function(t){return this.reverse().find(t)},jn.prototype.invokeMap=Yr((function(t,e){return"function"==typeof t?new jn(this):this.map((function(n){return Pr(n,t,e)}))})),jn.prototype.reject=function(t){return this.filter($s(si(t)))},jn.prototype.slice=function(t,e){t=pa(t);var n=this;return n.__filtered__&&(t>0||e<0)?new jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=pa(e))<0?n.dropRight(-e):n.take(e-t)),n)},jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},jn.prototype.toArray=function(){return this.take(p)},vr(jn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Fn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);i&&(Fn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof jn,l=a[0],c=u||Us(e),f=function(t){var e=i.apply(Fn,Ne([t],a));return r&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=s&&!h,g=u&&!p;if(!s&&c){e=g?e:new jn(this);var m=t.apply(e,a);return m.__actions__.push({func:hs,args:[f],thisArg:o}),new Gn(m,h)}return d&&g?t.apply(this,a):(m=this.thru(f),d?r?m.value()[0]:m.value():m)})})),xe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Fn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Us(o)?o:[],t)}return this[n]((function(n){return e.apply(Us(n)?n:[],t)}))}})),vr(jn.prototype,(function(t,e){var n=Fn[e];if(n){var r=n.name+"";Ot.call(Sn,r)||(Sn[r]=[]),Sn[r].push({name:e,func:n})}})),Sn[Fo(o,2).name]=[{name:"wrapper",func:o}],jn.prototype.clone=function(){var t=new jn(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},jn.prototype.reverse=function(){if(this.__filtered__){var t=new jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Us(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=yn(e,t+s);break;case"takeRight":t=mn(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,u=a-s,l=r?a:s-1,c=this.__iteratees__,f=c.length,h=0,p=yn(u,this.__takeCount__);if(!n||!r&&o==u&&p==u)return fo(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var g=-1,m=t[l+=e];++g<f;){var y=c[g],v=y.iteratee,b=y.type,C=v(m);if(2==b)m=C;else if(!C){if(1==b)continue t;break t}}d[h++]=m}return d},Fn.prototype.at=ps,Fn.prototype.chain=function(){return fs(this)},Fn.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===o&&(this.__values__=fa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Fn.prototype.plant=function(t){for(var e,n=this;n instanceof kn;){var r=Fi(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Fn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof jn){var e=t;return this.__actions__.length&&(e=new jn(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Zi],thisArg:o}),new Gn(e,this.__chain__)}return this.thru(Zi)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,zt&&(Fn.prototype[zt]=function(){return this}),Fn}();fe._=dn,(r=function(){return dn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)},802:t=>{t.exports=function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){if(i)return i(s,!0);throw new Error("Cannot find module '"+s+"'")}a=n[s]={exports:{}},e[s][0].call(a.exports,(function(t){return o(e[s][1][t]||t)}),a,a.exports,t,e,n,r)}return n[s].exports}for(var i=void 0,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){(function(r,o,i,s,a,u,l,c,f){"use strict";var h=t("crypto");function p(t,e){var n;return void 0===(n="passthrough"!==(e=m(t,e)).algorithm?h.createHash(e.algorithm):new b).write&&(n.write=n.update,n.end=n.update),v(e,n).dispatch(t),n.update||n.end(""),n.digest?n.digest("buffer"===e.encoding?void 0:e.encoding):(t=n.read(),"buffer"!==e.encoding?t.toString(e.encoding):t)}(n=e.exports=p).sha1=function(t){return p(t)},n.keys=function(t){return p(t,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},n.MD5=function(t){return p(t,{algorithm:"md5",encoding:"hex"})},n.keysMD5=function(t){return p(t,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var d=h.getHashes?h.getHashes().slice():["sha1","md5"],g=(d.push("passthrough"),["buffer","hex","binary","base64"]);function m(t,e){var n={};if(n.algorithm=(e=e||{}).algorithm||"sha1",n.encoding=e.encoding||"hex",n.excludeValues=!!e.excludeValues,n.algorithm=n.algorithm.toLowerCase(),n.encoding=n.encoding.toLowerCase(),n.ignoreUnknown=!0===e.ignoreUnknown,n.respectType=!1!==e.respectType,n.respectFunctionNames=!1!==e.respectFunctionNames,n.respectFunctionProperties=!1!==e.respectFunctionProperties,n.unorderedArrays=!0===e.unorderedArrays,n.unorderedSets=!1!==e.unorderedSets,n.unorderedObjects=!1!==e.unorderedObjects,n.replacer=e.replacer||void 0,n.excludeKeys=e.excludeKeys||void 0,void 0===t)throw new Error("Object argument required.");for(var r=0;r<d.length;++r)d[r].toLowerCase()===n.algorithm.toLowerCase()&&(n.algorithm=d[r]);if(-1===d.indexOf(n.algorithm))throw new Error('Algorithm "'+n.algorithm+'" not supported. supported values: '+d.join(", "));if(-1===g.indexOf(n.encoding)&&"passthrough"!==n.algorithm)throw new Error('Encoding "'+n.encoding+'" not supported. supported values: '+g.join(", "));return n}function y(t){if("function"==typeof t)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(t))}function v(t,e,n){function r(t){return e.update?e.update(t,"utf8"):e.write(t,"utf8")}return n=n||[],{dispatch:function(e){return this["_"+(null===(e=t.replacer?t.replacer(e):e)?"null":typeof e)](e)},_object:function(e){var o,s=Object.prototype.toString.call(e),a=/\[object (.*)\]/i.exec(s);if(a=(a=a?a[1]:"unknown:["+s+"]").toLowerCase(),0<=(s=n.indexOf(e)))return this.dispatch("[CIRCULAR:"+s+"]");if(n.push(e),void 0!==i&&i.isBuffer&&i.isBuffer(e))return r("buffer:"),r(e);if("object"===a||"function"===a||"asyncfunction"===a)return s=Object.keys(e),t.unorderedObjects&&(s=s.sort()),!1===t.respectType||y(e)||s.splice(0,0,"prototype","__proto__","constructor"),t.excludeKeys&&(s=s.filter((function(e){return!t.excludeKeys(e)}))),r("object:"+s.length+":"),o=this,s.forEach((function(n){o.dispatch(n),r(":"),t.excludeValues||o.dispatch(e[n]),r(",")}));if(!this["_"+a]){if(t.ignoreUnknown)return r("["+a+"]");throw new Error('Unknown object type "'+a+'"')}this["_"+a](e)},_array:function(e,o){o=void 0!==o?o:!1!==t.unorderedArrays;var i=this;if(r("array:"+e.length+":"),!o||e.length<=1)return e.forEach((function(t){return i.dispatch(t)}));var s=[];return o=e.map((function(e){var r=new b,o=n.slice();return v(t,r,o).dispatch(e),s=s.concat(o.slice(n.length)),r.read().toString()})),n=n.concat(s),o.sort(),this._array(o,!1)},_date:function(t){return r("date:"+t.toJSON())},_symbol:function(t){return r("symbol:"+t.toString())},_error:function(t){return r("error:"+t.toString())},_boolean:function(t){return r("bool:"+t.toString())},_string:function(t){r("string:"+t.length+":"),r(t.toString())},_function:function(e){r("fn:"),y(e)?this.dispatch("[native]"):this.dispatch(e.toString()),!1!==t.respectFunctionNames&&this.dispatch("function-name:"+String(e.name)),t.respectFunctionProperties&&this._object(e)},_number:function(t){return r("number:"+t.toString())},_xml:function(t){return r("xml:"+t.toString())},_null:function(){return r("Null")},_undefined:function(){return r("Undefined")},_regexp:function(t){return r("regex:"+t.toString())},_uint8array:function(t){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint8clampedarray:function(t){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(t))},_int8array:function(t){return r("int8array:"),this.dispatch(Array.prototype.slice.call(t))},_uint16array:function(t){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(t))},_int16array:function(t){return r("int16array:"),this.dispatch(Array.prototype.slice.call(t))},_uint32array:function(t){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(t))},_int32array:function(t){return r("int32array:"),this.dispatch(Array.prototype.slice.call(t))},_float32array:function(t){return r("float32array:"),this.dispatch(Array.prototype.slice.call(t))},_float64array:function(t){return r("float64array:"),this.dispatch(Array.prototype.slice.call(t))},_arraybuffer:function(t){return r("arraybuffer:"),this.dispatch(new Uint8Array(t))},_url:function(t){return r("url:"+t.toString())},_map:function(e){return r("map:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_set:function(e){return r("set:"),e=Array.from(e),this._array(e,!1!==t.unorderedSets)},_file:function(t){return r("file:"),this.dispatch([t.name,t.size,t.type,t.lastModfied])},_blob:function(){if(t.ignoreUnknown)return r("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return r("domwindow")},_bigint:function(t){return r("bigint:"+t.toString())},_process:function(){return r("process")},_timer:function(){return r("timer")},_pipe:function(){return r("pipe")},_tcp:function(){return r("tcp")},_udp:function(){return r("udp")},_tty:function(){return r("tty")},_statwatcher:function(){return r("statwatcher")},_securecontext:function(){return r("securecontext")},_connection:function(){return r("connection")},_zlib:function(){return r("zlib")},_context:function(){return r("context")},_nodescript:function(){return r("nodescript")},_httpparser:function(){return r("httpparser")},_dataview:function(){return r("dataview")},_signal:function(){return r("signal")},_fsevent:function(){return r("fsevent")},_tlswrap:function(){return r("tlswrap")}}}function b(){return{buf:"",write:function(t){this.buf+=t},end:function(t){this.buf+=t},read:function(){return this.buf}}}n.writeToStream=function(t,e,n){return void 0===n&&(n=e,e={}),v(e=m(t,e),n).dispatch(t)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(t,e,n){(function(t,e,r,o,i,s,a,u,l){!function(t){"use strict";var e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),r="/".charCodeAt(0),o="0".charCodeAt(0),i="a".charCodeAt(0),s="A".charCodeAt(0),a="-".charCodeAt(0),u="_".charCodeAt(0);function l(t){return(t=t.charCodeAt(0))===n||t===a?62:t===r||t===u?63:t<o?-1:t<o+10?t-o+26+26:t<s+26?t-s:t<i+26?t-i+26:void 0}t.toByteArray=function(t){var n,r;if(0<t.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var o=t.length,i=(o="="===t.charAt(o-2)?2:"="===t.charAt(o-1)?1:0,new e(3*t.length/4-o)),s=0<o?t.length-4:t.length,a=0;function u(t){i[a++]=t}for(n=0;n<s;n+=4,0)u((16711680&(r=l(t.charAt(n))<<18|l(t.charAt(n+1))<<12|l(t.charAt(n+2))<<6|l(t.charAt(n+3))))>>16),u((65280&r)>>8),u(255&r);return 2==o?u(255&(r=l(t.charAt(n))<<2|l(t.charAt(n+1))>>4)):1==o&&(u((r=l(t.charAt(n))<<10|l(t.charAt(n+1))<<4|l(t.charAt(n+2))>>2)>>8&255),u(255&r)),i},t.fromByteArray=function(t){var e,n,r,o,i=t.length%3,s="";function a(t){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t)}for(e=0,r=t.length-i;e<r;e+=3)s+=a((o=n=(t[e]<<16)+(t[e+1]<<8)+t[e+2])>>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:s=(s+=a((n=t[t.length-1])>>2))+a(n<<4&63)+"==";break;case 2:s=(s=(s+=a((n=(t[t.length-2]<<8)+t[t.length-1])>>10))+a(n>>4&63))+a(n<<2&63)+"="}return s}}(void 0===n?this.base64js={}:n)}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(t,e,n){(function(e,r,o,i,s,a,u,l,c){var f=t("base64-js"),h=t("ieee754");function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);var r,i,s,a,u=typeof t;if("base64"===e&&"string"==u)for(t=(a=t).trim?a.trim():a.replace(/^\s+|\s+$/g,"");t.length%4!=0;)t+="=";if("number"==u)r=I(t);else if("string"==u)r=o.byteLength(t,e);else{if("object"!=u)throw new Error("First argument needs to be a number, array or string.");r=I(t.length)}if(o._useTypedArrays?i=o._augment(new Uint8Array(r)):((i=this).length=r,i._isBuffer=!0),o._useTypedArrays&&"number"==typeof t.byteLength)i._set(t);else if(P(a=t)||o.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(s=0;s<r;s++)o.isBuffer(t)?i[s]=t.readUInt8(s):i[s]=t[s];else if("string"==u)i.write(t,0,e);else if("number"==u&&!o._useTypedArrays&&!n)for(s=0;s<r;s++)i[s]=0;return i}function p(t,e,n,r){var o;if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+1<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(o=t[e],e+1<r&&(o|=t[e+1]<<8)):(o=t[e]<<8,e+1<r&&(o|=t[e+1])),o}function d(t,e,n,r){var o;if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+3<t.length,"Trying to read beyond buffer length")),!((r=t.length)<=e))return n?(e+2<r&&(o=t[e+2]<<16),e+1<r&&(o|=t[e+1]<<8),o|=t[e],e+3<r&&(o+=t[e+3]<<24>>>0)):(e+1<r&&(o=t[e+1]<<16),e+2<r&&(o|=t[e+2]<<8),e+3<r&&(o|=t[e+3]),o+=t[e]<<24>>>0),o}function g(t,e,n,r){if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+1<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 32768&(r=p(t,e,n,!0))?-1*(65535-r+1):r}function m(t,e,n,r){if(r||(H("boolean"==typeof n,"missing or invalid endian"),H(null!=e,"missing offset"),H(e+3<t.length,"Trying to read beyond buffer length")),!(t.length<=e))return 2147483648&(r=d(t,e,n,!0))?-1*(4294967295-r+1):r}function y(t,e,n,r){return r||(H("boolean"==typeof n,"missing or invalid endian"),H(e+3<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,23,4)}function v(t,e,n,r){return r||(H("boolean"==typeof n,"missing or invalid endian"),H(e+7<t.length,"Trying to read beyond buffer length")),h.read(t,e,n,52,8)}function b(t,e,n,r,o){if(o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+1<t.length,"trying to write beyond buffer length"),$(e,65535)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,2);i<s;i++)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function C(t,e,n,r,o){if(o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"trying to write beyond buffer length"),$(e,4294967295)),!((o=t.length)<=n))for(var i=0,s=Math.min(o-n,4);i<s;i++)t[n+i]=e>>>8*(r?i:3-i)&255}function w(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+1<t.length,"Trying to write beyond buffer length"),R(e,32767,-32768)),t.length<=n||b(t,0<=e?e:65535+e+1,n,r,o)}function A(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"Trying to write beyond buffer length"),R(e,2147483647,-2147483648)),t.length<=n||C(t,0<=e?e:4294967295+e+1,n,r,o)}function E(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+3<t.length,"Trying to write beyond buffer length"),D(e,34028234663852886e22,-34028234663852886e22)),t.length<=n||h.write(t,e,n,r,23,4)}function _(t,e,n,r,o){o||(H(null!=e,"missing value"),H("boolean"==typeof r,"missing or invalid endian"),H(null!=n,"missing offset"),H(n+7<t.length,"Trying to write beyond buffer length"),D(e,17976931348623157e292,-17976931348623157e292)),t.length<=n||h.write(t,e,n,r,52,8)}n.Buffer=o,n.SlowBuffer=o,n.INSPECT_MAX_BYTES=50,o.poolSize=8192,o._useTypedArrays=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray}catch(t){return!1}}(),o.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.byteLength=function(t,e){var n;switch(t+="",e||"utf8"){case"hex":n=t.length/2;break;case"utf8":case"utf-8":n=L(t).length;break;case"ascii":case"binary":case"raw":n=t.length;break;case"base64":n=M(t).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":n=2*t.length;break;default:throw new Error("Unknown encoding")}return n},o.concat=function(t,e){if(H(P(t),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===t.length)return new o(0);if(1===t.length)return t[0];if("number"!=typeof e)for(i=e=0;i<t.length;i++)e+=t[i].length;for(var n=new o(e),r=0,i=0;i<t.length;i++){var s=t[i];s.copy(n,r),r+=s.length}return n},o.prototype.write=function(t,e,n,r){isFinite(e)?isFinite(n)||(r=n,n=void 0):(l=r,r=e,e=n,n=l),e=Number(e)||0;var i,s,a,u,l=this.length-e;switch((!n||l<(n=Number(n)))&&(n=l),r=String(r||"utf8").toLowerCase()){case"hex":i=function(t,e,n,r){n=Number(n)||0;var i=t.length-n;(!r||i<(r=Number(r)))&&(r=i),H((i=e.length)%2==0,"Invalid hex string"),i/2<r&&(r=i/2);for(var s=0;s<r;s++){var a=parseInt(e.substr(2*s,2),16);H(!isNaN(a),"Invalid hex string"),t[n+s]=a}return o._charsWritten=2*s,s}(this,t,e,n);break;case"utf8":case"utf-8":s=this,a=e,u=n,i=o._charsWritten=N(L(t),s,a,u);break;case"ascii":case"binary":i=function(t,e,n,r){return o._charsWritten=N(function(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}(this,t,e,n);break;case"base64":s=this,a=e,u=n,i=o._charsWritten=N(M(t),s,a,u);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=function(t,e,n,r){return o._charsWritten=N(function(t){for(var e,n,r=[],o=0;o<t.length;o++)e=(n=t.charCodeAt(o))>>8,n%=256,r.push(n),r.push(e);return r}(e),t,n,r)}(this,t,e,n);break;default:throw new Error("Unknown encoding")}return i},o.prototype.toString=function(t,e,n){var r,o,i,s,a=this;if(t=String(t||"utf8").toLowerCase(),e=Number(e)||0,(n=void 0!==n?Number(n):a.length)===e)return"";switch(t){case"hex":r=function(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||r<n)&&(n=r);for(var o="",i=e;i<n;i++)o+=S(t[i]);return o}(a,e,n);break;case"utf8":case"utf-8":r=function(t,e,n){var r="",o="";n=Math.min(t.length,n);for(var i=e;i<n;i++)t[i]<=127?(r+=O(o)+String.fromCharCode(t[i]),o=""):o+="%"+t[i].toString(16);return r+O(o)}(a,e,n);break;case"ascii":case"binary":r=function(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;o<n;o++)r+=String.fromCharCode(t[o]);return r}(a,e,n);break;case"base64":o=a,s=n,r=0===(i=e)&&s===o.length?f.fromByteArray(o):f.fromByteArray(o.slice(i,s));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=function(t,e,n){for(var r=t.slice(e,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}(a,e,n);break;default:throw new Error("Unknown encoding")}return r},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.copy=function(t,e,n,r){if(e=e||0,(r=r||0===r?r:this.length)!==(n=n||0)&&0!==t.length&&0!==this.length){H(n<=r,"sourceEnd < sourceStart"),H(0<=e&&e<t.length,"targetStart out of bounds"),H(0<=n&&n<this.length,"sourceStart out of bounds"),H(0<=r&&r<=this.length,"sourceEnd out of bounds"),r>this.length&&(r=this.length);var i=(r=t.length-e<r-n?t.length-e+n:r)-n;if(i<100||!o._useTypedArrays)for(var s=0;s<i;s++)t[s+e]=this[s+n];else t._set(this.subarray(n,n+i),e)}},o.prototype.slice=function(t,e){var n=this.length;if(t=T(t,n,0),e=T(e,n,n),o._useTypedArrays)return o._augment(this.subarray(t,e));for(var r=e-t,i=new o(r,void 0,!0),s=0;s<r;s++)i[s]=this[s+t];return i},o.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},o.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},o.prototype.readUInt8=function(t,e){if(e||(H(null!=t,"missing offset"),H(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return this[t]},o.prototype.readUInt16LE=function(t,e){return p(this,t,!0,e)},o.prototype.readUInt16BE=function(t,e){return p(this,t,!1,e)},o.prototype.readUInt32LE=function(t,e){return d(this,t,!0,e)},o.prototype.readUInt32BE=function(t,e){return d(this,t,!1,e)},o.prototype.readInt8=function(t,e){if(e||(H(null!=t,"missing offset"),H(t<this.length,"Trying to read beyond buffer length")),!(t>=this.length))return 128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){return g(this,t,!0,e)},o.prototype.readInt16BE=function(t,e){return g(this,t,!1,e)},o.prototype.readInt32LE=function(t,e){return m(this,t,!0,e)},o.prototype.readInt32BE=function(t,e){return m(this,t,!1,e)},o.prototype.readFloatLE=function(t,e){return y(this,t,!0,e)},o.prototype.readFloatBE=function(t,e){return y(this,t,!1,e)},o.prototype.readDoubleLE=function(t,e){return v(this,t,!0,e)},o.prototype.readDoubleBE=function(t,e){return v(this,t,!1,e)},o.prototype.writeUInt8=function(t,e,n){n||(H(null!=t,"missing value"),H(null!=e,"missing offset"),H(e<this.length,"trying to write beyond buffer length"),$(t,255)),e>=this.length||(this[e]=t)},o.prototype.writeUInt16LE=function(t,e,n){b(this,t,e,!0,n)},o.prototype.writeUInt16BE=function(t,e,n){b(this,t,e,!1,n)},o.prototype.writeUInt32LE=function(t,e,n){C(this,t,e,!0,n)},o.prototype.writeUInt32BE=function(t,e,n){C(this,t,e,!1,n)},o.prototype.writeInt8=function(t,e,n){n||(H(null!=t,"missing value"),H(null!=e,"missing offset"),H(e<this.length,"Trying to write beyond buffer length"),R(t,127,-128)),e>=this.length||(0<=t?this.writeUInt8(t,e,n):this.writeUInt8(255+t+1,e,n))},o.prototype.writeInt16LE=function(t,e,n){w(this,t,e,!0,n)},o.prototype.writeInt16BE=function(t,e,n){w(this,t,e,!1,n)},o.prototype.writeInt32LE=function(t,e,n){A(this,t,e,!0,n)},o.prototype.writeInt32BE=function(t,e,n){A(this,t,e,!1,n)},o.prototype.writeFloatLE=function(t,e,n){E(this,t,e,!0,n)},o.prototype.writeFloatBE=function(t,e,n){E(this,t,e,!1,n)},o.prototype.writeDoubleLE=function(t,e,n){_(this,t,e,!0,n)},o.prototype.writeDoubleBE=function(t,e,n){_(this,t,e,!1,n)},o.prototype.fill=function(t,e,n){if(e=e||0,n=n||this.length,H("number"==typeof(t="string"==typeof(t=t||0)?t.charCodeAt(0):t)&&!isNaN(t),"value is not a number"),H(e<=n,"end < start"),n!==e&&0!==this.length){H(0<=e&&e<this.length,"start out of bounds"),H(0<=n&&n<=this.length,"end out of bounds");for(var r=e;r<n;r++)this[r]=t}},o.prototype.inspect=function(){for(var t=[],e=this.length,r=0;r<e;r++)if(t[r]=S(this[r]),r===n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},o.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(o._useTypedArrays)return new o(this).buffer;for(var t=new Uint8Array(this.length),e=0,n=t.length;e<n;e+=1)t[e]=this[e];return t.buffer};var x=o.prototype;function T(t,e,n){return"number"!=typeof t?n:e<=(t=~~t)?e:0<=t||0<=(t+=e)?t:0}function I(t){return(t=~~Math.ceil(+t))<0?0:t}function P(t){return(Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)})(t)}function S(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push(t.charCodeAt(n));else for(var o=n,i=(55296<=r&&r<=57343&&n++,encodeURIComponent(t.slice(o,n+1)).substr(1).split("%")),s=0;s<i.length;s++)e.push(parseInt(i[s],16))}return e}function M(t){return f.toByteArray(t)}function N(t,e,n,r){for(var o=0;o<r&&!(o+n>=e.length||o>=t.length);o++)e[o+n]=t[o];return o}function O(t){try{return decodeURIComponent(t)}catch(t){return String.fromCharCode(65533)}}function $(t,e){H("number"==typeof t,"cannot write a non-number as a number"),H(0<=t,"specified a negative value for writing an unsigned value"),H(t<=e,"value is larger than maximum value for type"),H(Math.floor(t)===t,"value has a fractional component")}function R(t,e,n){H("number"==typeof t,"cannot write a non-number as a number"),H(t<=e,"value larger than maximum allowed value"),H(n<=t,"value smaller than minimum allowed value"),H(Math.floor(t)===t,"value has a fractional component")}function D(t,e,n){H("number"==typeof t,"cannot write a non-number as a number"),H(t<=e,"value larger than maximum allowed value"),H(n<=t,"value smaller than minimum allowed value")}function H(t,e){if(!t)throw new Error(e||"Failed assertion")}o._augment=function(t){return t._isBuffer=!0,t._get=t.get,t._set=t.set,t.get=x.get,t.set=x.set,t.write=x.write,t.toString=x.toString,t.toLocaleString=x.toString,t.toJSON=x.toJSON,t.copy=x.copy,t.slice=x.slice,t.readUInt8=x.readUInt8,t.readUInt16LE=x.readUInt16LE,t.readUInt16BE=x.readUInt16BE,t.readUInt32LE=x.readUInt32LE,t.readUInt32BE=x.readUInt32BE,t.readInt8=x.readInt8,t.readInt16LE=x.readInt16LE,t.readInt16BE=x.readInt16BE,t.readInt32LE=x.readInt32LE,t.readInt32BE=x.readInt32BE,t.readFloatLE=x.readFloatLE,t.readFloatBE=x.readFloatBE,t.readDoubleLE=x.readDoubleLE,t.readDoubleBE=x.readDoubleBE,t.writeUInt8=x.writeUInt8,t.writeUInt16LE=x.writeUInt16LE,t.writeUInt16BE=x.writeUInt16BE,t.writeUInt32LE=x.writeUInt32LE,t.writeUInt32BE=x.writeUInt32BE,t.writeInt8=x.writeInt8,t.writeInt16LE=x.writeInt16LE,t.writeInt16BE=x.writeInt16BE,t.writeInt32LE=x.writeInt32LE,t.writeInt32BE=x.writeInt32BE,t.writeFloatLE=x.writeFloatLE,t.writeFloatBE=x.writeFloatBE,t.writeDoubleLE=x.writeDoubleLE,t.writeDoubleBE=x.writeDoubleBE,t.fill=x.fill,t.inspect=x.inspect,t.toArrayBuffer=x.toArrayBuffer,t}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){o=t("buffer").Buffer;var f=new o(4);f.fill(0),e.exports={hash:function(t,e,n,r){for(var i=e(function(t,e){t.length%4!=0&&(n=t.length+(4-t.length%4),t=o.concat([t,f],n));for(var n,r=[],i=e?t.readInt32BE:t.readInt32LE,s=0;s<t.length;s+=4)r.push(i.call(t,s));return r}(t=o.isBuffer(t)?t:new o(t),r),8*t.length),s=(e=r,new o(n)),a=e?s.writeInt32BE:s.writeInt32LE,u=0;u<i.length;u++)a.call(s,i[u],4*u,!0);return s}}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(t,e,n){(function(e,r,o,i,s,a,u,l,c){o=t("buffer").Buffer;var f=t("./sha"),h=t("./sha256"),p=t("./rng"),d={sha1:f,sha256:h,md5:t("./md5")},g=64,m=new o(g);function y(t,e){var n=d[t=t||"sha1"],r=[];return n||v("algorithm:",t,"is not yet supported"),{update:function(t){return o.isBuffer(t)||(t=new o(t)),r.push(t),t.length,this},digest:function(t){var i=o.concat(r);return i=e?function(t,e,n){o.isBuffer(e)||(e=new o(e)),o.isBuffer(n)||(n=new o(n)),e.length>g?e=t(e):e.length<g&&(e=o.concat([e,m],g));for(var r=new o(g),i=new o(g),s=0;s<g;s++)r[s]=54^e[s],i[s]=92^e[s];return n=t(o.concat([r,n])),t(o.concat([i,n]))}(n,e,i):n(i),r=null,t?i.toString(t):i}}}function v(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}m.fill(0),n.createHash=function(t){return y(t)},n.createHmac=y,n.randomBytes=function(t,e){if(!e||!e.call)return new o(p(t));try{e.call(this,void 0,new o(p(t)))}catch(t){e(t)}};var b,C=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],w=function(t){n[t]=function(){v("sorry,",t,"is not implemented yet")}};for(b in C)w(C[b])}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,s=0;s<t.length;s+=16){var a=n,u=r,l=o,c=i;n=d(n,r,o,i,t[s+0],7,-680876936),i=d(i,n,r,o,t[s+1],12,-389564586),o=d(o,i,n,r,t[s+2],17,606105819),r=d(r,o,i,n,t[s+3],22,-1044525330),n=d(n,r,o,i,t[s+4],7,-176418897),i=d(i,n,r,o,t[s+5],12,1200080426),o=d(o,i,n,r,t[s+6],17,-1473231341),r=d(r,o,i,n,t[s+7],22,-45705983),n=d(n,r,o,i,t[s+8],7,1770035416),i=d(i,n,r,o,t[s+9],12,-1958414417),o=d(o,i,n,r,t[s+10],17,-42063),r=d(r,o,i,n,t[s+11],22,-1990404162),n=d(n,r,o,i,t[s+12],7,1804603682),i=d(i,n,r,o,t[s+13],12,-40341101),o=d(o,i,n,r,t[s+14],17,-1502002290),n=g(n,r=d(r,o,i,n,t[s+15],22,1236535329),o,i,t[s+1],5,-165796510),i=g(i,n,r,o,t[s+6],9,-1069501632),o=g(o,i,n,r,t[s+11],14,643717713),r=g(r,o,i,n,t[s+0],20,-373897302),n=g(n,r,o,i,t[s+5],5,-701558691),i=g(i,n,r,o,t[s+10],9,38016083),o=g(o,i,n,r,t[s+15],14,-660478335),r=g(r,o,i,n,t[s+4],20,-405537848),n=g(n,r,o,i,t[s+9],5,568446438),i=g(i,n,r,o,t[s+14],9,-1019803690),o=g(o,i,n,r,t[s+3],14,-187363961),r=g(r,o,i,n,t[s+8],20,1163531501),n=g(n,r,o,i,t[s+13],5,-1444681467),i=g(i,n,r,o,t[s+2],9,-51403784),o=g(o,i,n,r,t[s+7],14,1735328473),n=m(n,r=g(r,o,i,n,t[s+12],20,-1926607734),o,i,t[s+5],4,-378558),i=m(i,n,r,o,t[s+8],11,-2022574463),o=m(o,i,n,r,t[s+11],16,1839030562),r=m(r,o,i,n,t[s+14],23,-35309556),n=m(n,r,o,i,t[s+1],4,-1530992060),i=m(i,n,r,o,t[s+4],11,1272893353),o=m(o,i,n,r,t[s+7],16,-155497632),r=m(r,o,i,n,t[s+10],23,-1094730640),n=m(n,r,o,i,t[s+13],4,681279174),i=m(i,n,r,o,t[s+0],11,-358537222),o=m(o,i,n,r,t[s+3],16,-722521979),r=m(r,o,i,n,t[s+6],23,76029189),n=m(n,r,o,i,t[s+9],4,-640364487),i=m(i,n,r,o,t[s+12],11,-421815835),o=m(o,i,n,r,t[s+15],16,530742520),n=y(n,r=m(r,o,i,n,t[s+2],23,-995338651),o,i,t[s+0],6,-198630844),i=y(i,n,r,o,t[s+7],10,1126891415),o=y(o,i,n,r,t[s+14],15,-1416354905),r=y(r,o,i,n,t[s+5],21,-57434055),n=y(n,r,o,i,t[s+12],6,1700485571),i=y(i,n,r,o,t[s+3],10,-1894986606),o=y(o,i,n,r,t[s+10],15,-1051523),r=y(r,o,i,n,t[s+1],21,-2054922799),n=y(n,r,o,i,t[s+8],6,1873313359),i=y(i,n,r,o,t[s+15],10,-30611744),o=y(o,i,n,r,t[s+6],15,-1560198380),r=y(r,o,i,n,t[s+13],21,1309151649),n=y(n,r,o,i,t[s+4],6,-145523070),i=y(i,n,r,o,t[s+11],10,-1120210379),o=y(o,i,n,r,t[s+2],15,718787259),r=y(r,o,i,n,t[s+9],21,-343485551),n=v(n,a),r=v(r,u),o=v(o,l),i=v(i,c)}return Array(n,r,o,i)}function p(t,e,n,r,o,i){return v((e=v(v(e,t),v(r,i)))<<o|e>>>32-o,n)}function d(t,e,n,r,o,i,s){return p(e&n|~e&r,t,e,o,i,s)}function g(t,e,n,r,o,i,s){return p(e&r|n&~r,t,e,o,i,s)}function m(t,e,n,r,o,i,s){return p(e^n^r,t,e,o,i,s)}function y(t,e,n,r,o,i,s){return p(n^(e|~r),t,e,o,i,s)}function v(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}e.exports=function(t){return f.hash(t,h,16)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(t,e,n){(function(t,n,r,o,i,s,a,u,l){e.exports=function(t){for(var e,n=new Array(t),r=0;r<t;r++)!(3&r)&&(e=4294967296*Math.random()),n[r]=e>>>((3&r)<<3)&255;return n}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){var f=t("./helpers");function h(t,e){t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var n,r,o,i=Array(80),s=1732584193,a=-271733879,u=-1732584194,l=271733878,c=-1009589776,f=0;f<t.length;f+=16){for(var h=s,g=a,m=u,y=l,v=c,b=0;b<80;b++){i[b]=b<16?t[f+b]:d(i[b-3]^i[b-8]^i[b-14]^i[b-16],1);var C=p(p(d(s,5),(C=a,r=u,o=l,(n=b)<20?C&r|~C&o:!(n<40)&&n<60?C&r|C&o|r&o:C^r^o)),p(p(c,i[b]),(n=b)<20?1518500249:n<40?1859775393:n<60?-1894007588:-899497514));c=l,l=u,u=d(a,30),a=s,s=C}s=p(s,h),a=p(a,g),u=p(u,m),l=p(l,y),c=p(c,v)}return Array(s,a,u,l,c)}function p(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function d(t,e){return t<<e|t>>>32-e}e.exports=function(t){return f.hash(t,h,20,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(t,e,n){(function(n,r,o,i,s,a,u,l,c){function f(t,e){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function h(t,e){var n,r=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),o=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),i=new Array(64);t[e>>5]|=128<<24-e%32,t[15+(e+64>>9<<4)]=e;for(var s,a,u=0;u<t.length;u+=16){for(var l=o[0],c=o[1],h=o[2],p=o[3],m=o[4],y=o[5],v=o[6],b=o[7],C=0;C<64;C++)i[C]=C<16?t[C+u]:f(f(f((a=i[C-2],d(a,17)^d(a,19)^g(a,10)),i[C-7]),(a=i[C-15],d(a,7)^d(a,18)^g(a,3))),i[C-16]),n=f(f(f(f(b,d(a=m,6)^d(a,11)^d(a,25)),m&y^~m&v),r[C]),i[C]),s=f(d(s=l,2)^d(s,13)^d(s,22),l&c^l&h^c&h),b=v,v=y,y=m,m=f(p,n),p=h,h=c,c=l,l=f(n,s);o[0]=f(l,o[0]),o[1]=f(c,o[1]),o[2]=f(h,o[2]),o[3]=f(p,o[3]),o[4]=f(m,o[4]),o[5]=f(y,o[5]),o[6]=f(v,o[6]),o[7]=f(b,o[7])}return o}var p=t("./helpers"),d=function(t,e){return t>>>e|t<<32-e},g=function(t,e){return t>>>e};e.exports=function(t){return p.hash(t,h,32,!0)}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(t,e,n){(function(t,e,r,o,i,s,a,u,l){n.read=function(t,e,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?o-1:0,h=n?-1:1;for(o=t[e+f],f+=h,i=o&(1<<-c)-1,o>>=-c,c+=a;0<c;i=256*i+t[e+f],f+=h,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;0<c;s=256*s+t[e+f],f+=h,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:1/0*(o?-1:1);s+=Math.pow(2,r),i-=l}return(o?-1:1)*s*Math.pow(2,i-r)},n.write=function(t,e,n,r,o,i){var s,a,u=8*i-o-1,l=(1<<u)-1,c=l>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1;for(i=e<0||0===e&&1/e<0?1:0,e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(r=Math.pow(2,-s))<1&&(s--,r*=2),2<=(e+=1<=s+c?f/r:f*Math.pow(2,1-c))*r&&(s++,r/=2),l<=s+c?(a=0,s=l):1<=s+c?(a=(e*r-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));8<=o;t[n+h]=255&a,h+=p,a/=256,o-=8);for(s=s<<o|a,u+=o;0<u;t[n+h]=255&s,h+=p,s/=256,u-=8);t[n+h-p]|=128*i}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(t,e,n){(function(t,n,r,o,i,s,a,u,l){var c,f,h;function p(){}(t=e.exports={}).nextTick=(f="undefined"!=typeof window&&window.setImmediate,h="undefined"!=typeof window&&window.postMessage&&window.addEventListener,f?function(t){return window.setImmediate(t)}:h?(c=[],window.addEventListener("message",(function(t){var e=t.source;e!==window&&null!==e||"process-tick"!==t.data||(t.stopPropagation(),0<c.length&&c.shift()())}),!0),function(t){c.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}),t.title="browser",t.browser=!0,t.env={},t.argv=[],t.on=p,t.addListener=p,t.once=p,t.off=p,t.removeListener=p,t.removeAllListeners=p,t.emit=p,t.binding=function(t){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(t){throw new Error("process.chdir is not supported")}}).call(this,t("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)},146:(t,e)=>{"use strict";var n;!function(){var r=e||{}||this||window;void 0===(n=function(){return r}.apply(e,[]))||(t.exports=n),r.default=r;var o="http://www.w3.org/2000/xmlns/",i="http://www.w3.org/2000/svg",s=/url\(["']?(.+?)["']?\)/,a={woff2:"font/woff2",woff:"font/woff",otf:"application/x-font-opentype",ttf:"application/x-font-ttf",eot:"application/vnd.ms-fontobject",sfnt:"application/font-sfnt",svg:"image/svg+xml"},u=function(t){return t instanceof HTMLElement||t instanceof SVGElement},l=function(t){if(!u(t))throw new Error("an HTMLElement or SVGElement is required; got "+t)},c=function(t){return new Promise((function(e,n){u(t)?e(t):n(new Error("an HTMLElement or SVGElement is required; got "+t))}))},f=function(t,e,n){var r=t.viewBox&&t.viewBox.baseVal&&t.viewBox.baseVal[n]||null!==e.getAttribute(n)&&!e.getAttribute(n).match(/%$/)&&parseInt(e.getAttribute(n))||t.getBoundingClientRect()[n]||parseInt(e.style[n])||parseInt(window.getComputedStyle(t).getPropertyValue(n));return null==r||isNaN(parseFloat(r))?0:r},h=function(t){for(var e=window.atob(t.split(",")[1]),n=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(e.length),o=new Uint8Array(r),i=0;i<e.length;i++)o[i]=e.charCodeAt(i);return new Blob([r],{type:n})},p={},d=null,g=function(t,e){var n=e||{},r=n.selectorRemap,o=n.modifyStyle,i=n.modifyCss,u=n.fonts,l=n.excludeUnusedCss,c=i||function(t,e){return(r?r(t):t)+"{"+(o?o(e):e)+"}\n"},f=[],h=void 0===u,g=u||[];return(d||(d=Array.from(document.styleSheets).map((function(t){try{return{rules:t.cssRules,href:t.href}}catch(e){return console.warn("Stylesheet could not be loaded: "+t.href,e),{}}})))).forEach((function(e){var n=e.rules,r=e.href;n&&Array.from(n).forEach((function(e){if(void 0!==e.style)if(function(t,e){if(e)try{return t.querySelector(e)||t.parentNode&&t.parentNode.querySelector(e)}catch(t){console.warn('Invalid CSS selector "'+e+'"',t)}}(t,e.selectorText))f.push(c(e.selectorText,e.style.cssText));else if(h&&e.cssText.match(/^@font-face/)){var n=function(t,e){var n=t.cssText.match(s),r=n&&n[1]||"";if(r&&!r.match(/^data:/)&&"about:blank"!==r){var o,i,u=r.startsWith("../")?e+"/../"+r:r.startsWith("./")?e+"/."+r:r;return{text:t.cssText,format:(o=u,i=Object.keys(a).filter((function(t){return o.indexOf("."+t)>0})).map((function(t){return a[t]})),i?i[0]:(console.error("Unknown font format for "+o+". Fonts may not be working correctly."),"application/octet-stream")),url:u}}}(e,r);n&&g.push(n)}else l||f.push(e.cssText)}))})),function(t){return Promise.all(t.map((function(t){return new Promise((function(e,n){if(p[t.url])return e(p[t.url]);var r=new XMLHttpRequest;r.addEventListener("load",(function(){var n=function(t){for(var e="",n=new Uint8Array(t),r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return window.btoa(e)}(r.response),o=t.text.replace(s,'url("data:'+t.format+";base64,"+n+'")')+"\n";p[t.url]=o,e(o)})),r.addEventListener("error",(function(n){console.warn("Failed to load font from: "+t.url,n),p[t.url]=null,e(null)})),r.addEventListener("abort",(function(n){console.warn("Aborted loading font from: "+t.url,n),e(null)})),r.open("GET",t.url),r.responseType="arraybuffer",r.send()}))}))).then((function(t){return t.filter((function(t){return t})).join("")}))}(g).then((function(t){return f.join("\n")+t}))},m=function(){if(!navigator.msSaveOrOpenBlob&&!("download"in document.createElement("a")))return{popup:window.open()}};r.prepareSvg=function(t,e,n){l(t);var r=e||{},s=r.left,a=void 0===s?0:s,u=r.top,c=void 0===u?0:u,h=r.width,p=r.height,d=r.scale,m=void 0===d?1:d,y=r.responsive,v=void 0!==y&&y,b=r.excludeCss,C=void 0!==b&&b;return function(t){return Promise.all(Array.from(t.querySelectorAll("image")).map((function(t){var e,n=t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("href");return n?((e=n)&&0===e.lastIndexOf("http",0)&&-1===e.lastIndexOf(window.location.host)&&(n+=(-1===n.indexOf("?")?"?":"&")+"t="+(new Date).valueOf()),new Promise((function(e,r){var o=document.createElement("canvas"),i=new Image;i.crossOrigin="anonymous",i.src=n,i.onerror=function(){return r(new Error("Could not load "+n))},i.onload=function(){o.width=i.width,o.height=i.height,o.getContext("2d").drawImage(i,0,0),t.setAttributeNS("http://www.w3.org/1999/xlink","href",o.toDataURL("image/png")),e(!0)}}))):Promise.resolve(null)})))}(t).then((function(){var r=t.cloneNode(!0);r.style.backgroundColor=(e||{}).backgroundColor||t.style.backgroundColor;var s=function(t,e,n,r){if("svg"===t.tagName)return{width:n||f(t,e,"width"),height:r||f(t,e,"height")};if(t.getBBox){var o=t.getBBox(),i=o.x,s=o.y;return{width:i+o.width,height:s+o.height}}}(t,r,h,p),u=s.width,l=s.height;if("svg"!==t.tagName){if(!t.getBBox)return void console.error("Attempted to render non-SVG element",t);null!=r.getAttribute("transform")&&r.setAttribute("transform",r.getAttribute("transform").replace(/translate\(.*?\)/,""));var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.appendChild(r),r=d}if(r.setAttribute("version","1.1"),r.setAttribute("viewBox",[a,c,u,l].join(" ")),r.getAttribute("xmlns")||r.setAttributeNS(o,"xmlns",i),r.getAttribute("xmlns:xlink")||r.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),v?(r.removeAttribute("width"),r.removeAttribute("height"),r.setAttribute("preserveAspectRatio","xMinYMin meet")):(r.setAttribute("width",u*m),r.setAttribute("height",l*m)),Array.from(r.querySelectorAll("foreignObject > *")).forEach((function(t){t.setAttributeNS(o,"xmlns","svg"===t.tagName?i:"http://www.w3.org/1999/xhtml")})),!C)return g(t,e).then((function(t){var e=document.createElement("style");e.setAttribute("type","text/css"),e.innerHTML="<![CDATA[\n"+t+"\n]]>";var o=document.createElement("defs");o.appendChild(e),r.insertBefore(o,r.firstChild);var i=document.createElement("div");i.appendChild(r);var s=i.innerHTML.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href');if("function"!=typeof n)return{src:s,width:u,height:l};n(s,u,l)}));var y=document.createElement("div");y.appendChild(r);var b=y.innerHTML;if("function"!=typeof n)return{src:b,width:u,height:l};n(b,u,l)}))},r.svgAsDataUri=function(t,e,n){return l(t),r.prepareSvg(t,e).then((function(t){var e=t.src,r=t.width,o=t.height,i="data:image/svg+xml;base64,"+window.btoa(decodeURIComponent(encodeURIComponent('<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [<!ENTITY nbsp "&#160;">]>'+e).replace(/%([0-9A-F]{2})/g,(function(t,e){var n=String.fromCharCode("0x"+e);return"%"===n?"%25":n}))));return"function"==typeof n&&n(i,r,o),i}))},r.svgAsPngUri=function(t,e,n){l(t);var o=e||{},i=o.encoderType,s=void 0===i?"image/png":i,a=o.encoderOptions,u=void 0===a?.8:a,c=o.canvg,f=function(t){var e=t.src,r=t.width,o=t.height,i=document.createElement("canvas"),a=i.getContext("2d"),l=window.devicePixelRatio||1;i.width=r*l,i.height=o*l,i.style.width=i.width+"px",i.style.height=i.height+"px",a.setTransform(l,0,0,l,0,0),c?c(i,e):a.drawImage(e,0,0);var f=void 0;try{f=i.toDataURL(s,u)}catch(t){if("undefined"!=typeof SecurityError&&t instanceof SecurityError||"SecurityError"===t.name)return void console.error("Rendered SVG images cannot be downloaded in this browser.");throw t}return"function"==typeof n&&n(f,i.width,i.height),Promise.resolve(f)};return c?r.prepareSvg(t,e).then(f):r.svgAsDataUri(t,e).then((function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){return e(f({src:r,width:r.width,height:r.height}))},r.onerror=function(){n("There was an error loading the data URI as an image on the following SVG\n"+window.atob(t.slice(26))+"Open the following link to see browser's diagnosis\n"+t)},r.src=t}))}))},r.download=function(t,e,n){if(navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(h(e),t);else{var r=document.createElement("a");if("download"in r){r.download=t,r.style.display="none",document.body.appendChild(r);try{var o=h(e),i=URL.createObjectURL(o);r.href=i,r.onclick=function(){return requestAnimationFrame((function(){return URL.revokeObjectURL(i)}))}}catch(t){console.error(t),console.warn("Error while getting object URL. Falling back to string URL."),r.href=e}r.click(),document.body.removeChild(r)}else n&&n.popup&&(n.popup.document.title=t,n.popup.location.replace(e))}},r.saveSvg=function(t,e,n){var o=m();return c(t).then((function(t){return r.svgAsDataUri(t,n||{})})).then((function(t){return r.download(e,t,o)}))},r.saveSvgAsPng=function(t,e,n){var o=m();return c(t).then((function(t){return r.svgAsPngUri(t,n||{})})).then((function(t){return r.download(e,t,o)}))}}()},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var i={},s=[],a=0;a<t.length;a++){var u=t[a],l=r.base?u[0]+r.base:u[0],c=i[l]||0,f="".concat(l," ").concat(c);i[l]=c+1;var h=n(f),p={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==h)e[h].references++,e[h].updater(p);else{var d=o(p,r);r.byIndex=a,e.splice(a,0,{identifier:f,updater:d,references:1})}s.push(f)}return s}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var i=r(t=t||[],o=o||{});return function(t){t=t||[];for(var s=0;s<i.length;s++){var a=n(i[s]);e[a].references--}for(var u=r(t,o),l=0;l<i.length;l++){var c=n(i[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}i=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},686:(t,e,n)=>{"use strict";n.d(e,{AL:()=>r,NO:()=>o});const r=["A","G","C","U"];var o;!function(t){t.HELM="HELM",t.AXOLABS="Axolabs"}(o||(o={}))},670:(t,e,n)=>{"use strict";function r(t,e=!0){let n="\n Datagrok macromolecule handler\n\n";n+=" 0 0 0 0 0 0 999 V3000\n",n+="M V30 BEGIN CTAB\n";let r="",a="",u="";const l=[];let c=0,f=0,h=0;if(t.antiStrands.length>0)for(let e=0;e<t.antiStrands.length;e++)t.antiStrands[e]=o(t.antiStrands[e]);let p=!1;const d=t.senseStrands.concat(t.antiStrands);let g=0;for(let e=0;e<d.length;e++){d[e]=d[e].replaceAll("(-\nM V30 ","(").replaceAll("-\nM V30 ","").replaceAll(" )",")");const n=i(d[e]),o=s(d[e]);if(e>=t.senseStrands.length?!1===p&&(p=!0,h=0):g=Math.min(g,Math.min(...o.y.filter((t=>t<0)))),p){const t=Math.min(...o.x)-h,e=Math.max(...o.y)+5;for(let e=0;e<o.x.length;e++)o.x[e]-=t;for(let t=0;t<o.y.length;t++)o.y[t]-=e-g}let u=d[e].indexOf("M V30 BEGIN ATOM");u=d[e].indexOf("\n",u);let m=u,y=u;for(let t=0;t<n.natom;t++){m=d[e].indexOf("V30",m)+4,y=d[e].indexOf(" ",m);const n=parseInt(d[e].substring(m,y))+c;d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf(" ",m)+1,m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m);let r=Math.round(1e4*o.x[t])/1e4;d[e]=d[e].slice(0,m)+r+d[e].slice(y),m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m),r=Math.round(1e4*o.y[t])/1e4,d[e]=d[e].slice(0,m)+r+d[e].slice(y),m=d[e].indexOf("\n",m)+1}const v=d[e].indexOf("M V30 END ATOM");r+=d[e].substring(u+1,v);let b=d[e].indexOf("M V30 BEGIN BOND");b=d[e].indexOf("\n",b),m=b,y=b;for(let t=0;t<n.nbond;t++){m=d[e].indexOf("V30",m)+4,y=d[e].indexOf(" ",m);const t=parseInt(d[e].substring(m,y))+f;d[e]=d[e].slice(0,m)+t+d[e].slice(y),m=d[e].indexOf(" ",m)+1,m=d[e].indexOf(" ",m)+1,y=d[e].indexOf(" ",m);let n=parseInt(d[e].substring(m,y))+c;d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf(" ",m)+1,y=Math.min(d[e].indexOf("\n",m),d[e].indexOf(" ",m)),n=parseInt(d[e].substring(m,y))+c,d[e]=d[e].slice(0,m)+n+d[e].slice(y),m=d[e].indexOf("\n",m)+1}const C=d[e].indexOf("M V30 END BOND");a+=d[e].substring(b+1,C);let w=d[e].indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==w;){w+=28;const t=d[e].indexOf(")",w);d[e].substring(w,t).split(" ").slice(1).forEach((t=>{l.push(parseInt(t)+c)})),w=t,w=d[e].indexOf("M V30 MDLV30/STEABS ATOMS=(",w)}c+=n.natom,f+=n.nbond,h+=Math.max(...o.x)+5}const m=Math.ceil(l.length/4);u+="M V30 MDLV30/STEABS ATOMS=("+l.length+" -\n";for(let t=0;t<m;t++){u+="M V30 ";const e=t+1===m?l.length-4*(m-1):4;for(let n=0;n<e;n++)u+=n+1===e?t===m-1?l[4*t+n]+")\n":l[4*t+n]+" -\n":l[4*t+n]+" "}return n+="M V30 COUNTS "+c+" "+f+" 0 0 0\n",n+="M V30 BEGIN ATOM\n",n+=r,n+="M V30 END ATOM\n",n+="M V30 BEGIN BOND\n",n+=a,n+="M V30 END BOND\n",e&&l.length>0?(n+="M V30 BEGIN COLLECTION\n",n+=u,n+="M V30 END COLLECTION\n"):n=n.replace(/ CFG=\d/g," "),n+="M V30 END CTAB\n",n+="M END",n}function o(t){const e=s(t),n=e.atomIndex.length,r=(Math.max(...e.x)+Math.min(...e.x))/2,o=(Math.max(...e.y)+Math.min(...e.y))/2;for(let t=0;t<n;t++)e.x[t]-=r,e.y[t]-=o;const i=Math.PI,a=Math.cos(i),u=Math.sin(i);for(let t=0;t<n;t++){const n=e.x[t];e.x[t]=n*a-e.y[t]*u,e.y[t]=n*u+e.y[t]*a}const l=Math.max(...e.y);for(let t=0;t<n;t++)e.x[t]+=r,e.y[t]-=l;let c=t.indexOf("M V30 BEGIN ATOM");c=t.indexOf("\n",c);let f=c;for(let r=0;r<n;r++)c=t.indexOf("V30",c)+4,c=t.indexOf(" ",c)+1,c=t.indexOf(" ",c)+1,f=t.indexOf(" ",c)+1,f=t.indexOf(" ",f),c=(t=t.slice(0,c)+e.x[r]+" "+e.y[r]+t.slice(f)).indexOf("\n",c)+1;return t}function i(t){let e=(t=t.replaceAll("\r","")).indexOf("COUNTS")+7,n=t.indexOf(" ",e);const r=parseInt(t.substring(e,n));return e=n+1,n=t.indexOf(" ",e),{natom:r,nbond:parseInt(t.substring(e,n))}}function s(t){const e=i(t);let n=t.indexOf("M V30 BEGIN ATOM");n=t.indexOf("\n",n);let r=n;const o=Array(e.natom),s=Array(e.natom),a=Array(e.natom),u=Array(e.natom);for(let i=0;i<e.natom;i++)n=t.indexOf("V30",n)+4,r=t.indexOf(" ",n),o[i]=parseInt(t.substring(n,r)),n=r+1,r=t.indexOf(" ",n),s[i]=t.substring(n,r),n=r+1,r=t.indexOf(" ",n),a[i]=parseFloat(t.substring(n,r)),n=r+1,r=t.indexOf(" ",n),u[i]=parseFloat(t.substring(n,r)),n=t.indexOf("\n",n)+1;return{atomIndex:o,atomType:s,x:a,y:u}}n.d(e,{cx:()=>s,vS:()=>r})},537:(t,e,n)=>{"use strict";n.d(e,{iL:()=>i,q7:()=>o,ti:()=>r});const r={NUCLEOSIDE:"nucleoside",LINKAGE:"phosphateBackbone"},o="p",i="<?>"},480:(t,e,n)=>{"use strict";n.d(e,{C6:()=>u,Hs:()=>a,OT:()=>l,bD:()=>s});var r=n(686),o=n(67),i=n(537);function s(t,e,n,o){const i=Object.keys(o.jsonData.codesToHelmDict).concat([r.NO.HELM]);if(!t||-1!==e&&n!==r.NO.HELM)return{};if(!i.includes(n))throw new Error(`${n} format is not supported by SequenceTranslator`);const s=i.filter((t=>t!=n)).sort(((t,e)=>t.localeCompare(e))),u=o.createFormatConverter(t,n),l=Object.fromEntries(s.map((t=>{let e;try{e=u.convertTo(t)}catch{e=null}return[t,e]})).filter((([t,e])=>e))),c=a(n===r.NO.HELM?t:l[r.NO.HELM],o.monomerLibWrapper);return c&&(l.Nucleotides=c),l}function a(t,e){const n=new RegExp("\\([^()]*\\)","g"),o=t.match(n);return o?o.map((t=>{const n=t.replace(/[\[\]()]/g,"");return r.AL.includes(n)?n:e.getNaturalAnalogBySymbol(n)})).map((t=>t||i.iL)).join(""):null}function u(t,e,n,i){const s=i.createFormatConverter(t,e);return n===o.qP?a(s.convertTo(r.NO.HELM),i.monomerLibWrapper):s.convertTo(n)}function l(t){return Object.keys(t.jsonData.codesToHelmDict).concat([r.NO.HELM,o.qP]).sort()}},67:(t,e,n)=>{"use strict";n.d(e,{U_:()=>o,n_:()=>r,qP:()=>i});const r="Copied",o="Copy sequence",i="Nucleotides"},511:(t,e,n)=>{"use strict";n.d(e,{_package:()=>Wt,applyNotationProviderForCyclized:()=>qt});var r=n(328),o=n(82),i=n(439);const s=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}};o.SemanticValue;var a=n(890);class u{constructor(t,e,n=""){this.target=t,this.debugEnabled=e,this.prefix=n}error(t,e,n){return this.target.error(this.prefix+t,e,n)}warning(t,e){return this.target.warning(this.prefix+t,e)}info(t,e){return this.target.info(this.prefix+t,e)}debug(t,e){if(this.debugEnabled)return this.target.debug(this.prefix+t,e)}}const l="System:AppData/SequenceTranslator/monomers-sample",c="pattern-app-data.json",f="formats-to-helm.json",h="codes-to-symbols.json",p="linkers.json";var d=n(686);function g(t){return t.sort(((t,e)=>e.length-t.length))}class m{constructor(t,e){this.sequence=t,this.th=e,this.libWrapper=this.th.monomerLibWrapper}getInvalidCodeIndex(t){if(t===d.NO.HELM)return this.sequence.length;const e=["r","d"],n=g(this.libWrapper.getCodesByFormat(t));let r=0;for(;r<this.sequence.length;){const t=n.find((t=>t===this.sequence.substring(r,r+t.length)));if(!t)break;if(r>1&&d.AL.includes(this.sequence[r])&&e.includes(this.sequence[r-2]))break;if(e.includes(this.sequence[r+1])&&d.AL.includes(this.sequence[r])){r++;break}r+=t.length}return r===this.sequence.length&&(r=-1),r}isValidSequence(t){return-1===this.getInvalidCodeIndex(t)}}class y{constructor(t,e,n,r){this.patternAppData=t,this.codesToHelmDict=e,this.codesToSymbolsDict=n,this.monomersWithPhosphate=r}}async function v(t){const e=await Promise.all([c,f,h,p].map((e=>async function(t,e){const n=t.endsWith("/")?`${t}${e}`:`${t}/${e}`;try{const t=await r.dapi.files.readAsText(n);return JSON.parse(t)}catch(t){console.error(`Error loading json from '${n}':`,t)}}(t,e))));return new y(e[0],e[1],e[2],e[3])}class b{constructor(t,e){if(this.lib=t,this.jsonData=e,null===this.lib)throw new Error("SequenceTranslator: monomer library is null");this.allMonomers=this.getAllMonomers()}formatMonomerForViewer(t){const e={};return e.name=t.symbol,e.symbol=t.symbol,e.molfile=t.molfile,this.getAllFormats().forEach((n=>{if(n===d.NO.HELM)return;const r=this.jsonData.codesToSymbolsDict[n],o=Object.keys(r).filter((e=>r[e]===t.symbol));e[n]=o.join(", ")})),e}getAllMonomers(){const t=this.lib.getPolymerTypes();let e=[];for(const n of t){const t=this.lib.getMonomerSymbolsByType(n).map((t=>this.lib.getMonomer(n,t))).filter((t=>null!==t));e=e.concat(t)}return e}getMonomer(t){const e=this.lib.getMonomer("RNA",t);if(void 0===e)throw new Error(`SequenceTranslator: no monomer with symbol ${t}`);return e}getMolfileBySymbol(t){return this.getMonomer(t).molfile}getNaturalAnalogBySymbol(t){const e=this.getMonomer(t).naturalAnalog;if(!e)throw new Error(`ST: no natural analog for ${t}`);return e}isModification(t){return!!this.getMolfileBySymbol(t).includes("MODIFICATION")}getCodeToSymbolMap(t){return new Map(Object.entries(this.jsonData.codesToSymbolsDict[t]))}getCodesByFormat(t){return Object.keys(this.jsonData.codesToSymbolsDict[t])}getAllFormats(){return Object.keys(this.jsonData.codesToSymbolsDict)}getTableForViewer(){const t=this.allMonomers.map((t=>this.formatMonomerForViewer(t)));return o.DataFrame.fromObjects(t)}getCodesToWeightsMap(){const t=new Map;return Object.entries(this.jsonData.codesToSymbolsDict).forEach((([e,n])=>{Object.entries(n).forEach((([e,n])=>{const r=this.getMonomer(n),o=r.meta?.molecularWeight;t.set(e,o)}))})),t}}var C=n(537);const w=(t,e)=>e.length-t.length;class A{constructor(t){this.th=t,this.formats=this.getFormats()}getFormatNames(){return this.formats.sort()}getCodesByFormat(t){if(this.validateFormat(t),this.isHelm(t))throw new Error("Codes cannot be obtained for HELM");return this.getFormatCodes(t)}getHelmToFormatDict(t){return this.validateFormat(t),function(t){const e={};return Object.values(t).forEach((t=>{Object.entries(t).forEach((([t,n])=>{const r=n.replace(/\)p/g,")").replace(/\]p/g,"]");void 0===e[r]?e[r]=[t]:e[r].push(t)}))})),Object.entries(e).forEach((([t,n])=>{const r=n.sort(w);e[t]=r[0]})),e}(this.th.jsonData.codesToHelmDict[t])}getFormatToHelmDict(t){this.validateFormat(t);const e=this.th.jsonData.codesToHelmDict[t];return Object.assign({},...Object.values(e))}getTargetFormatHelmCodes(t){this.validateFormat(t);const e=this.getHelmToFormatDict(t);return Object.keys(e).sort(w)}getTargetFormatHelmCodesRegExp(t){this.validateFormat(t);const e=this.getTargetFormatHelmCodes(t);return new RegExp(E(e)+"|.","g")}getFormatRegExp(t){if(this.validateFormat(t),this.isHelm(t))throw new Error("Helm RegExp can be built for non-HELM target formats");return this.getNonHelmFormatRegExp(t)}getPhosphateHelmCodesRegExp(t){this.validateFormat(t);const e=this.th.jsonData.codesToHelmDict[t],n=E(Array.from(new Set(Object.values(e[C.ti.LINKAGE]))).sort(w));return new RegExp(`${C.q7}.(${n})`,"g")}isValidFormat(t){return this.formats.includes(t)}getFormats(){return Object.keys(this.th.jsonData.codesToHelmDict)}validateFormat(t){if(!this.isValidFormat(t))throw new Error(`Invalid format: ${t}`)}isHelm(t){return t===d.NO.HELM}getFormatCodes(t){const e=this.getFormatToHelmDict(t);return Object.keys(e).sort(w)}getNonHelmFormatRegExp(t){const e=this.getCodesByFormat(t);return new RegExp(E(e)+"|\\([^()]*\\)|.","g")}}function E(t){return t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).map((t=>t.includes("(")||t.includes(")")?t:`(?<!\\([^()]*)${t}(?![^()]*\\))`)).join("|")}const _={LEFT:"RNA1{",RIGHT:"}$$$$"};class x{constructor(t,e,n){this.sequence=t,this.sourceFormat=e,this.th=n,this.formats=new A(this.th)}convertTo(t){const e=this.formats.getFormatNames();if(this.sourceFormat===d.NO.HELM&&e.includes(t))return this.helmToFormat(this.sequence,t);if(e.includes(this.sourceFormat)&&t===d.NO.HELM)return this.formatToHelm(this.sequence,this.sourceFormat);if([this.sourceFormat,t].every((t=>e.includes(t)))){const e=this.formatToHelm(this.sequence,this.sourceFormat);return this.helmToFormat(e,t)}throw new Error(`ST: unsupported translation direction ${this.sourceFormat} -> ${t}`)}helmToFormat(t,e){const n=new RegExp(E(Object.values(_)),"g");let r=t.replace(n,"");const o=this.formats.getHelmToFormatDict(e),i=this.formats.getTargetFormatHelmCodes(e),s=this.formats.getTargetFormatHelmCodesRegExp(e);return r=r.replace(s,(t=>i.includes(t)?o[t]:"p"===t||"."===t?t:"?")).replace(/\?+/g,C.iL).replace(/p\.|\./g,""),r=r.replace(/<empty>/g,""),r=r.replace(/\/\//g,"/"),r}formatToHelm(t,e){const n=this.formats.getFormatToHelmDict(e),r=this.formats.getCodesByFormat(e),o=this.formats.getFormatRegExp(e),i=this.formats.getPhosphateHelmCodesRegExp(e);let s=t?t.replace(o,(t=>r.includes(t)?n[t]+".":"?")):"";return s=s.replace(/\?+/g,`${C.iL}.`),s=s.slice(0,-1),s[s.length-1]===C.q7&&(s=s.slice(0,-1)),s=s.replace(i,((t,e)=>e)),s=s.replace(/<empty>/g,""),`${_.LEFT+s+_.RIGHT}`}}class T{constructor(t,e){this.sequence=t,this.th=e,this.libWrapper=this.th.monomerLibWrapper,this.formats=Object.keys(this.th.jsonData.codesToHelmDict)}getFormat(){if(this.sequence.startsWith("RNA"))return d.NO.HELM;const t=this.getListOfPossibleSynthesizersByFirstMatchedCode();if(0===t.length)return null;const e=this.th.createSequenceValidator(this.sequence),n=Array(t.length).fill(0);for(let r=0;r<t.length;++r){const o=t[r];n[r]=e.getInvalidCodeIndex(o)}const r=n.some((t=>-1===t))?-1:Math.max(...n);return t[n.indexOf(r)]}getListOfPossibleSynthesizersByFirstMatchedCode(){const t=this.sequence,e=[];for(const n of this.formats){const r=g(this.libWrapper.getCodesByFormat(n));let o=0;for(let e=0;e<t.length;e++)if(")"===t[e]&&e!==t.length-1){o=e+1;break}r.some((e=>e===t.slice(o,o+e.length)))&&e.push(n)}return e}}var I=n(389);const P=$;var S=n.n(P);class L extends o.Package{get helmHelper(){if(!this._helmHelper)throw new Error("Package SequenceTranslator .helmHelper is not initialized");return this._helmHelper}get seqHelper(){return this._helmHelper.seqHelper}get monomerLib(){if(!this._monomerLib)throw new Error("Monomer lib not loaded");return this._monomerLib}get jsonData(){if(!this._jsonData)throw new Error("Json data not loaded");return this._jsonData}get monomerLibWrapper(){if(!this._monomerLibWrapper)throw new Error("Monomer lib wrapper not loaded");return this._monomerLibWrapper}get initPromise(){return this._initPromise}constructor(t={debug:!1}){super(),this.highlightInvalidSubsequence=t=>function(t,e){let n=0;const r=e.createFormatDetector(t).getFormat();null!==r&&(n=new m(t,e).getInvalidCodeIndex(r));const o=n<0||""===t,i=I.span([]);S()(i).css("-webkit-text-fill-color","var(--grey-6)");const s=I.span([]);return S()(s).css("-webkit-text-fill-color","red"),o?i.innerHTML=t:(i.innerHTML=t.slice(0,n),s.innerHTML=t.slice(n)),[i,s]}(t,this),super._logger=new u(super.logger,t.debug)}startInit(t){this._initPromise=t}completeInit(t){this._helmHelper=t}async initLibData(){return this.initLibDataPromise||(this.initLibDataPromise=(async()=>{let t=(await this.getSettings()).MonomersPath;t&&await r.dapi.files.exists(t)||(this.logger.warning(`Monomers path '${t}' not found. Fallback to monomers sample path '${l}'.`),t=l),[this._jsonData,this._monomerLib]=await Promise.all([v(t),M(t)]),this._monomerLibWrapper=new b(this.monomerLib,this.jsonData)})()),this.initLibDataPromise}async getTranslationHelper(){return await r.functions.call(`${this.name}:getTranslationHelper`)}createSequenceValidator(t){return new m(t,this)}createFormatConverter(t,e){return new x(t,e,this)}createFormatDetector(t){return new T(t,this)}}async function M(t){const e=o.TaskBarProgressIndicator.create("Initializing Oligo Toolkit monomer library ...");try{const e=await(0,a.pj)();return await e.readLibrary(t,"monomer-lib.json")}finally{e.close()}}const N=["SS","AS"],O={SS:"Sense strand",AS:"Anti sense"},R=["3'","5'"];var D,H,F,B;!function(t){t.IS_ANTISENSE_STRAND_INCLUDED="isAntisenseStrandIncluded",t.NUCLEOTIDE_SEQUENCES="nucleotideSequences",t.PHOSPHOROTHIOATE_LINKAGE_FLAGS="phosphorothioateLinkageFlags",t.STRAND_TERMINUS_MODIFICATIONS="strandTerminusModifications"}(D||(D={})),function(t){t.PATTERN_NAME="patternName",t.PATTERN_COMMENT="patternComment",t.NUCLEOTIDES_WITH_NUMERIC_LABELS="nucleotidesWithNumericLabels"}(H||(H={})),function(t){t.PATTERN_CONFIG="patternConfig",t.AUTHOR_ID="authorID",t.DATE="date"}(F||(F={})),function(t){t.CREATE="create",t.MODIFY="modify"}(B||(B={})),D.IS_ANTISENSE_STRAND_INCLUDED,D.NUCLEOTIDE_SEQUENCES,D.PHOSPHOROTHIOATE_LINKAGE_FLAGS,D.STRAND_TERMINUS_MODIFICATIONS,H.PATTERN_NAME,H.PATTERN_COMMENT,H.NUCLEOTIDES_WITH_NUMERIC_LABELS,Error,Error,n(802);const k=rxjs;var G;rxjs.operators,function(t){t.getTruncatedStrandData=function(t,e,n){return{nucleotides:t.slice(0,n),ptoFlags:e.slice(0,n+1)}},t.getExtendedStrandData=function(t,e,n,r){const o=n-t.length,i=t.concat(new Array(n-t.length).fill(r)),s=0===t.length?n+1:o;return{nucleotides:i,ptoFlags:e.concat(new Array(s).fill(!0))}}}(G||(G={}));var j=n(543),U=n.n(j),V=n(72),W=n.n(V),q=n(825),Y=n.n(q),K=n(659),z=n.n(K),J=n(56),Q=n.n(J),X=n(540),Z=n.n(X),tt=n(113),et=n.n(tt),nt=n(252),rt={};rt.styleTagTransform=et(),rt.setAttributes=Q(),rt.insert=z().bind(null,"head"),rt.domAPI=Y(),rt.insertStyleElement=Z(),W()(nt.A,rt),nt.A&&nt.A.locals&&nt.A.locals;class ot{constructor(t,e,n){this.eventBus=t,this.initialPatternConfig=e,this.subscriptions=n}create(){return I.divV([I.h1("PTO"),I.divH([this.createAllPtoActivationInput().root,...this.createFirstPtoInputs().map((t=>t.root))],{style:{gap:"12px"}})])}areAllPtoLinkagesSet(t){return N.map((e=>t[e].filter((t=>t)).length)).reduce(((t,e)=>t+e),0)===N.map((t=>this.initialPatternConfig.nucleotideSequences[t].length)).reduce(((t,e)=>t+e),0)+N.filter((e=>t[e].length)).length}createAllPtoActivationInput(){const t=this.initialPatternConfig.phosphorothioateLinkageFlags,e=this.areAllPtoLinkagesSet(t),n=I.input.bool("All PTO",{value:e});n.onInput.subscribe((()=>{const t=n.value;this.eventBus.setAllPTOLinkages(t)}));const r=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((()=>{const t=this.eventBus.getPatternConfig().phosphorothioateLinkageFlags,e=this.areAllPtoLinkagesSet(t);n.value=e}));return this.subscriptions.add(r),this.addStyleToPtoInput(n),I.tooltip.bind(n.captionLabel,"Activate all phosphothioates"),n}addStyleToPtoInput(t){const e=t.captionLabel;e.classList.add("ui-label-right"),Object.assign(e.style,{textAlign:"left",maxWidth:"100px",minWidth:"40px",width:"auto"})}createFirstPtoInputs(){return N.map((t=>{if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return;const e=this.isFirstPtoActive(t),n=I.input.bool(`First ${t} PTO`,{value:e});n.onInput.subscribe((()=>{const e=n.value;this.eventBus.setPhosphorothioateLinkageFlag(t,0,e)}));const r=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((e=>{const r=e[t][0];n.value=r}));return this.subscriptions.add(r),this.addStyleToPtoInput(n),I.tooltip.bind(n.captionLabel,`Activate first phosphothioate in ${t}`),n})).filter((t=>void 0!==t))}isFirstPtoActive(t){return this.initialPatternConfig.phosphorothioateLinkageFlags[t][0]}}class it{constructor(t,e,n){this.eventBus=t,this.dataManager=e,this.subscriptions=n;const r=this.eventBus.nucleotideSequencesChanged$.subscribe((()=>{this.displayedInputLabels=this.computeDisplayedInputLabels()}));this.subscriptions.add(r)}create(){const t=N.map((t=>this.constructControlsPanel(t)));return I.divH(t,{style:{gap:"24px"}})}constructControlsPanel(t){if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return I.div([]);const e=this.constructHeader(),n=this.createControls(t);return I.block([I.h1(`${O[t]}`),e,n],{style:{paddingTop:"12px"}})}constructHeader(){return I.divH([I.div([I.divText("#")],{style:{width:"20px"}}),I.block75([I.divText("Modification")]),I.div([I.divText("PTO")])])}createControls(t){const e=this.createNucleobaseInputs(t),n=this.createLabelDivs(t),r=this.createPTOFlagInputs(t);return I.div(e.map(((t,e)=>I.divH([n[e],I.block75([t.root]),r[e].root],{style:{alignItems:"center"}}))))}createNucleobaseInputs(t){const e=this.dataManager.fetchAvailableNucleotideBases().sort(((t,e)=>t.toLowerCase().localeCompare(e.toLowerCase())));return this.eventBus.getNucleotideSequences()[t].map(((n,r)=>{const o=I.input.choice("",{value:n,items:e});return o.onInput.subscribe((()=>{const e=o.value;this.eventBus.setNucleotide(t,r,e)})),o}))}createPTOFlagInputs(t){return this.eventBus.getPhosphorothioateLinkageFlags()[t].slice(1).map(((e,n)=>{const r=I.input.bool("",{value:e});r.onInput.subscribe((()=>{const e=r.value;this.eventBus.setPhosphorothioateLinkageFlag(t,n+1,e)}));const o=this.eventBus.phosphorothioateLingeFlagsChanged$.subscribe((e=>{const o=e[t][n+1];r.value=o}));return this.subscriptions.add(o),r}))}computeDisplayedInputLabels(){const t=this.eventBus.getNucleotideSequences(),e=new Map;return N.forEach((n=>{let r=1;const o=t[n].map((t=>{if(function(t){return t.endsWith("(o)")}(t))return"";const e=String(r);return r++,e}));e.set(n,o)})),e}createLabelDivs(t){const e=this.createLabels(t).map((t=>I.div([t],{style:{width:"20px"}}))),n=this.eventBus.nucleotideSequencesChanged$.subscribe((()=>{this.createLabels(t).forEach(((t,n)=>{S()(e[n]).empty(),S()(e[n]).append(t)}))}));return this.subscriptions.add(n),e}createLabels(t){return this.eventBus.getNucleotideSequences()[t].map(((e,n)=>{const r=this.displayedInputLabels.get(t)[n];return I.label(r)}))}}class st{constructor(){this.rxjsSubscriptions=[],this.dgSubscriptions=[]}add(t){t instanceof k.Subscription?this.rxjsSubscriptions.push(t):this.dgSubscriptions.push(t)}unsubscribeAll(){for(const t of[this.rxjsSubscriptions,this.dgSubscriptions])t.forEach((t=>t.unsubscribe())),t.length=0}}class at{constructor(t,e){this.eventBus=t,this.dataManager=e,this.subscriptions=new st}static open(t,e){at.isDialogOpen||(at.instance||(at.instance=new at(t,e)),at.instance.openDialog())}openDialog(){this.initialPatternConfig=U().cloneDeep(this.eventBus.getPatternConfig()),at.isDialogOpen=!0,this.createDialog().show()}createDialog(){const t=I.divV([]);this.subscriptions.add(this.eventBus.strandsUpdated$.subscribe((()=>this.onStrandsUpdated(t))));const e=I.dialog("Edit strands").add(t).onOK((()=>{})).onCancel((()=>this.resetToInitialState()));return this.subscriptions.add(e.onClose.subscribe((()=>{at.isDialogOpen=!1,this.subscriptions.unsubscribeAll()}))),e}onStrandsUpdated(t){const e=new ot(this.eventBus,this.initialPatternConfig,this.subscriptions).create(),n=new it(this.eventBus,this.dataManager,this.subscriptions).create();S()(t).empty(),S()(t).append(e,n)}resetToInitialState(){this.eventBus.setPatternConfig(this.initialPatternConfig)}}at.isDialogOpen=!1;class ut{constructor(t){this.eventBus=t,this.subscriptions=new st}static open(t){ut.isDialogOpen||(ut.instance||(ut.instance=new ut(t)),ut.instance.openDialog())}openDialog(){this.initialPatternConfig=U().cloneDeep(this.eventBus.getPatternConfig()),ut.isDialogOpen=!0,this.createDialog().show()}createDialog(){const t=I.divV([]);this.subscriptions.add(this.eventBus.strandsUpdated$.subscribe((()=>this.onStrandsUpdated(t))));const e=I.dialog("Edit terminal modifications").add(t).onOK((()=>{})).onCancel((()=>this.resetToInitialState()));return this.subscriptions.add(e.onClose.subscribe((()=>{ut.isDialogOpen=!1,this.subscriptions.unsubscribeAll()}))),e}onStrandsUpdated(t){const e=new lt(this.eventBus).create();S()(t).empty(),S()(t).append(e)}resetToInitialState(){this.eventBus.setPatternConfig(this.initialPatternConfig)}}ut.isDialogOpen=!1;class lt{constructor(t){this.eventBus=t}create(){const t=N.map((t=>this.constructControlsPanel(t)));return I.divH(t,{style:{gap:"24px"}})}constructControlsPanel(t){if(!this.eventBus.isAntisenseStrandActive()&&"AS"===t)return I.div([]);const e=this.createInputs(t);return I.block([I.h1(`${O[t]}`),e],{style:{paddingTop:"12px"}})}createInputs(t){const e=("SS"===t?[...R].reverse():R).map((e=>this.createInputForTerminus(t,e)));return I.form(e)}createInputForTerminus(t,e){const n=this.eventBus.getTerminalModifications()[t][e],r=I.input.textArea(e,{value:n});return this.applyStylingToInput(r),r.onInput.subscribe((()=>{const n=r.value;null!==n&&this.eventBus.updateTerminusModification(t,e,n)})),r}applyStylingToInput(t){const e=t.root.getElementsByTagName("textarea")[0];S()(e).css("resize","none")}}n(146);var ct=n(507),ft={};ft.styleTagTransform=et(),ft.setAttributes=Q(),ft.insert=z().bind(null,"head"),ft.domAPI=Y(),ft.insertStyleElement=Z(),W()(ct.A,ft),ct.A&&ct.A.locals&&ct.A.locals;var ht,pt=n(74),dt={};dt.styleTagTransform=et(),dt.setAttributes=Q(),dt.insert=z().bind(null,"head"),dt.domAPI=Y(),dt.insertStyleElement=Z(),W()(pt.A,dt),pt.A&&pt.A.locals&&pt.A.locals,function(t){t.TYPE="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t[t.MAX_ATOM_COUNT=999]="MAX_ATOM_COUNT",t.RGP_LINE_START="M RGP",t.ATOM_ALIAS_LINE_START="A ",t.END="M END"}(ht||(ht={})),Error,Error,n(670);var gt=n(3);n(480),n(67);var mt=n(254),yt={};yt.styleTagTransform=et(),yt.setAttributes=Q(),yt.insert=z().bind(null,"head"),yt.domAPI=Y(),yt.insertStyleElement=Z(),W()(mt.A,yt),mt.A&&mt.A.locals&&mt.A.locals;var vt=n(70);n(124);var bt=n(312),Ct=n(991),wt=n.n(Ct);"object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,new Set;const At="object"==typeof process&&process?process:{};let Et=globalThis.AbortController,_t=globalThis.AbortSignal;if(void 0===Et){_t=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(t,e){this._onabort.push(e)}},Et=class{constructor(){e()}signal=new _t;abort(t){if(!this.signal.aborted){this.signal.reason=t,this.signal.aborted=!0;for(const e of this.signal._onabort)e(t);this.signal.onabort?.(t)}}};let t="1"!==At.env?.LRU_CACHE_IGNORE_AC_WARNING;const e=()=>{var n,r,o,i;t&&(t=!1,n="AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.",r="NO_ABORT_CONTROLLER",o="ENOTSUP",i=e,"function"==typeof At.emitWarning?At.emitWarning(n,r,o,i):console.error(`[${o}] ${r}: ${n}`))}}Symbol("type"),Symbol.iterator,Symbol.toStringTag,Map,n(151);var xt=n(599);function Tt(t,e){const n=t.tableColumn;if(!n)return;const r=function(t){return t.temp.MonomerHoverLinks??[]}(n);for(let n=r.length-1;n>=0;--n){const o=r[n],i=t.grid.col(o.targetCol.name);if(i&&!o.handler(t,e,i))break}}n(717),n(699),n(229),n(125);class It extends o.InputBase{constructor(t,e){super(I.input.column(t,e).dart,e?.onValueChanged),this.options=e}setColumnInputTable(t){I.input.setColumnInputTable(this,t,this.options?.filter)}}I.input.column2=function(t,e){return new It(t,e)},n(296),n(820),o.JsInputBase,o.JsInputBase;var Pt,St=n(269);!function(t){t.table="table",t.seqCol="seqCol",t.generateHelm="generateHelm",t.chiralityEngine="chiralityEngine",t.rules="rules"}(Pt||(Pt={}));var Lt=n(291);class Mt{onKeyDown(t,e){}onKeyPress(t,e){}onMouseEnter(t,e){}onMouseLeave(t,e){}onMouseDown(t,e){}onMouseUp(t,e){}onMouseMove(t,e){}onClick(t,e){}onDoubleClick(t,e){}}class Nt extends Mt{constructor(t,e,n){super(),this.gridCol=t,this.tableCol=e,this.logger=n,this.subs=[],this.dirty=!0,this.destroyed=!1,this.viewerId=++Nt.viewerCounter,this.errors=[],this._onRendered=new k.Subject,this.tableCol&&this.tableCol.dataFrame&&this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{this.dirty=!0}))),this.tableCol&&this.subs.push(r.events.onTableRemoved.subscribe((t=>{try{const e=t.args.dataFrame;this.tableCol?.dataFrame.id!==e.id||this.destroyed||this.destroy()}catch(t){this.logger.error(t)}}))),this.gridCol&&this.subs.push(r.events.onViewRemoving.subscribe((t=>{try{const e=t.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===e.id&&!this.destroyed&&this.destroy()}catch(t){this.logger.error(t)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const t of this.subs)t.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}reset(){this.dirty=!1}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`${t} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,vt.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,`${n}, ${e}`),this.errors.length>0){const t=this.errors[0];throw this.errors=[],t}this.logger.debug(`${n}, end`)}}Nt.viewerCounter=-1;var Ot=n(192);const $t=Lt.zS;var Rt,Dt,Ht;!function(t){t.maxMonomerLength=".mm.cellRenderer.maxMonomerLength"}(Rt||(Rt={})),function(t){t.applyToBackground=".m.cellRenderer.applyToBackground"}(Dt||(Dt={})),function(t){t.MSA="MSA",t.classic="classic"}(Ht||(Ht={}));const Ft=new class{constructor(){this.color="rgb(100,100,100)",this.pivot=0,this.left=!1,this.transparencyRate=1,this.separator="",this.last=!1,this.drawStyle=Ht.classic,this.maxWord=[],this.wordIdx=0,this.gridCell=null,this.referenceSequence=null,this.maxLengthOfMonomer=null,this.monomerTextSizeMap={},this.logger=void 0}};function Bt(t,e,n,r,o,i,s){var a,u,l;const c=Object.assign(Object.assign({},Ft),s);s.logger?.debug("Bio: printLeftOrCentered(), start"),t.textAlign="start";let f=e.substring(0),h=c.last?"":c.separator;c.drawStyle===Ht.MSA&&(h="");let p=!0,d=!0,g="difference";if(null!=c.gridCell&&null!=c.gridCell.cell.column&&(p=c.gridCell.cell.column.temp["color-code"]??!0,d=c.gridCell.cell.column.temp["compare-with-current"]??!0,g=c.gridCell.cell.column.temp["highlight-difference"]??"difference"),c.referenceSequence){const t=c.referenceSequence[c.wordIdx];d&&c.referenceSequence.length>0&&"difference"===g&&(c.transparencyRate=f==t?.3:c.transparencyRate),d&&c.referenceSequence.length>0&&"equal"===g&&(c.transparencyRate=f!=t?.3:c.transparencyRate)}null!=c.maxLengthOfMonomer&&(f=$t(f,c.maxLengthOfMonomer));const m=f+h;(a=c.monomerTextSizeMap)[m]??(a[m]=t.measureText(m));let y=c.monomerTextSizeMap[m];(u=c.monomerTextSizeMap)[f]??(u[f]=t.measureText(f));let v=c.monomerTextSizeMap[f].width;const b=i/2-(y.fontBoundingBoxAscent+y.fontBoundingBoxDescent)/2+1;(l=c.monomerTextSizeMap)[h]??(l[h]=t.measureText(h));const C=c.monomerTextSizeMap[h].width;function w(e,o){const i=p?c.color:"rgb(0,0,0)";t.fillStyle=i,t.globalAlpha=c.transparencyRate,c.drawStyle===Ht.classic&&(t.fillText(f,n+e,r+b),t.fillStyle="#808080",t.fillText(h,n+o,r+b)),c.drawStyle===Ht.MSA&&t.fillText(f,n+e,r+b)}y=y.width,c.drawStyle===Ht.MSA&&(v=c.maxWord[c.wordIdx],y=c.maxWord[c.wordIdx]);const A=(c.maxWord[c.wordIdx]??0)-(c.maxWord[0]??0);if(c.left||y>o)return w(A,A+v),n+A+v+C;{const t=(o-y)/2;return w(t,t+v),n+A+t+v}}const kt="rgb(100,100,100)";class Gt extends Nt{constructor(t,e,n,r,i){super(t,e,n),this.monomerLengthLimit=r,this.propsProvider=i,this.colWidth=0,this._monomerLengthList=null,this.separatorWidth=5,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this.sysMonomerLib=null,this.padding=5,this.props=this.propsProvider(),this._processedRows=o.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),this.tableCol&&this.gridCol&&this.subs.push(this.tableCol.dataFrame.onCurrentRowChanged.subscribe((()=>{const t=this.tableCol.dataFrame;this.gridCol.grid,-1===t.currentRowIdx&&(this.tableCol.temp["reference-sequence"]=null,this.tableCol.temp["current-word"]=null,this.invalidateGrid())})))}async init(){await Promise.all([(async()=>{this.seqHelper=await(0,bt.Q)(),this.invalidateGrid()})(),(async()=>{const t=await(0,a.pj)();this.sysMonomerLib=t.getMonomerLib()})()]),this.subs.push(this.sysMonomerLib.onChanged.subscribe((()=>{this.reset()}))),this.reset()}toLog(){return`MonomerPlacer<${this.viewerId}>`}getMonomerLib(){return this.tableCol.temp[".mm.cellRenderer.overriddenLibrary"]??this.sysMonomerLib}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=o.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={},super.reset(),this.invalidateGrid()}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}getCellMonomerLengths(t,e){const n=this.seqHelper.getSeqHandler(this.tableCol);if(this.colWidth<e&&(this.colWidth=e,this.dirty=!0),this.dirty)try{this.reset()}catch(t){const[e,n]=(0,Ot.AP)(t);this.logger.error(e,void 0,n)}const r=n.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(t),o=new Array(r.length+1);o[0]=5;for(let t=1;t<o.length;t++)o[t]=o[t-1]+r[t-1];return[r,o]}getCellMonomerLengthsForSeq(t){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const e=this.seqHelper.getSeqHandler(this.tableCol),n=this.props.separatorWidth+1*this.props.monomerCharWidth,r=Math.ceil(this.colWidth/n),o=e.getSplitted(t),i=Math.min(r,o.length);let s=this._monomerLengthList[t];if(null===s||s.length<i){s=this._monomerLengthList[t]=new Array(o.length);let n=0;for(let t=0;t<i;++t){const r=o.getOriginal(t),i=this.props.monomerToShort(r,this.monomerLengthLimit),a=(e.isSeparator()?this.separatorWidth:this.props.separatorWidth)+i.length*this.props.monomerCharWidth;if(s[t]=a,n+=a,n>this.colWidth)break}}return s}getCellMonomerLengthsForSeqMsa(){var t;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(t=this._monomerLengthList)[0]??(t[0]=new Array(0));const e=this._monomerLengthList[0],{startIdx:n,endIdx:r}=(()=>{try{const t=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return t&&t.dart?{startIdx:Math.max(Math.floor((t?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((t?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(t){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),o=this.props.separatorWidth+1*this.props.monomerCharWidth,i=Math.ceil(this.colWidth/o);for(let t=n;t<r;t++){if(this._processedRows.get(t)&&i<=this._processedMaxVisibleSeqLength)continue;const n=this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t,i),r=Math.min(i,n.length);r>e.length&&e.push(...new Array(r-e.length).fill(o));let s=0;for(let t=0;t<r;++t){const r=n.getOriginal(t),o=this.props.monomerToShort(r,this.monomerLengthLimit),i=this.props.separatorWidth+o.length*this.props.monomerCharWidth;if(e[t]=Math.max(e[t]??0,i),s+=i,s>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,i)}return e}getPosition(t,e,n){const[r,o]=this.getCellMonomerLengths(t,n);return 0===this.seqHelper.getSeqHandler(this.tableCol).getSplitted(t).length?null:function(t,e){let n,r=100,o=0,i=t.length-1;for(;o<=i;){if(n=Math.floor((i+o)/2),t[n]<=e&&e<t[n+1])return n;if(e<t[n]?i=n-1:o=n+1,--r<=0)throw new Error(`Get position for pointer x = ${e} searching has not converged on ${JSON.stringify(t)}. `)}return null}(o,e)}setMonomerLengthLimit(t){this.monomerLengthLimit!=t&&(this.monomerLengthLimit=t,this.dirty=!0)}setSeparatorWidth(t){this.separatorWidth!=t&&(this.props.separatorWidth=t,this.dirty=!0)}render(t,e,n,r,o,i,s){if(!this.seqHelper)return;const a=this.gridCol,u=this.tableCol,l=window.devicePixelRatio,c=`${this.toLog()}.render()`;this.logger.debug(`${c}, start`);let f=this.monomerLengthLimit;if(Rt.maxMonomerLength in u.tags){const t=parseInt(u.getTag(Rt.maxMonomerLength));f=!isNaN(t)&&t?t:50}if(".mm.cellRenderer.maxMonomerLength"in u.temp){const t=u.temp[".mm.cellRenderer.maxMonomerLength"];f=!isNaN(t)&&t?t:50}t.save();try{const s=this.seqHelper.getSeqHandler(u);if("1"===u.temp[".mm.cellRenderer.settingsChanged"]||this.monomerLengthLimit!=f){let t=0;const e=8;t=u.temp[".mm.cellRenderer.gapLength"]??t,this.setMonomerLengthLimit(f),this.setSeparatorWidth(s.isMsa()?e:t),u.temp[".mm.cellRenderer.settingsChanged"]="0"}const[c,h]=this.getCellMonomerLengths(i.tableRowIndex,r),p=(c.length,i.cell.value,i.cell.rowIndex),d=(u.getTag(gt.gp.alphabet),50);r=function(t,e,n,r,o){return t?Math.max(Math.min(t.canvas.width/o-n,r)):Math.max(e.canvas.width/o-n,0)}(a?.grid,t,e,r,l),t.beginPath(),t.rect(e+this.padding,n+this.padding,r-this.padding-1,o-2*this.padding),t.clip(),t.font="12px monospace",t.textBaseline="top";const g=u.meta.units,m=u.getTag(gt.gp.aligned),y=u.getTag(gt.gp.separator)??"",v=this.props.separatorWidth+1*this.props.monomerCharWidth,b=Math.ceil(r/v),C=u.temp["reference-sequence"],w=this.tableCol.temp["current-word"];w&&-1===u?.dataFrame?.currentRowIdx&&(this.tableCol.temp["current-word"]=null);const A=(()=>{const t=s.getSplitter(b)(null!=C&&""!=C?C:w??"");return wt().count(0).take(t.length).map((e=>t.getOriginal(e))).toArray()})(),E=s.getSplitted(p);let _=Ht.classic;m&&m.includes("MSA")&&g==gt.Hi.SEPARATOR&&(_=Ht.MSA);const x=Math.min(E.length,b);for(let a=0;a<x;++a){const u=E.getOriginal(a),l=E.getCanonical(a);let c=kt;const p=this.getMonomerLib();if(p){const t=s.defaultBiotype;c=p.getMonomerTextColor(t,l)}t.fillStyle=kt;const g={color:c,pivot:0,left:!0,transparencyRate:1,separator:y,last:a===E.length-1,drawStyle:_,maxWord:h,wordIdx:a,gridCell:i,referenceSequence:A,maxLengthOfMonomer:f,monomerTextSizeMap:this._monomerLengthMap,logger:this.logger};if(Bt(t,u,e+this.padding,n,r,o,g),d>r)break}}catch(t){const[e,n]=(0,Ot.AP)(t);this.logger.error(e,void 0,n),this.errors.push(t)}finally{t.restore()}}onMouseMove(t,e){const n=`${this.toLog()}.onMouseMove()`;if(!this.seqHelper||null==t.tableRowIndex)return;const r=t.bounds,o=e.offsetX-t.gridColumn.left+(t.gridColumn.left-r.x),i=this.getPosition(t.tableRowIndex,o,r.width);this.logger.debug(`${n}, start, argsX: ${o}, left: ${i}`);const s=this.seqHelper.getSeqHandler(this.tableCol),a=s.getSplitted(t.tableRowIndex);if(null!==i&&i<a.length){const n=s.alphabet??gt.YI.UN,r={position:i,biotype:n===gt.YI.RNA||n===gt.YI.DNA?xt.o.NUCLEOTIDE:xt.o.AA,symbol:a.getCanonical(i)},o=[];let u=this._monomerStructureMap[r.symbol];{const t=this.getMonomerLib();u=this._monomerStructureMap[r.symbol]=t?t.getTooltip(r.biotype,r.symbol):I.divText("Monomer library is not available")}o.push(u),I.tooltip.show(I.divV(o),e.x+16,e.y+16),Tt(t,r)}else I.tooltip.hide(),Tt(t,null)}}class jt extends Gt{constructor(t,e,n,r){super(t,e,Wt.logger,n,(()=>({seqHandler:r.getSeqHandler(e),monomerCharWidth:7,separatorWidth:11,monomerToShort:gt.zS})))}onMouseMove(t,e){const n=t.bounds,r=e.offsetX-t.gridColumn.left+(t.gridColumn.left-n.x);this.getPosition(t.tableRowIndex,r,n.width),super.onMouseMove(t,e)}}class Ut{get defaultGapOriginal(){return""}constructor(t,e){this.separator=t,this.helmHelper=e,this.separatorSplitter=(0,gt.dh)(this.separator),this.splitter=this._splitter.bind(this)}setUnits(){}_splitter(t){const e=this.separatorSplitter(t);return new Vt(wt().count(0).take(e.length).map((t=>e.getOriginal(t))).toArray(),i.b9[i.Hi.SEPARATOR])}getHelm(t,e){return St.s.parseNotation(t,this.helmHelper).getNotationHelm()}createCellRendererBack(t,e){const n=new jt(t,e,4,this.helmHelper.seqHelper);return n.init().then((()=>{})),n}}class Vt extends Lt.Mu{getCanonical(t){if(this.isGap(t))return i._S;const e=this.getOriginal(t);let n=e;return e.startsWith("{")?n=e.slice(1):e.endsWith("}")?n=e.slice(0,-1):e.startsWith("(")?n=e.replace(/^\(.\d+\)/,""):e.endsWith(")")&&(n=e.replace(/\(\d+\)$/,"")),n}constructor(t,e){super(t,e)}}const Wt=new L({debug:!0});function qt(t,e){t.setTag("aligned","SEQ"),t.setTag("alphabet","UN"),t.setTag(".alphabetIsMultichar","true"),t.meta.units=i.Hi.CUSTOM,t.tags["polytool-data-role"]="template",t.temp[s.notationProvider]=new Ut(e,Wt.helmHelper)}},269:(t,e,n)=>{"use strict";n.d(e,{s:()=>s});var r=n(599),o=n(125),i=n(699);class s{constructor(t,e,n,r){this.helmHelper=r,this.linkages=e,this.monomers=t,this.mol=n}static parseHelm(t,e){const n=/(\w+\{.*\})\$(.*)\$(.*)\$(.*)\$/g.exec(t),i=[n[1],n[2],n[3],n[4]],a=i[0].split("|"),u=i[1].split("|"),l=new Array(a.length),c=[],f=e.createHelmWebEditor().editor.m;let h=0;const p=new JSDraw2.Point(0,0);for(let t=0;t<a.length;t++){const e=a[t].indexOf("{"),n=a[t].indexOf("}");l[t]=a[t].slice(e+1,n).split(".").map((t=>{return(e=t).startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e;var e}));for(let e=0;e<l[t].length;e++){const n=l[t][e],o={type:r.o.AA,i:t,j:e,continuousId:h},i=new JSDraw2.Atom(p,n,o);if(f.addAtom(i),0!==e){const t=f.atoms[h-1],e=f.atoms[h],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,f.addBond(n)}h++,p.x+=JSDraw2.Editor.BONDLENGTH}p.y+=4*JSDraw2.Editor.BONDLENGTH}for(let t=0;t<u.length;t++)if(""!==u[t]&&"V2.0"!==u[t]){const e=u[t].split(","),n=parseInt(e[0].replace("PEPTIDE",""))-1,r=parseInt(e[1].replace("PEPTIDE",""))-1,i=e[2].split("-"),s=i[0].split(":"),a=i[1].split(":");c.push({fChain:n,sChain:r,fMonomer:(0,o.jX)(parseInt(s[0]),n,l),sMonomer:(0,o.jX)(parseInt(a[0]),r,l),fR:parseInt(s[1].replace("R","")),sR:parseInt(a[1].replace("R",""))})}for(let t=0;t<c.length;t++){const e=f.atoms[c[t].fMonomer-1],n=f.atoms[c[t].sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=c[t].fR,r.r2=c[t].sR,f.addBond(r)}return new s(l,c,f,e)}applyRules(t){const e=this.getNotation();return s.fromNotation(e,t,this.helmHelper)}static fromNotation(t,e,n){const o=e.heterodimerCode,i=e.homodimerCode,a=[],u=[],l=null!==o?t.split(`(${e.heterodimerCode})`):"";null!==o&&l.length>1?(u.push({fChain:0,sChain:1,fMonomer:1,sMonomer:1,fR:1,sR:1}),a.push(l[1].replaceAll("{","").replaceAll("}","")),a.push(l[2].replaceAll("{","").replaceAll("}",""))):a.push(t);for(let t=0;t<a.length;t++)if(null!==i&&a[t].includes(`(${i})`)){const e=a.length;u.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=a[t].replace(`(${i})`,""),r=n.indexOf("{"),o=n.slice(0,r),s=n.replace(o,"").replaceAll("{","").replaceAll("}","");a[t]=o+s,a.push(s)}for(let t=0;t<a.length;t++)if(null!==i&&a[t].includes(`(${i})`)){const e=a.length;u.push({fChain:t,sChain:e,fMonomer:1,sMonomer:1,fR:1,sR:1});const n=a[t].replace(`(${i})`,""),r=n.indexOf("{"),o=n.slice(0,r),s=n.replace(o,"").replaceAll("{","").replaceAll("}","");a[t]=o+s,a.push(s)}const c=new Array(a.length);for(let t=0;t<a.length;t++){const n=a[t].split("-"),r=this.getLinkedPositions(n,e.linkRules),[o,i,s,l,f]=this.getAllCycles(e.linkRules,n,r);new Array(o.length);for(let e=0;e<i.length;e++)u.push({fChain:t,sChain:t,fMonomer:i[e],sMonomer:s[e],fR:l[e],sR:f[e]});c[t]=o}const f=[],h=n.createHelmWebEditor().editor.m;let p=0;const d=new JSDraw2.Point(0,0);for(let t=0;t<c.length;t++){const n=this.getLinkedPositions(c[t],e.reactionRules),[o,i,s,a]=this.getAllReactants(e.reactionRules,c[t],n);if(i.length>=1){const n=new Array(s[0]-1),l=new Array(o.length-s[0]);for(let e=0;e<s[0]-1;e++){const i=n[e]=o[e],s={type:r.o.AA,i:t,j:e,continuousId:p},a=new JSDraw2.Atom(d,i,s);if(h.addAtom(a),e>0){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}for(let e=s[0];e<o.length;e++){const n=l[e-s[0]]=o[e],i={type:r.o.AA,i:t,j:e,continuousId:p},a=new JSDraw2.Atom(d,n,i);if(h.addAtom(a),e>s[0]){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}h.atoms[i[0]-1].elem=n[i[0]-1]=e.reactionRules[a[0]].name;for(let t=0;t<u.length;t++)u[t].fMonomer>s[0]&&(u[t].fMonomer-=s[0],u[t].fChain++),u[t].sMonomer>s[0]&&(u[t].sMonomer-=s[0],u[t].sChain++);u.push({fChain:0,sChain:0,fMonomer:i[0],sMonomer:s[0]-1,fR:3,sR:2}),u.push({fChain:0,sChain:1,fMonomer:i[0],sMonomer:1,fR:4,sR:1});const c=new Array(n.length);for(let t=0;t<n.length;t++)c[t]=`[${n[t]}]`;const g=new Array(l.length);for(let t=0;t<l.length;t++)g[t]=`[${l[t]}]`;f.push(n),f.push(l)}else{for(let e=0;e<c[t].length;e++){const n=c[t][e],o={type:r.o.AA,i:t,j:e,continuousId:p},i=new JSDraw2.Atom(d,n,o);if(h.addAtom(i),e>0){const t=h.atoms[p-1],e=h.atoms[p],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,h.addBond(n)}p++}f.push(c[t])}}for(const t of u){const e=h.atoms[t.fMonomer-1],n=h.atoms[t.sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=t.fR,r.r2=t.sR,h.addBond(r)}return new s(f,u,h,n)}static parseNotation(t,e){const n=[],o=[],i=e.createHelmWebEditor().editor.m,a=/(\(.\d+\))?\{[^\}]*\}/g,u=[];u.push(t.replaceAll(a,""));const l=t.matchAll(a);for(const t of l){const e=t[0];e&&u.push(e)}let c=0;for(let t=0;t<u.length;t++){const e=u[t].split("-"),r=new Array(e.length);let i=0;for(let n=0;n<e.length;n++){const s=e[n].replace("{","").replace("}","");""!==s?(r[n]=s,c++,i++):o.push({fChain:t,sChain:t+1,fMonomer:c,sMonomer:c+1,fR:1,sR:1})}n.push(r.slice(0,i))}c=0;const f=new JSDraw2.Point(0,0);for(let t=0;t<n.length;t++)for(let e=0;e<n[t].length;e++){if(n[t][e]){const o=n[t][e],s={type:r.o.AA,i:t,j:e,continuousId:c},a=new JSDraw2.Atom(f,o,s);if(i.addAtom(a),0!==e){const t=i.atoms[c-1],e=i.atoms[c],n=new JSDraw2.Bond(t,e);n.r1=2,n.r2=1,i.addBond(n)}c++,f.x+=JSDraw2.Editor.BONDLENGTH}f.y+=4*JSDraw2.Editor.BONDLENGTH}for(let t=0;t<o.length;t++){const e=i.atoms[o[t].fMonomer-1],n=i.atoms[o[t].sMonomer-1],r=new JSDraw2.Bond(e,n);r.r1=o[t].fR,r.r2=o[t].sR,i.addBond(r)}return new s(n,o,i,e)}getHelmChanged(t,e){let n=0,r=0,o=0;t:for(let e=0;e<this.monomers.length;e++)for(let i=0;i<this.monomers[e].length;i++){if(n==t){r=e,o=i;break t}n++}const i=this.monomers[r][o];this.monomers[r][o]=`[${e}]`;const s=this.getHelm();return this.monomers[r][o]=i,s}getNotationHelm(){return this.getHelm()}getHelm(){let t="";for(let e=0;e<this.monomers.length;e++){e>0&&(t+="|"),t+=`PEPTIDE${e+1}{`;for(let n=0;n<this.monomers[e].length;n++){n>0&&(t+=".");const r=this.monomers[e][n];t+=r.length>1?`[${r}]`:r}t+="}"}t+="$";for(let e=0;e<this.linkages.length;e++)e>0&&(t+="|"),t+=`PEPTIDE${this.linkages[e].fChain+1},PEPTIDE${this.linkages[e].sChain+1},`,t+=`${(0,o.MH)(this.linkages[e].fMonomer-1,this.monomers)[0]+1}:R${this.linkages[e].fR}-`,t+=`${(0,o.MH)(this.linkages[e].sMonomer-1,this.monomers)[0]+1}:R${this.linkages[e].sR}`;return t+="$$$V2.0",t}getNotation(){const t=this.mol.atoms,e=this.mol.bonds,n=[],r=[];for(let t=0;t<e.length;t++)e[t].a1.bio.i!==e[t].a2.bio.i&&r.push(t);for(let e=0;e<t.length;e++){const r=t[e].bio?.i;r+1>n.length?n.push(1):n[r]++}const o=new Array(n.length);let i=0;for(let e=0;e<n.length;e++){const r=new Array(n[e]);for(let o=0;o<n[e];o++)r[o]=t[i].elem,i++;o[e]=r}let s="";for(let t=0;t<o.length;t++){let n="";for(let e=0;e<o[t].length;e++)n+=`${0==e?"":"-"}${o[t][e]}`;if(0!==t){const t=/(\(.\d+\))/,e=n.match(t);n=n.replace(e?.[0],""),n=`${e?e?.[0]:""}{${n}}`}else if(o.length>1){const t=0==e[r[0]].a1.bio.i&&0==e[r[0]].a1.bio.j,o=1==e[r[0]].a2.bio.i&&0==e[r[0]].a1.bio.j;t&&o&&(n+="-")}s+=n}return s}static getLinkedPositions(t,e){const n=[];for(let r=0;r<e.length;r++){let o=!1,s=!1,a=!1,u=-1,l=-1;const c=`(${e[r].code})`,[f,h]=(0,i.Ln)(e[r]);if(f.length>0)for(let e=0;e<f.length;e++){for(let n=0;n<t.length;n++)if(t[n].includes(c)){if(o){if(a&&t[n]==h[e]+c){s=!0,l=n;break}if(a||t[n]!=f[e]+c)continue;s=!0,l=n;break}if(t[n]==f[e]+c)o=!0,a=!0,u=n;else{if(t[n]!=h[e]+c)continue;o=!0,a=!1,u=n}}o&&s&&(a?n.push([u,l,r]):n.push([l,u,r]))}else{for(let e=0;e<t.length;e++)if(t[e].includes(c)){if(o){if(a&&t[e]){s=!0,l=e;break}if(!a&&t[e]){s=!0,l=e;break}continue}o=!0,a=!0,u=e}if(!o||!s)continue;a?n.push([u,l,r]):n.push([l,u,r])}}return n}static getAllCycles(t,e,n){const r=[],o=[],i=[],s=[],a=n.length;for(let u=0;u<a;u++){if(-1==n[u][0])continue;const a=n[u][2],l=t[a].code;e[n[u][0]]=e[n[u][0]].replace(`(${l})`,""),e[n[u][1]]=e[n[u][1]].replace(`(${l})`,""),r.push(n[u][0]+1),o.push(n[u][1]+1),i.push(t[a].firstLinkingGroup),s.push(t[a].secondLinkingGroup)}return[e,r,o,i,s]}static getAllReactants(t,e,n){const r=[],o=[],i=[],s=n.length;for(let a=0;a<s;a++){if(-1==n[a][0])continue;const s=t[n[a][2]].code;e[n[a][0]]=e[n[a][0]].replace(`(${s})`,""),e[n[a][1]]=e[n[a][1]].replace(`(${s})`,""),r.push(n[a][0]+1),o.push(n[a][1]+1),i.push(n[a][2])}return[e,r,o,i]}check(t=!1){const e=[],n=this.monomers.map((t=>t.length)).reduce(((t,e)=>t+e),0);this.mol.atoms.length!==n&&e.push(`The mol atoms count ${this.mol.atoms.length} does not match the total number ${n} of chains' monomers.`);const r=this.monomers.map((t=>t.length-1)).reduce(((t,e)=>t+e),0)+this.linkages.length;this.mol.bonds.length!==r&&e.push(`The mol bonds count ${this.mol.bonds.length} does not match the total number ${r} in- and inter-chain linkages.`);let o=0;for(let t=0;t<this.monomers.length;++t){const n=this.monomers[t];for(let t=0;t<n.length;++t)try{const r=n[t],i=this.mol.atoms[o];i.bio.continuousId!==o&&e.push(`Atom #${o} has incorrect .bio.continuousId: ${i.bio.continuousId}.`),i.elem!==r&&e.push(`Atom #${o} elem: '${i.elem}' does not match chain monomer: '${r}'.`)}finally{o++}}if(t&&e.length>0)throw new Error(`Chain errors:\n${e.map((t=>` ${t}`)).join("\n")}`);return e}}},229:(t,e,n)=>{"use strict";n.d(e,{b:()=>s});var r=n(192),o=n(269),i=n(511);function s(t,e,n){const s=new Array(t.length);for(let a=0;a<t.length;a++)try{if(null==t[a])s[a]="";else{const r=o.s.fromNotation(t[a],e,n);s[a]=r.getHelm()}}catch(t){const[e,n]=(0,r.AP)(t);i._package.logger.error(e,void 0,n),s[a]=""}return s}},125:(t,e,n)=>{"use strict";n.d(e,{AM:()=>y,MH:()=>f,Tl:()=>m,jX:()=>h});var r=n(328),o=n(991),i=n.n(o),s=n(890),a=n(717),u=n(699),l=n(296),c=n(192);function f(t,e){let n,r=t;for(n=0;n<e.length&&r>=e[n].length;++n)r-=e[n].length;return[r,n]}function h(t,e,n){let r=0;for(let t=0;t<e;++t)r+=n[t].length;return r+t}function p(t,e){const n=t.molfile;let r=e.molfile;const o=t.rgroups.length,i=r.indexOf("M RGP");if(-1!==i){const t=r.substring(i+6,i+9),e=Number(t);for(let t=0;t<e;t++){const e=i+9+4+8*t,n=i+9+8+8*t,s=r.substring(e,n),a=Number(s)+o,u=Math.floor(Math.log10(a)+1),l=" ".repeat(4-u)+String(a);r=r.substring(0,e)+l+r.substring(n,r.length)}}return[n,r]}function d(t,e,n,o,i){let s=null,a=null,u=null,f=null,h=null,p=null,d="";try{if(s=t.get_rxn(e),!s)throw new l.J5(e);a=new t.MolList,u=t.get_mol(n),f=t.get_mol(o),a.append(u),a.append(f),h=s.run_reactants(a,1),p=h.get(0).next(),d=p?.get_molblock()}catch(t){const[e,n]=(0,c.AP)(t);throw r.shell.error(`Can not assemble monomer '${i}': ${e}.`),t}finally{s?.delete(),a?.delete(),u?.delete(),f?.delete(),h?.delete(),p?.delete()}return d}function g(t,e){const n=new Array(t?.rgroups.length+e?.rgroups.length),r=t?.rgroups.length,o=e?.rgroups.length;for(let e=0;e<r;e++)n[e]=t?.rgroups[e];for(let t=0;t<o;t++){const o=e?.rgroups[t].label.replace("R",""),i=Number(o)+r,s={capGroupSMILES:e?.rgroups[t].capGroupSMILES.replace(o,String(i)),alternateId:e?.rgroups[t].alternateId.replace(o,String(i)),capGroupName:e?.rgroups[t].capGroupName,label:e?.rgroups[t].label.replace(o,String(i))};n[t+r]=s}return n}function m(t,e,n){const r=n.reaction,o=n.name,[i,s]=(0,u.Ln)(n),a=new Array(i.length),c=new Array(i.length);for(let n=0;n<i.length;n++){const u=e.getMonomer("PEPTIDE",i[n]);if(!u)throw new l.bl("PEPTIDE",i[n]);const f=e.getMonomer("PEPTIDE",s[n]);if(!f)throw new l.bl("PEPTIDE",s[n]);const[h,m]=p(u,f),y={symbol:o,name:o,molfile:d(t,r,h,m,o),author:"",id:0,rgroups:g(u,f),smiles:"",polymerType:"PEPTIDE",monomerType:"Backbone",createDate:null};y.meta=Object.assign(y.meta??{},{colors:{default:{line:"#2083D5",text:"#2083D5",background:"#F2F2F5"}}}),a[n]=o,c[n]=y}return[a,c]}async function y(t){const e=(await(0,s.pj)()).getMonomerLib(),n=await(0,a.j)(),r={};let o=[],u=[];for(let i=0;i<t.reactionRules.length;i++)try{[o,u]=m(n,e,t.reactionRules[i])}catch(t){o=[],u=[],console.error(t)}finally{for(let t=0;t<o.length;t++)r[o[t]]=u[t]}const l={PEPTIDE:r};return e.override(l,"ST-PT-reactions."+i().repeat(1).map((()=>Math.floor(36*Math.random()).toString(36))).take(4).toArray().join(""))}},699:(t,e,n)=>{"use strict";n.d(e,{Ln:()=>b,Q4:()=>v});var r=n(82),o=n(328);n(389),n(991);var i=n(511),s=n(124),a=n(229),u=n(439);class l{constructor(t,e){this.v=null,this.currentTab="",this.rules=t,this.linkRuleDataFrame=this.rules.getLinkRulesDf(),this.synthRuleDataFrame=this.rules.getSynthesisRulesDf(),this.fileName=e;const n=this.rules.homodimerCode?this.rules.homodimerCode:"",r=this.rules.heterodimerCode?this.rules.heterodimerCode:"";this.homoDimerInput=ui.input.string("Homo dimer",{value:n,onValueChanged:()=>{},nullable:!1}),this.heteroDimerInput=ui.input.string("Hetero dimer",{value:r,onValueChanged:()=>{},nullable:!1})}async getAndAddView(){if(this.v)try{const t=Array.from(o.shell.views).find((t=>t.name===this.v.name));if(!t)throw this.v.detach(),this.v.close(),new Error("View is closed, making it null in catch statement");o.shell.v=t}catch(t){this.v=null}return this.v||(this.v=r.View.create(),this.v.name=`Manage Polytool Rules - ${this.fileName}`,this.v.append(await this.getForm()),this.v=o.shell.addView(this.v),o.shell.v=this.v),this.v}static async getInstance(t){if(!this.instances[t]){const e=await v([t]);this.instances[t]=new l(e,t)}return this.instances[t]}save(){this.rules.homodimerCode=this.homoDimerInput.value,this.rules.heterodimerCode=this.heteroDimerInput.value,this.rules.setLinkRules(this.linkRuleDataFrame),this.rules.setSynthesisRules(this.synthRuleDataFrame);const t={homodimerCode:this.rules.homodimerCode,heterodimerCode:this.rules.heterodimerCode,linkRules:this.rules.linkRules,reactionRules:this.rules.reactionRules},e=JSON.stringify(t,void 0,2);i._package.files.writeAsText(`polytool-rules/${this.fileName}`,e),o.shell.info(`Polytool rules at ${this.fileName} was updated`)}createGridDiv(t,e){const n=ui.h1(t,"polytool-grid-header");return e.root.prepend(n),e.root.style.height="100%",e.root}async getLinkExamplesGrid(){const t=[];for(let e=0;e<this.rules.linkRules.length;e++){const n=this.rules.linkRules[e].code,[r,o]=b(this.rules.linkRules[e]);for(let e=0;e<r.length;e++){const i=`${r[e]}(${n})-A-A-A-A-${o[e]}(${n})-A`;t.push(i)}}const e=await(0,s.b2)(),n=(0,a.b)(t,this.rules,e),o=r.Column.fromStrings("monomers",t),l=r.Column.fromStrings("helm",n);return(0,i.applyNotationProviderForCyclized)(o,"-"),o.semType=r.SEMTYPE.MACROMOLECULE,l.semType=r.SEMTYPE.MACROMOLECULE,l.meta.units=u.Hi.HELM,l.setTag(r.TAGS.CELL_RENDERER,"helm"),r.DataFrame.fromColumns([o,l]).plot.grid()}async getReactionExamplesGrid(){const t=[];for(let e=0;e<this.rules.reactionRules.length;e++){const n=this.rules.reactionRules[e].code,[r,o]=b(this.rules.reactionRules[e]);for(let e=0;e<r.length;e++){const i=`${r[e]}(${n})-A-A-A-A-${o[e]}(${n})`;t.push(i)}}const e=await(0,s.b2)(),n=(0,a.b)(t,this.rules,e),o=r.Column.fromStrings("monomers",t),l=r.Column.fromStrings("helm",n);return o.semType=r.SEMTYPE.MACROMOLECULE,(0,i.applyNotationProviderForCyclized)(o,"-"),l.semType=r.SEMTYPE.MACROMOLECULE,l.meta.units=u.Hi.HELM,l.setTag(r.TAGS.CELL_RENDERER,"helm"),r.DataFrame.fromColumns([o,l]).plot.grid()}async getForm(){r.TabControl;const t=ui.divV([this.homoDimerInput,this.heteroDimerInput]),e=await this.getLinkExamplesGrid(),n=await this.getReactionExamplesGrid(),o=ui.tabControl({Links:e,Reactions:n,Dimers:t},!1);o.root.style.height="90%",o.root.style.width="100%",o.root.classList.add("rules-manager-form-tab-control"),o.header.style.marginBottom="10px";const i=this.createGridDiv("Link rules",this.linkRuleDataFrame.plot.grid({showAddNewRowIcon:!0})),s=this.createGridDiv("Reaction rules",this.synthRuleDataFrame.plot.grid({showAddNewRowIcon:!0}));i.style.width="100%",s.style.width="100%";const a=[i,s,ui.div()];a[0].style.removeProperty("display"),a[1].style.display="none",a[2].style.display="none",o.onTabChanged.subscribe((()=>{this.currentTab=o.currentPane.name;const t=o.panes.findIndex((t=>t.name==this.currentTab));for(let e=0;e<a.length;e++)e==t?a[e].style.removeProperty("display"):a[e].style.display="none"}));const u=ui.bigButton("Save changes",(()=>{this.save()})),l=ui.divV([o.root,u]);l.style.height="100%",l.style.alignItems="center";const c=ui.splitH([l,ui.divV(a,{style:{width:"100%"}})],{style:{width:"100%"}},!0);return c.style.height="100%",c}}l.instances={};const c="System:AppData/SequenceTranslator/polytool-rules/",f="code",h="firstMonomers",p="secondMonomers",d="name",g="firstLinkingGroup",m="secondLinkingGroup";class y{constructor(t,e,n,r){this.homodimerCode=t,this.heterodimerCode=e,this.linkRules=n,this.reactionRules=r}set homodimer(t){this.homodimerCode=t}set heterodimer(t){this.heterodimerCode=t}addLinkRules(t){for(let e=0;e<t.length;e++)this.linkRules.push(t[e])}addSynthesisRules(t){for(let e=0;e<t.length;e++)this.reactionRules.push(t[e])}getLinkRulesDf(){const t=this.linkRules.length,e=r.Column.int(f,t),n=r.Column.string(h,t),o=r.Column.string(p,t),i=r.Column.int(g,t),s=r.Column.int(m,t);for(let r=0;r<t;r++)e.set(r,this.linkRules[r].code),n.set(r,this.linkRules[r].firstMonomers.toString()),o.set(r,this.linkRules[r].secondMonomers.toString()),i.set(r,this.linkRules[r].firstLinkingGroup),s.set(r,this.linkRules[r].secondLinkingGroup);return r.DataFrame.fromColumns([e,n,o,i,s])}getSynthesisRulesDf(){const t=this.reactionRules.length,e=r.Column.int(f,t),n=r.Column.string(h,t),o=r.Column.string(p,t),i=r.Column.string(d,t),s=r.Column.string("firstReactant",t),a=r.Column.string("secondReactant",t),u=r.Column.string("product",t);for(let r=0;r<t;r++){e.set(r,this.reactionRules[r].code),n.set(r,this.reactionRules[r].firstMonomers.toString()),o.set(r,this.reactionRules[r].secondMonomers.toString()),i.set(r,this.reactionRules[r].name);const t=this.reactionRules[r].reaction.split(">>"),l=t[0].split(".");s.set(r,l[0]),a.set(r,l[1]),u.set(r,t[1])}return s.semType=r.SEMTYPE.MOLECULE,a.semType=r.SEMTYPE.MOLECULE,u.semType=r.SEMTYPE.MOLECULE,r.DataFrame.fromColumns([i,s,a,u,e,n,o])}setLinkRules(t){const e=t.rowCount,n=new Array(e),r=t.columns.byName(f),o=t.columns.byName(h),i=t.columns.byName(p),s=t.columns.byName(g),a=t.columns.byName(m);for(let t=0;t<e;t++){const e={code:r.get(t),firstMonomers:o.get(t).split(","),secondMonomers:i.get(t).split(","),firstLinkingGroup:s.get(t),secondLinkingGroup:a.get(t)};n[t]=e}this.linkRules=n}setSynthesisRules(t){const e=t.rowCount,n=new Array(e),r=t.columns.byName(f),o=t.columns.byName(h),i=t.columns.byName(p),s=t.columns.byName(d),a=t.columns.byName("firstReactant"),u=t.columns.byName("secondReactant"),l=t.columns.byName("product");for(let t=0;t<e;t++){const e=`${a.get(t)}.${u.get(t)}>>${l.get(t)}`,c={code:r.get(t),firstMonomers:o.get(t).split(","),secondMonomers:i.get(t).split(","),reaction:e,name:s.get(t)};n[t]=c}this.reactionRules=n}}async function v(t){const e=new r.FileSource(c),n=new y(null,null,[],[]);for(let r=0;r<t.length;r++){const o=await e.readAsText(t[r].replace(c,"")),i=JSON.parse(o);n.homodimer=i.homodimerCode,n.heterodimer=i.heterodimerCode,n.addLinkRules(i.linkRules),n.addSynthesisRules(i.reactionRules)}return n}function b(t){const e=t.firstMonomers.length*t.secondMonomers.length,n=new Array(e),r=new Array(e);let o=0;for(let e=0;e<t.firstMonomers.length;e++)for(let i=0;i<t.secondMonomers.length;i++)n[o]=t.firstMonomers[e],r[o]=t.secondMonomers[i],o++;return[n,r]}},820:(t,e,n)=>{"use strict";n.d(e,{o:()=>i});var r=n(296);function o(t,e,n,r){const o=new Array(r.length*(n-e+1));for(let i=0;i<r.length;++i){const s=n-e+1;for(let n=0;n<s;++n){const a=e+n,u=r[i],l=o[i*s+n]=t.clone(),c=l.atoms[a].elem;l.atoms[a].elem=u;const f=c?.length>1?`[${c}]`:c,h=u?.length>1?`[${u}]`:u;l.name=`${t.name}-${f}${a+1}${h}`}}return o}function i(t,e,n){const i=new JSDraw2.MolHandler,s=new org.helm.webeditor.Plugin(i);org.helm.webeditor.IO.parseHelm(s,t,new JSDraw2.Point(0,0),void 0);const a=i.m;a.name=e;let u=[];if(n.placeholders)switch(n.type){case r.aK.Single:u=function(t,e){return e.map((e=>o(t,e.position,e.position,e.monomers))).reduce(((t,e)=>t.concat(e)),[])}(i.m,n.placeholders);break;case r.aK.Matrix:u=function(t,e){let n=[t];for(const t of e){const e=n.map((e=>o(e,t.position,t.position,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(i.m,n.placeholders)}let l=[];n.breadthPlaceholders&&(l=function(t,e){if(0==e.length)return[];let n=[t];for(const t of e){const e=n.map((e=>o(e,t.start,t.end,t.monomers)));n=e.reduce(((t,e)=>t.concat(e)),[])}return n}(i.m,n.breadthPlaceholders)),u=u.concat(l),n.keepOriginal&&(u=[a,...u]);const c=u.map((t=>[org.helm.webeditor.IO.getHelm(t),t.name]));return c}},296:(t,e,n)=>{"use strict";var r;n.d(e,{J5:()=>i,aK:()=>r,bl:()=>o}),function(t){t.Single="single",t.Matrix="matrix"}(r||(r={}));class o extends Error{constructor(t,e,n){super(`Monomer '${e}' of polymer type '${t}' not found`,n),this.type="MonomerNotFoundError"}}class i extends Error{constructor(t,e){super(`Invalid reaction '${t}'.`),this.type="InvalidReactionError"}}},82:t=>{"use strict";t.exports=DG},328:t=>{"use strict";t.exports=grok},389:t=>{"use strict";t.exports=ui},991:t=>{"use strict";t.exports=wu}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.u=t=>t+".js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=r[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href,n.nc=void 0;var r={};(()=>{"use strict";n.r(r),n.d(r,{_package:()=>N,initAutoTests:()=>$,test:()=>O,tests:()=>e.CN});var t=n(82),e=n(70),o=n(328),i=n(686);class s extends t.Package{async getTranslationHelper(){return await o.functions.call(`${this.name}:getTranslationHelper`)}}function a(t,e,n){return n.createFormatConverter(t,e).convertTo(i.NO.HELM)}function u(t,e,n){return n.createFormatConverter(t,i.NO.HELM).convertTo(e)}const l={Axolabs:{UfAfsCfsGfuacg:"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"},BioSpring:{"A*GC*123456789":"RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p.d([m5C])}$$$$"},Mermade12:{hefglijkLIJKHEFG:"RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$"}},c={"RNA1{[fR](U)p.[fR](A)[sp].[fR](C)[sp].[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACG","RNA1{r(A)[sp].r(G)p.r(C)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)p}$$$$":"AGCUACGUACG","RNA1{[25r](U)[sp].[25r](A)[sp].[25r](C)[sp].[25r](G)[sp].[fR](U)[sp].[fR](A)[sp].[fR](C)[sp].[fR](G)[sp].[fR](U)p.[fR](A)p.[fR](C)p.[fR](G)p.[25r](U)p.[25r](A)p.[25r](C)p.[25r](G)}$$$$":"UACGUACGUACGUACG"};(0,e.L1)("Formats to HELM",(()=>{let t;(0,e.gM)((async()=>{t=await N.getTranslationHelper()}));for(const n of Object.keys(l))for(const[r,o]of Object.entries(l[n]))(0,e.t6)(`${n} to HELM`,(async()=>{const i=o,s=a(r,n,t);(0,e.E3)(s,i)}))})),(0,e.L1)("HELM to Formats",(()=>{let t;(0,e.gM)((async()=>{t=await N.getTranslationHelper()}));for(const n of Object.keys(l))for(const[r,o]of Object.entries(l[n]))(0,e.t6)(`${n} to HELM`,(async()=>{const i=r,s=u(o,n,t);(0,e.E3)(s,i)}))}));var f=n(480);(0,e.L1)("HELM to Nucleotides",(()=>{let t;(0,e.gM)((async()=>{t=await N.getTranslationHelper()})),Object.entries(c).forEach((([n,r],o)=>{(0,e.t6)(`Sequence ${o+1} to nucleotides`,(async()=>{const o=r,i=(0,f.Hs)(n,t.monomerLibWrapper);(0,e.E3)(i,o)}))}))}));const h={[i.NO.AXOLABS]:"Afcgacsu",[i.NO.HELM]:"RNA1{[fR](A)p.[25r](C)p.[25r](G)p.[25r](A)p.[25r](C)[sp].[25r](U)}$$$$"};(0,e.L1)("Formats support",(()=>{let t;(0,e.gM)((async()=>{t=await N.getTranslationHelper()})),Object.entries(h).forEach((([n,r])=>{(0,e.t6)(`All formats for ${n}`,(async()=>{const o=function(t,e,n){const r=n.createSequenceValidator(t).getInvalidCodeIndex(e);return(0,f.bD)(t,r,e,n)}(r,n,t),i=Object.keys(o).length,s=Object.keys(l).length+1;(0,e.E3)(!0,s<=i)}))}))}));var p=n(192);(0,e.L1)("files",(()=>{let n;(0,e.gM)((async()=>{n=await N.getTranslationHelper()})),(0,e.t6)("list",(async()=>{let r;const o=t.DataFrame.fromColumns([t.Column.string("subTest"),r=t.Column.bool("success"),t.Column.string("format"),t.Column.string("src"),t.Column.string("res"),t.Column.string("tgt"),t.Column.string("error"),t.Column.string("stack")]),i=await N.files.list("tests",!0,".csv");for(const r of i){const i=t.DataFrame.fromCsv(await r.readAsString()),s=i.columns.byIndex(0),u=s.name,l=i.columns.byIndex(1),c=i.rowCount;for(let t=0;t<c;++t){const i=o.rows.addNew();i.subTest=`${r.name}, row: ${t}`;try{const r=s.get(t),o=l.get(t);i.format=u,i.src=r,i.tgt=o;const c=i.res=a(r,u,n);(0,e.E3)(c,o),i.success=!0}catch(t){const[e,n]=(0,p.AP)(t);i.error=e,i.stack=n,i.success=!1}}}0==o.rowCount&&o.rows.addNew(["empty",!0,"",""]);const s=r.toList().findIndex((t=>1!=t));if(-1!=s){const t=o.rows.get(s);throw new Error(`Subtest '${t.subTest}' failed: ${t.error}`)}return o}),{skipReason:"Can not create test in async manner based on files in Shares."})}));var d=n(312),g=n(3);class m{constructor(t,e,n,r,o,i){this.units=t,this.aligned=e,this.alphabet=n,this.alphabetSize=r,this.alphabetIsMultichar=o,this.separator=i}}async function y(e,n){const r=(await e()).getCol(n),i=await o.functions.call("Bio:detectMacromolecule",{col:r});if(i&&(r.semType=i),r.semType===t.SEMTYPE.MACROMOLECULE){const t=`Negative test detected semType='${r.semType}', units='${r.meta.units}'.`;throw new Error(t)}}async function v(n,r,i,s,a,u,l,c,f=null){const h=(await n()).col(r),p=await o.functions.call("Bio:detectMacromolecule",{col:h});p&&(h.semType=p),(0,e.E3)(h.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(h.meta.units,s),(0,e.E3)(h.getTag(g.gp.aligned),a),(0,e.E3)(h.getTag(g.gp.alphabet),u),f&&(0,e.E3)(h.getTag(g.gp.separator),f);const d=i.getSeqHandler(h);(0,e.E3)(d.getAlphabetSize(),l),(0,e.E3)(d.getAlphabetIsMultichar(),c),d.isHelm()||((0,e.E3)(d.aligned,a),(0,e.E3)(d.alphabet,u))}(0,e.L1)("PolyTool: detectors",(()=>{let n;(0,e.gM)((async()=>{n=await(0,d.Q)()}));const r={cyclized1:{csv:"n,seq\n1,R-F-C(1)-T-G-H-F-Y-G-H-F-Y-G-H-F-Y-P-C(1)-meI\n2,C(1)-T-G-H-F-Y-P-C(1)-meI\n3,R-F-C(1)-T-G-H-F-Y-P-C(1)\n4,C(1)-T-G-H-F-H-P-C(1)\n5,R-F-D(2)-T-G-H-F-Y-P-NH2(2)\n6,R-F-aG(4)-T-G-H-F-Y-P-azG(4)-meI",pos:{seq:new m(g.Hi.CUSTOM,"SEQ",g.YI.UN,13,!0,"-")}}};for(const[o,i]of Object.entries(r))(0,e.t6)(`${o}`,(async()=>{const e=async()=>t.DataFrame.fromCsv(i.csv);for(const t of i.neg??[])await y(e,t);for(const[t,r]of Object.entries(i.pos??{}))await v(e,t,n,r.units,r.aligned,r.alphabet,r.alphabetSize,r.alphabetIsMultichar,r.separator)}))}));var b=n(890);const C="Libraries";let w=Promise.resolve();async function A(){let t;return w=w.then((async()=>{const e=o.userSettings.getValue(C,"Settings",!0);t=e?JSON.parse(e):{exclude:[],explicit:[],duplicateMonomerPreferences:{}},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],t.duplicateMonomerPreferences=t.duplicateMonomerPreferences instanceof Object?t.duplicateMonomerPreferences:{},console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await w,t}async function E(t){w=w.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),o.userSettings.add(C,"Settings",JSON.stringify(t),!0)})),await w}var _=n(717),x=n(124),T=n(229),I=n(125),P=n(699);(0,e.L1)("PolyTool: Convert",(()=>{let n,r,i,s,a;(0,e.gM)((async()=>{n=await(0,x.b2)(),r=await(0,d.Q)(),i=await(0,_.j)(),s=await(0,b.pj)(),a=await A(),await s.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await E(a),await s.loadMonomerLib(!0)}));const u={"cyclized-C(1)-2-1":{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0",mol:{atomCount:95,bondCount:100,inchiKey:"LMJUFVBPWWJJPN-AJJYTACESA-N"}}},"cyclized-C(1)-0-1":{src:{seq:"C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$V2.0",mol:{atomCount:73,bondCount:77,inchiKey:"KLFRBMUPPMMGJM-HXTBFBBASA-N"}}},"cyclized-C(1)-2-0":{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)"},tgt:{helm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0",mol:{atomCount:86,bondCount:91,inchiKey:"WIHSRTQGMICACU-DDDKLKPZSA-N"}}},"cyclized-C(1)-0-0":{src:{seq:"C(1)-T-G-H-F-Y-P-C(1)"},tgt:{helm:"PEPTIDE1{C.T.G.H.F.Y.P.C}$PEPTIDE1,PEPTIDE1,1:R3-8:R3$$$V2.0",mol:{atomCount:64,bondCount:68,inchiKey:"LOSMDBLEXLWPLB-OFZKBENXSA-N"}}},"cyclized-D(2)-NH2(2)-3-0":{src:{seq:"R-F-D(2)-T-G-H-F-Y-P-NH2(2)"},tgt:{helm:"PEPTIDE1{R.F.D.T.G.H.F.Y.P.[NH2]}$PEPTIDE1,PEPTIDE1,10:R2-3:R3$$$V2.0",mol:{atomCount:81,bondCount:86,inchiKey:"CBMGNYKOZWNVNK-AHGCAHLCSA-N"}}},"cyclized-D(2)-NH2(2)-0-0":{src:{seq:"D(2)-T-G-H-F-Y-P-NH2(2)"},tgt:{helm:"PEPTIDE1{D.T.G.H.F.Y.P.[NH2]}$PEPTIDE1,PEPTIDE1,8:R2-1:R3$$$V2.0",mol:{atomCount:59,bondCount:63,inchiKey:"HGRHAUQBJXFERJ-MUFWPYSASA-N"}}},"cyclized-azG(4)-aG(4)-2-1":{src:{seq:"R-F-azG(4)-T-G-H-F-Y-P-aG(4)-meI"},tgt:{helm:"PEPTIDE1{R.F.[GGaz].T.G.H.F.Y.P}|PEPTIDE2{[meI]}$PEPTIDE1,PEPTIDE1,3:R3-9:R2|PEPTIDE1,PEPTIDE2,3:R4-1:R1$$$V2.0",mol:{atomCount:97,bondCount:103,inchiKey:"WJSYGVBGPCCSJF-PERUNASMSA-N"}}}};for(const[t,r]of Object.entries(u))(0,e.t6)(`toHelm-${t}`,(async()=>{const t=await(0,P.Q4)(["rules_example.json"]),o=(0,T.b)([r.src.seq],t,n);(0,e.E3)(o[0],r.tgt.helm)}));for(const[o,s]of Object.entries(u))(0,e.t6)(`toAtomicLevel-${o}`,(async()=>{const o=await(0,P.Q4)(["rules_example.json"]),a=(0,T.b)([s.src.seq],o,n),u=await(0,I.AM)(o),l=t.Column.fromStrings("helm",a);l.semType=t.SEMTYPE.MACROMOLECULE,l.meta.units=g.Hi.HELM;const c=await r.helmToAtomicLevel(l,!1,!1,u);if(c.warnings&&c.warnings.length>0)throw new Error(c.warnings[0]);(0,e.E3)(null!=c.molCol,!0,".molCol is not null");const f=c.molCol.get(0),h=i.get_mol(f);try{const t={atomCount:h.get_num_atoms(),bondCount:h.get_num_bonds(),inchiKey:i.get_inchikey_for_inchi(h.get_inchi())};(0,e.Xk)(t,s.tgt.mol)}finally{h.delete()}}));(0,e.t6)("ui-col-wo-table",(async()=>{const n=N.name,r=Object.values(u).map((t=>t.src.seq)),i=Object.values(u).map((t=>t.tgt.helm)),s=t.Column.fromStrings("seq",r),a=await o.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});(0,e.J6)(a.toList(),i),(0,e.E3)(a.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(a.meta.units,g.Hi.HELM),(0,e.E3)(a.dataFrame,null)})),(0,e.t6)("ui-col",(async()=>{const n=N.name,r=Object.values(u).map((t=>t.src.seq)),i=Object.values(u).map((t=>t.tgt.helm)),s=t.Column.fromStrings("seq",r),a=t.DataFrame.fromColumns([s]),l=o.shell.addTableView(a),c=await o.functions.call(`${n}:polyToolConvert2`,{seqCol:s,generateHelm:!0,chiralityEngine:!0,rules:["rules_example.json"]});(0,e.J6)(c.toList(),i),(0,e.E3)(c.semType,t.SEMTYPE.MACROMOLECULE),(0,e.E3)(c.meta.units,g.Hi.HELM),(0,e.E3)(c.dataFrame.id,a.id),await(0,e.PE)(l.grid.onAfterDrawContent,(()=>{}),(async()=>{l.grid.invalidate()}),15e3),(0,e.E3)(c.getTag(t.TAGS.CELL_RENDERER),"helm")}))}));var S=n(296),L=n(820);(0,e.L1)("PolyTool: Enumerate",(()=>{let t,n,r;(0,e.gM)((async()=>{t=await(0,x.b2)(),n=await(0,b.pj)(),r=await A(),await n.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await E(r),await n.loadMonomerLib(!0)}));const o={single1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},"single-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,placeholders:[{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5P"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.[F4COO].L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5[F4COO]"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-[Tic]7T"}]},matrix1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Matrix,placeholders:[{position:1,monomers:["D","L"]},{position:4,monomers:["K","P","F4COO"]},{position:6,monomers:["Y","T"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].D.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2D-P5[F4COO]-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.K.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5K-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.P.L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5P-[Tic]7T"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.Y.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7Y"},{seq:"PEPTIDE1{[Ac(1)].L.W.G.[F4COO].L.T.[C(1)].G.[NH2]}$$$$V2.0",name:"-F2L-P5[F4COO]-[Tic]7T"}]}};for(const[t,n]of Object.entries(o))(0,e.t6)(`${t}`,(async()=>{const t=(0,L.o)(n.src,"",n.params);(0,e.J6)(t,n.tgt.map((t=>[t.seq,t.name])))}))})),(0,e.L1)("PolyTool: Enumerate",(()=>{let t,n,r;(0,e.gM)((async()=>{t=await(0,x.b2)(),n=await(0,b.pj)(),r=await A(),await n.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await E(r),await n.loadMonomerLib(!0)}));const o={breadth1:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},"breadth1-with-original":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]}],keepOriginal:!0},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:""},{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"}]},breadth2:{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K","Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.K.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5Y"}]},"breadth-double":{src:"PEPTIDE1{[Ac(1)].F.W.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",params:{type:S.aK.Single,breadthPlaceholders:[{start:2,end:4,monomers:["K"]},{start:2,end:4,monomers:["Y"]}]},tgt:[{seq:"PEPTIDE1{[Ac(1)].F.Y.G.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-K3Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.K.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-W3K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.K.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.P.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-K4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.K.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-G4K-P5Y"},{seq:"PEPTIDE1{[Ac(1)].F.Y.G.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-W3Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.Y.K.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-G4Y"},{seq:"PEPTIDE1{[Ac(1)].F.W.G.Y.L.[Tic].[C(1)].G.[NH2]}$$$$V2.0",name:"-P5K-K5Y"}]}};for(const[t,n]of Object.entries(o))(0,e.t6)(`${t}`,(async()=>{const t=(0,L.o)(n.src,"",n.params);(0,e.J6)(t,n.tgt.map((t=>[t.seq,t.name])))}))}));var M=n(269);(0,e.L1)("PolyTool: Chain: parseNotation",(()=>{let t;(0,e.gM)((async()=>{t=await(0,x.b2)()}));const n={cyclized:{src:{seq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI"},tgt:{helm:"PEPTIDE1{R.F.[C(1)].T.G.H.F.Y.P.[C(1)].[meI]}$$$$V2.0"}},dimerized1:{src:{seq:"(#3)Succ-{A(CHOL)-F-C(1)-T-G-H-Y-P-C(1)-NH2}"},tgt:{helm:"PEPTIDE1{[(#3)Succ]}|PEPTIDE2{[A(CHOL)].F.[C(1)].T.G.H.Y.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0"}},dimerized2:{src:{seq:"($3)Succ-{R-F-C(1)-T-G-H-F-P-C(1)-NH2}($2){A(CHOL)-F-C(1)-T-G-H-F-P-C(1)-NH2}"},tgt:{helm:"PEPTIDE1{[($3)Succ]}|PEPTIDE2{R.F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}|PEPTIDE3{[($2)A(CHOL)].F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0"}}};for(const[r,o]of Object.entries(n))(0,e.t6)(`${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=await M.s.parseNotation(o.src.seq,t),r=n.mol,i=t.createHelmWebEditor();i.editor.setMol(r);const s=i.editor.getHelm(),a=n.getNotationHelm();(0,e.E3)(s,o.tgt.helm),(0,e.E3)(a,o.tgt.helm)}),"reaction2"==r?{skipReason:"reverse reaction"}:void 0);const r={"0-in-4-4-3":{inIdx:0,spIdx:0,outIdx:0,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"3-in-4-4-3":{inIdx:3,spIdx:0,outIdx:3,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"4-in-4-4-3":{inIdx:0,spIdx:1,outIdx:4,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"7-in-4-4-3":{inIdx:3,spIdx:1,outIdx:7,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"8-in-4-4-3":{inIdx:0,spIdx:2,outIdx:8,monomers:[["0","1","2","3"],["4","5","6","7"],["8","9","10"]]},"0-in-1-1-6-3":{inIdx:0,spIdx:0,outIdx:0,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"1-in-1-1-6-3":{inIdx:0,spIdx:1,outIdx:1,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"2-in-1-1-6-3":{inIdx:0,spIdx:2,outIdx:2,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"3-in-1-1-6-3":{inIdx:1,spIdx:2,outIdx:3,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"7-in-1-1-6-3":{inIdx:5,spIdx:2,outIdx:7,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]},"8-in-1-1-6-3":{inIdx:0,spIdx:3,outIdx:8,monomers:[["0"],["1"],["2","3","4","5","6","7"],["8","9","10"]]}};for(const[t,{inIdx:n,spIdx:o,outIdx:i,monomers:s}]of Object.entries(r))(0,e.t6)(`innerIdx-${t}`,(async()=>{const[t,r]=(0,I.MH)(i,s);(0,e.E3)(t,n),(0,e.E3)(r,o)}));for(const[t,{inIdx:n,spIdx:o,outIdx:i,monomers:s}]of Object.entries(r))(0,e.t6)(`outerIdx-${t}`,(async()=>{const t=(0,I.jX)(n,o,s);(0,e.E3)(t,i)}))})),(0,e.L1)("PolyTool: Chain",(()=>{let t;(0,e.gM)((async()=>{t=await(0,x.b2)()}));const n={cyclized:{data:{templateSeq:"R-F-C(1)-T-G-H-F-Y-P-C(1)-meI",templateHelm:"PEPTIDE1{R.F.[C(1)].T.G.H.F.Y.P.[C(1)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F.C.T.G.H.F.Y.P.C.[meI]}$PEPTIDE1,PEPTIDE1,3:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[11],linkageCount:1}}},reaction1:{data:{templateSeq:"R-F-azG(4)-T-G-H-F-Y-P-aG(4)-meI",templateHelm:"PEPTIDE1{R.F.[azG(4)].T.G.H.F.Y.P.[aG(4)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F.[GGaz].T.G.H.F.Y.P}|PEPTIDE2{[meI]}$PEPTIDE1,PEPTIDE1,3:R3-9:R2|PEPTIDE1,PEPTIDE2,3:R4-1:R1$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[9,1],linkageCount:2}}},reaction2:{data:{templateSeq:"R-F-aG(4)-T-G-H-F-Y-P-azG(4)-meI",templateHelm:"PEPTIDE1{R.F.[aG(4)].T.G.H.F.Y.P.[azG(4)].[meI]}$$$$V2.0",mmHelm:"PEPTIDE1{R.F}|PEPTIDE2{T.G.H.F.Y.P.[GGaz].[meI]}$PEPTIDE1,PEPTIDE2,2:R2-7:R3|PEPTIDE2,PEPTIDE2,1:R1-7:R4,$$$V2.0"},tgt:{templateChain:{monomerCount:[11],linkageCount:0},mmChain:{monomerCount:[2,8],linkageCount:2}}},dimerized1:{data:{templateSeq:"(#3)Succ-{A(CHOL)-F-C(1)-T-G-H-Y-P-C(1)-NH2}",templateHelm:"PEPTIDE1{[(#3)Succ]}|PEPTIDE2{[A(CHOL)].F.[C(1)].T.G.H.Y.P.[C(1)].[NH2]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0",mmHelm:"PEPTIDE1{[(#3)Succ].[{A(CHOL)].F.C.T.G.H.Y.P.C.[NH2}]}$PEPTIDE1,PEPTIDE1,4:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[1,10],linkageCount:1},mmChain:{monomerCount:[11],linkageCount:1}}},dimerized2:{data:{templateSeq:"($3)Succ-{R-F-C(1)-T-G-H-F-P-C(1)-NH2}($3){A(CHOL)-F-C(1)-Y-H-G-D-N-C(1)-meI}",templateHelm:"PEPTIDE1{[($3)Succ]}|PEPTIDE2{R.F.[C(1)].T.G.H.F.P.[C(1)].[NH2]}|PEPTIDE3{[($3)A(CHOL)].F.[C(1)].Y.H.G.D.N.[C(1)].[meI]}$PEPTIDE1,PEPTIDE2,1:R1-1:R1$$$V2.0",mmHelm:"PEPTIDE1{[($3)Succ].[{R].F.C.T.G.H.F.P.C.[NH2}($3){A(CHOL)].F.[C(1)].Y.H.G.D.N.[C(1)].[meI}]}$PEPTIDE1,PEPTIDE1,4:R3-10:R3$$$V2.0"},tgt:{templateChain:{monomerCount:[1,10,10],linkageCount:1},mmChain:{monomerCount:[20],linkageCount:1}}}};for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`fromNotation-${r}`,(async()=>{const n=await(0,P.Q4)(["rules_example.json"]),r=M.s.fromNotation(o.templateSeq,n,t);r.check(!0),(0,e.J6)(r.monomers.map((t=>t.length)),i.mmChain.monomerCount),(0,e.E3)(r.linkages.length,i.mmChain.linkageCount),(0,e.E3)(r.getHelm(),o.mmHelm)}),"reaction2"==r?{skipReason:"reverse reaction"}:void 0);for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`parseNotation-${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=M.s.parseNotation(o.templateSeq,t);n.check(!0),(0,e.J6)(n.monomers.map((t=>t.length)),i.templateChain.monomerCount),(0,e.E3)(n.linkages.length,i.templateChain.linkageCount),(0,e.E3)(n.getHelm(),o.templateHelm),(0,e.E3)(n.getNotation(),o.templateSeq)}));for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`parseHelm-${r}`,(async()=>{await(0,P.Q4)(["rules_example.json"]);const n=M.s.parseHelm(o.templateHelm,t);n.check(!0),(0,e.J6)(n.monomers.map((t=>t.length)),i.templateChain.monomerCount),(0,e.E3)(n.linkages.length,i.templateChain.linkageCount),(0,e.E3)(n.getHelm(),o.templateHelm),(0,e.E3)(n.getNotation(),o.templateSeq)}));for(const[r,{data:o,tgt:i}]of Object.entries(n))(0,e.t6)(`applyRules-${r}`,(async()=>{const n=await(0,P.Q4)(["rules_example.json"]),r=M.s.parseNotation(o.templateSeq,t),s=await r.applyRules(n);s.check(!0),(0,e.J6)(s.monomers.map((t=>t.length)),i.mmChain.monomerCount),(0,e.E3)(s.linkages.length,i.mmChain.linkageCount),(0,e.E3)(s.getHelm(),o.mmHelm)}),{skipReason:"applyRules is not implemented"})})),(0,e.L1)("toAtomicLevel",(()=>{let n,r,o;(0,e.gM)((async()=>{r=await(0,b.pj)(),n=await A(),o=await(0,_.j)(),await r.loadMonomerLibForTests()})),(0,e.Pl)((async()=>{await E(n),await r.loadMonomerLib(!0)})),(0,e.t6)("override",(async()=>{const n=r.getMonomerLib(),i=await N.files.readAsText("tests/polytool-reaction-lib.json"),s=JSON.parse(i).find((t=>"GGaz"===t.symbol));(0,e.E3)(null!=s,!0,"Monomer 'GGaz' not found.");const a={PEPTIDE:{GGaz:s}},u=n.override(a,"test"),l=await(0,d.Q)(),c=t.Column.fromList(t.COLUMN_TYPE.STRING,"helm",["PEPTIDE1{F.P.Y.[GGaz].H.A.A.G.G.A.C}|PEPTIDE2{A.A.A}$PEPTIDE1,PEPTIDE2,4:R4-1:R1|PEPTIDE1,PEPTIDE1,11:R2-4:R3$$$V2.0"]);c.semType=t.SEMTYPE.MACROMOLECULE,c.meta.units=g.Hi.HELM;const f=await l.helmToAtomicLevel(c,!1,!1,u);(0,e.E3)(null!=f.molCol,!0,"Result molCol is null");const h=f.molCol.get(0);(0,e.E3)(!!h,!0,"Molfile is empty");const p=o.get_mol(h);try{const t=p.get_inchi(),n=o.get_inchikey_for_inchi(t);(0,e.E3)(p.get_num_bonds(),103),(0,e.E3)(p.get_num_atoms(),98),(0,e.E3)(n,"XPQUTLNSNIMERR-WKBTUBAPSA-N")}finally{p.delete()}})),(0,e.t6)("getNewMonomer",(async()=>{const t=await(0,_.j)(),n=r.getMonomerLib(),o=(await(0,P.Q4)(["rules_example.json"])).reactionRules.find((t=>"GGaz"==t.name)),[i,s]=(0,I.Tl)(t,n,o);(0,e.E3)(i[0],o.name);const a=t.get_mol(s[0].molfile);try{const n=a.get_inchi();t.get_inchikey_for_inchi(n),(0,e.E3)(a.get_num_bonds(),18),(0,e.E3)(a.get_num_atoms(),18)}finally{a.delete()}}))}));const N=new s;async function O(n,r,o){const i=await(0,e.N$)({category:n,test:r,testContext:o,verbose:!0});return t.DataFrame.fromObjects(i)}async function $(){await(0,e.Xb)(N,N.getModule("package-test.js"))}})(),sequencetranslator_test=r})();
3
3
  //# sourceMappingURL=package-test.js.map