-
Notifications
You must be signed in to change notification settings - Fork 5
/
lexiconMonoSeq.v0.19.0.min.js
8 lines (8 loc) · 49.6 KB
/
lexiconMonoSeq.v0.19.0.min.js
1
2
3
4
5
6
7
8
/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /npm/lexicon-mono-seq@1.4.0/lexiconMonoSeq.v0.19.0.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.LexiconMonoSeq=e()}(this,function(){function t(t,i){return new e(t="string"==typeof t?document.querySelector(t):t.nodeType&&1===t.nodeType?t:document.body,i)}function e(t,e){if(!this.__defaultStyleApplied){e&&(this.textRendering=e.textRendering),e&&(this.fontKerning=e.fontKerning),e&&(this.webkitFontSmoothing=e.webkitFontSmoothing);var i=document.createElement("style");i.textContent=this.Style.string(this),i.setAttribute("data-name","LexiconMonoSeqStyle"),document.head.appendChild(i),this.constructor.prototype.__defaultStyleApplied=!0}this.container=t,this.toggleClass(t,"LexiconMonoSeqContainer",!0),this._state="IDLE",this._labels=!0;var r=this.painters=Array.apply(null,Array(e&&e.parallelRendering||1)).map(function(t,e){return new this.Paint(this)},this);return r._counter=0,r._length=r.length,this.wrapper=document.createElement("div"),this.wrapper.className="LexiconMonoSeq wrapper custom",this.div=this.wrapper.appendChild(document.createElement("div")),this.div.className="LexiconMonoSeq main custom",this.divStyle=this.div.style,this.hidden=this.wrapper.appendChild(document.createElement("div")),this.hidden.className="LexiconMonoSeq hidden",this.hidden.textContent="A",this.busy=this.wrapper.appendChild(document.createElement("div")),this.busy.className="LexiconMonoSeq busy custom",this.busyStyle=this.busy.style,this.busy.textContent="⏳",this.sequences=[],this.currentAnimationFrame=new this.AnimLedger(this),this.ColorShift=new this.ColorShift(this),this.ColorShiftRgba=new this.ColorShiftRgba(this),this.update=function(t,i){(e=i||e)&&void 0!==e.labels&&(this._labels=!!e.labels,1)&&this.toggleClass(this.wrapper,"labelsOff",!e.labels),this.scrollLeftOffset=this.fontWidth*this.maxAllowedLabelLength,this.divStyle.transform="translate("+this.scrollLeftOffset+"px,0px)",this.source=t,this.getMaxSeqLength(t).currentAnimationFrame.cancelFrames().prepareForUpdate();var n=t.length,o=e&&e.ease?new this.Ease(e.ease[0],e.ease[1],{resolution:e.easeResolution,precision:e.easePrecision}):this.ease,s=this.sequences.filter(function(t,e){return!t.rm}).filter(function(t,e){return e>n-1&&(t.rm=!0)}),a=this.sequences.filter(function(e,i){return!e.rm&&(e.source=t[i])}),f=Array.apply(null,Array(t.length-a.length)).map(function(e,i){return(e=new this.Sequence(t[a.length+i],this)).painter=r[(++r._counter,r._counter%=r._length)],this.sequences.push(e),e},this);return s.length&&this.removeSequences(s,{ease:o,startTime:void 0,options:e}),a.length&&this.updateSequences(a,{ease:o,startTime:void 0,options:e}),f.length&&this.updateSequences(f,{ease:o,startTime:void 0,options:e}),e&&e.easePaint&&this.painters.forEach(function(t,i){t.ease=new this.Ease(e.easePaint[0],e.easePaint[1],{resolution:e.easePaintResolution,precision:e.easePaintPrecision})},this),e&&void 0!==e.durationPaint&&this.painters.forEach(function(t,i){t.duration=e.durationPaint},this),this},this.wrapper.addEventListener("scroll",this.repaintOnScroll(),!1),t.appendChild(this.wrapper),this}var i,r;return e.prototype.version="0.19.0",e.prototype._scrollLeftOffset=0,e.prototype._50spaces=" ",e.prototype.set=function(t,e){return this[t]=e,this},e.prototype.maxAllowedLabelLength=20,e.prototype.displayPadding=.2,e.prototype.generateRandomString=function(){return(1e9*Math.random()|0).toString(16)},e.prototype.common={opacities:{A:.95,B:.95,C:.95,U:.95,D:.95,E:.95,F:.95,G:.95,H:.95,I:.95,K:.95,L:.95,M:.95,N:.95,P:.95,Q:.95,R:.95,S:.95,T:.95,V:.95,W:.95,X:.95,Y:.95,Z:.95,"?":.8,"-":.8,":":.4,"*":.2,".":.1,"·":.05," ":0},opacitiesPunctuation:{"-":.8,":":.4,"*":.2,".":.1,"·":.05," ":0}},e.prototype.colors={aa:{A:"#ffffc9",C:"#e3f9ad",U:"#e3f9ad",E:"#f93333",D:"#fb7979",G:"#c0c0c0",F:"#c7c88a",I:"#ffff4f",H:"#d5f6fb",K:"#baaafc",M:"#c3ed27",L:"#ffff79",N:"#ee72a7",Q:"#f9c3e3",P:"#f1f2f3",S:"#ca9ec8",R:"#8694fa",T:"#f0e4ef",W:"#85b0cd",V:"#ffffab",Y:"#7dafb9",X:"#333333","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewClustal:{A:"#80a0f0",B:"#ffffff",C:"#f08080",U:"#f08080",D:"#c048c0",E:"#c048c0",F:"#80a0f0",G:"#f09048",H:"#15a4a4",I:"#80a0f0",K:"#f01505",L:"#80a0f0",M:"#80a0f0",N:"#00ff00",P:"#ffff00",Q:"#00ff00",R:"#f01505",S:"#00ff00",T:"#00ff00",V:"#80a0f0",W:"#80a0f0",X:"#ffffff",Y:"#15a4a4",Z:"#ffffff","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewZappo:{A:"#ffafaf",B:"#ffffff",C:"#ffff00",U:"#ffff00",D:"#ff0000",E:"#ff0000",F:"#ffc800",G:"#ff00ff",H:"#6464ff",I:"#ffafaf",K:"#6464ff",L:"#ffafaf",M:"#ffafaf",N:"#00ff00",P:"#ff00ff",Q:"#00ff00",R:"#6464ff",S:"#00ff00",T:"#00ff00",V:"#ffafaf",W:"#ffc800",X:"#ffffff",Y:"#ffc800",Z:"#ffffff","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewTaylor:{A:"#ccff00",B:"#ffffff",C:"#ffff00",U:"#ffff00",D:"#ff0000",E:"#ff0066",F:"#00ff66",G:"#ff9900",H:"#0066ff",I:"#66ff00",K:"#6600ff",L:"#33ff00",M:"#00ff00",N:"#cc00ff",P:"#ffcc00",Q:"#ff00cc",R:"#0000ff",S:"#ff3300",T:"#ff6600",V:"#99ff00",W:"#00ccff",X:"#ffffff",Y:"#00ffcc",Z:"#ffffff","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewHydrophobicity:{A:"#ad0052",B:"#0c00f3",C:"#c2003d",U:"#c2003d",D:"#0c00f3",E:"#0c00f3",F:"#cb0034",G:"#6a0095",H:"#1500ea",I:"#ff0000",K:"#0000ff",L:"#ea0015",M:"#b0004f",N:"#0c00f3",P:"#4600b9",Q:"#0c00f3",R:"#0000ff",S:"#5e00a1",T:"#61009e",V:"#f60009",W:"#5b00a4",X:"#680097",Y:"#4f00b0",Z:"#0c00f3","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewHelixPropensity:{A:"#e718e7",B:"#49b649",C:"#23dc23",U:"#23dc23",D:"#778877",E:"#ff00ff",F:"#986798",G:"#00ff00",H:"#758a75",I:"#8a758a",K:"#a05fa0",L:"#ae51ae",M:"#ef10ef",N:"#1be41b",P:"#00ff00",Q:"#926d92",R:"#6f906f",S:"#36c936",T:"#47b847",V:"#857a85",W:"#8a758a",X:"#758a75",Y:"#21de21",Z:"#c936c9","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewStrandPropensity:{A:"#5858a7",B:"#4343bc",C:"#9d9d62",U:"#9d9d62",D:"#2121de",E:"#0000ff",F:"#c2c23d",G:"#4949b6",H:"#60609f",I:"#ecec13",K:"#4747b8",L:"#b2b24d",M:"#82827d",N:"#64649b",P:"#2323dc",Q:"#8c8c73",R:"#6b6b94",S:"#4949b6",T:"#9d9d62",V:"#ffff00",W:"#c0c03f",X:"#797986",Y:"#d3d32c",Z:"#4747b8","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewTurnPropensity:{A:"#2cd3d3",B:"#f30c0c",C:"#a85757",U:"#a85757",D:"#e81717",E:"#778888",F:"#1ee1e1",G:"#ff0000",H:"#708f8f",I:"#00ffff",K:"#7e8181",L:"#1ce3e3",M:"#1ee1e1",N:"#ff0000",P:"#f60909",Q:"#3fc0c0",R:"#708f8f",S:"#e11e1e",T:"#738c8c",V:"#07f8f8",W:"#738c8c",X:"#7c8383",Y:"#9d6262",Z:"#5ba4a4","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewBuriedIndex:{A:"#00a35c",B:"#00eb14",C:"#0000ff",U:"#0000ff",D:"#00eb14",E:"#00f10e",F:"#008778",G:"#009d62",H:"#00d52a",I:"#0054ab",K:"#00ff00",L:"#007b84",M:"#009768",N:"#00eb14",P:"#00e01f",Q:"#00f10e",R:"#00fc03",S:"#00d52a",T:"#00db24",V:"#005fa0",W:"#00a857",X:"#00b649",Y:"#00e619",Z:"#00f10e","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewNucleotide:{A:"#64F73F",B:"#ffffff",C:"#FFB340",D:"#ffffff",G:"#EB413C",H:"#ffffff",I:"#ffffff",K:"#ffffff",M:"#ffffff",N:"#ffffff",R:"#ffffff",S:"#ffffff",T:"#3C88EE",U:"#3C88EE",V:"#ffffff",W:"#ffffff",X:"#ffffff",Y:"#ffffff","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},jalviewPurinePyrimidine:{A:"#FF83FA",B:"#ffffff",C:"#40E0D0",D:"#ffffff",G:"#FF83FA",H:"#ffffff",I:"#ffffff",K:"#ffffff",M:"#ffffff",N:"#ffffff",R:"#FF83FA",S:"#ffffff",T:"#40E0D0",U:"#40E0D0",V:"#ffffff",W:"#ffffff",X:"#ffffff",Y:"#40E0D0","?":"#333333","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},dna:{A:"#3f5fef",T:"#ee2f2f",G:"#2f2f2f",C:"#0f7f7f","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},ruler:{0:"#de9d00",1:"#de9d00",2:"#de9d00",3:"#de9d00",4:"#de9d00",5:"#de9d00",6:"#de9d00",7:"#de9d00",8:"#de9d00",9:"#de9d00","·":"#6f4f0f"," ":"#778899"},alphabet:{K:"#ffff96",M:"#cd9135",L:"#ca3e5e",W:"#ff98d5",T:"#538cd0",V:"#b2dccd",C:"#92f846",Y:"#afc84a",F:"#b9b9b9",G:"#ebebde",I:"#ffff00",D:"#ffc82f",E:"#ff7600",O:"#ff0000",B:"#af0d66",S:"#792187",A:"#0000b4",N:"#0c4b64",U:"#009a25",H:"#646464",P:"#af9b32",Z:"#3f190c",J:"#371370",X:"#00004a",R:"#254619",Q:"#000000","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"},number:{0:"#8dd3c7",1:"#ffffb3",2:"#bebada",3:"#fb8072",4:"#80b1d3",5:"#fdb462",6:"#b3de69",7:"#fccde5",8:"#d9d9d9",9:"#bc80bd","-":"#778899",":":"#778899","*":"#778899",".":"#778899","·":"#778899"," ":"#778899"}},e.prototype.opacities={aa:e.prototype.common.opacities,jalviewClustal:e.prototype.common.opacities,jalviewZappo:e.prototype.common.opacities,jalviewTaylor:e.prototype.common.opacities,jalviewHydrophobicity:e.prototype.common.opacities,jalviewHelixPropensity:e.prototype.common.opacities,jalviewStrandPropensity:e.prototype.common.opacities,jalviewTurnPropensity:e.prototype.common.opacities,jalviewBuriedIndex:e.prototype.common.opacities,jalviewNucleotide:e.prototype.common.opacities,jalviewPurinePyrimidine:e.prototype.common.opacities,dna:e.prototype.common.opacitiesPunctuation,alphabet:e.prototype.common.opacitiesPunctuation,number:e.prototype.common.opacitiesPunctuation,ruler:{"·":.05}},e.prototype.textColors={aa:"rgba(0,0,0,0.9)",jalviewClustal:"rgba(0,0,0,0.9)",jalviewZappo:"rgba(0,0,0,0.9)",jalviewTaylor:"rgba(0,0,0,0.9)",jalviewHydrophobicity:"rgba(255,255,255,0.8)",jalviewHelixPropensity:"rgba(255,255,255,0.8)",jalviewStrandPropensity:"rgba(255,255,255,0.8)",jalviewTurnPropensity:"rgba(255,255,255,0.8)",jalviewBuriedIndex:"rgba(255,255,255,0.8)",jalviewNucleotide:"rgba(0,0,0,0.9)",jalviewPurinePyrimidine:"rgba(0,0,0,0.9)",dna:"rgba(255,255,255,0.8)",alphabet:"rgba(0,0,0,0.9)",number:"rgba(255,255,255,0.8)",ruler:"rgba(0,0,0,0.9)"},e.prototype.caveManCopy=function(t){return JSON.parse(JSON.stringify(t))},e.prototype.registerType=function(t,i,r,n){var o=e.prototype;return t&&i&&(o.colors[t]=o.caveManCopy(i))&&r&&(o.textColors[t]=r)&&(n&&(o.opacities[t]=o.caveManCopy(n))||(o.opacities[t]={})),this},e.prototype.darkenColorScheme=function(t,e,i){e=e||"#7e7e7e";var r=t+"Dark";if(this.colors[r]&&!i)return r;var n=this.caveManCopy(this.colors[t]);return Object.keys(n).forEach(function(t){"function"==typeof e?n[t]=e(t,n[t]):"#ffffff"===n[t].toLowerCase()&&(n[t]=e.toLowerCase())}),this.registerType(r,n,this.textColors[t],this.opacities[t]),r},e.prototype.reDraw=function(){try{if(!this.source)throw new ReferenceError("No source is available, the source has been detached.");this.update(this.source)}catch(t){console.log(t.message)}finally{return this}},e.prototype.detach=function(){return delete this.source,this},e.prototype.ColorShift=function(t){this.colors=Object();var e=this,i=function(t,i){var r,n=""+t+i;return(r=e.colors[n])?r.f:((r=e.colors[n]=Object()).t=Object(),r.f=e.shift(t,i,r.t))};return i.clear=function(){return e.colors=Object(),t},i},e.prototype.ColorShift.prototype.shift=function(t,e,i){var r=Math.max,n=Math.min,o=+("0x"+t.slice(1,3)),s=+("0x"+t.slice(3,5)),a=+("0x"+t.slice(5)),f=+("0x"+e.slice(1,3)),c=+("0x"+e.slice(3,5)),h=+("0x"+e.slice(5));return function(t){var e,p=""+(t=(1e3*t|0)/1e3);return void 0!==(e=i[p])?e:i[p]="#"+("00"+(0|r(0,n(255,o+t*(f-o)))).toString(16)).slice(-2)+("00"+(0|r(0,n(255,s+t*(c-s)))).toString(16)).slice(-2)+("00"+(0|r(0,n(255,a+t*(h-a)))).toString(16)).slice(-2)}},e.prototype.ColorShiftRgba=function(t){this.colors=Object();var e=this,i=function(t,i){var r,n=""+t+i;return(r=e.colors[n])?r.f:((r=e.colors[n]=Object()).t=Object(),r.f=e.shift(t,i,r.t))};return i.clear=function(){return e.colors=Object(),t},i},e.prototype.ColorShiftRgba.prototype.rgx=/([0-9.]+)/gi,e.prototype.ColorShiftRgba.prototype.shift=function(t,e,i){var r=Math.max,n=Math.min,o=this.rgx,s=(t+e).match(o),a=+s[0],f=+s[1],c=+s[2],h=+s[3],p=+s[4],l=+s[5],u=+s[6],d=+s[7];return function(t){var e,o=""+(t=(1e3*t|0)/1e3);return void 0!==(e=i[o])?e:i[o]="rgba("+(0|r(0,n(255,a+t*(p-a))))+","+(0|r(0,n(255,f+t*(l-f))))+","+(0|r(0,n(255,c+t*(u-c))))+","+r(0,n(1,h+t*(d-h)))+")"}},e.prototype.interpolateAndStoreAtEnd=function(t,e,i,r,n){var o=t[e];return r<1?o+(i-o)*n:t[e]=i},e.prototype.interpolateAndStore=function(t,e,i,r){var n,o=t["_t"+e];return r>=1?(delete t["_t"+e],delete t["_"+e],t[e]=i):(r<o&&delete t["_"+e],n=t["_"+e]||(t["_"+e]=t[e]),t["_t"+e]=r,t[e]=n+(i-n)*r)},e.prototype.interpolateAndStoreArr=function(t,e,i){var r,n,o=t.length,s=t._t;if(i>=1){for(delete t._t,n=0;n<o;++n)delete t["_"+n],t[n]=e[n];return t}if(i<s)for(n=0;n<o;++n)delete t["_"+n];for(;~--o;)r=t["_"+o]||(t["_"+o]=t[o]),t[o]=r+(e[o]-r)*i;return t._t=i,t},e.prototype.interpolateAndStoreArrInt=function(t,e,i){var r,n,o=t.length,s=t._t;if(i>=1){for(delete t._t,n=0;n<o;++n)delete t["_"+n],t[n]=e[n];return t}if(i<s)for(n=0;n<o;++n)delete t["_"+n];for(;~--o;)r=t["_"+o]||(t["_"+o]=t[o]),t[o]=r+(e[o]-r)*i|0;return t._t=i,t},e.prototype.SVG=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");return e.setAttribute("viewBox","0 0 1 1"),e.setAttribute("preserveAspectRatio","none"),t&&t.appendChild(e),e},e.prototype.toggleClass=function(t,i,r,n){var o=t.className.split(" ").filter(function(t,e){return t}),s=o.indexOf(i),a=!~s;return r||void 0===r&&a?a&&(t.className=o.concat(i).join(" ")):!a&&(t.className=o.reduce(function(t,e,i,r){return i!==s&&(t+=e+" "),t},"")),n||(n={toggleClass:function(i,r){return e.prototype.toggleClass(t,i,r,n)}})},e.prototype._states=["state","DOMState"],Object.defineProperties(e.prototype,{state:{configurable:!1,get:function(){return this._state},set:function(t){"ANIM"===t?(this._state=t,this.busyStyle.visibility="visible"):"IDLE"===t&&(this._state=t,this.busyStyle.visibility="hidden")}},scrollLeftOffset:{configurable:!1,get:function(){return this._labels?this._scrollLeftOffset:0},set:function(t){this._labels&&(this._scrollLeftOffset=t)}},scrollLeft:{configurable:!1,get:function(){return this.wrapper.scrollLeft-this.scrollLeftOffset},set:function(t){this.wrapper.scrollLeft=t+this.scrollLeftOffset}},DOMState:{configurable:!1,get:function(){return this.painters.some(function(t,e){return t.active||0!==Object.keys(t.frames).length})?"ANIM":"IDLE"}},oState:{configurable:!1,get:function(){return this._states.every(function(t,e){return"IDLE"===this[t]},this)?"IDLE":"ANIM"}},fontRect:{configurable:!1,get:function(){if(this._fontRect)return this._fontRect;var t=this,e=document.createRange(),i=this.hidden.firstChild,r=i.length;return e.setStart(i,0),e.setEnd(i,r),window.requestAnimationFrame(function(){delete t._fontRect,e.detach&&e.detach()}),this._fontRect=e.getBoundingClientRect()}},fontWidth:{configurable:!1,get:function(){var t=this.hidden.firstChild.length;return this.fontRect.width/t}},fontHeight:{configurable:!1,get:function(){return this.fontRect.height}},fontRatio:{configurable:!1,get:function(){if(this._fontRatio)return this._fontRatio;var t=this;return window.requestAnimationFrame(function(){delete t._fontRatio}),this._fontRatio=this.fontWidth/this.fontHeight}},containerRect:{configurable:!1,get:function(){if(this._containerRect)return this._containerRect;var t=this;return window.requestAnimationFrame(function(){delete t._containerRect}),this._containerRect=this.container.getBoundingClientRect()}},containerHeight:{configurable:!1,get:function(){return this.containerRect.height}},mainRect:{configurable:!1,get:function(){if(this._mainRect)return this._mainRect;var t=this;return window.requestAnimationFrame(function(){delete t._mainRect}),this._mainRect=this.div.getBoundingClientRect()}},mainWidth:{configurable:!1,get:function(){return this.mainRect.width}},viewportRect:{configurable:!1,get:function(){if(this._viewportRect)return this._viewportRect;var t=this;return window.requestAnimationFrame(function(){delete t._viewportRect}),this._viewportRect=this.wrapper.getBoundingClientRect()}},viewportWidth:{configurable:!1,get:function(){return this.viewportRect.width}},viewportHeight:{configurable:!1,get:function(){return this.viewportRect.height}},viewportWidthInChar:{configurable:!1,get:function(){return this.viewportWidth/this.fontWidth}},isInViewport:{configurable:!1,value:function(t){var e=this.viewportRect;return t.x-e.left>0&&t.x-e.left<e.width&&t.y-e.top>0&&t.y-e.top<e.height}},innerWidth:{configurable:!1,get:function(){if(this._innerWidth)return this._innerWidth;var t=this;return window.requestAnimationFrame(function(){delete t._innerWidth}),this._innerWidth=Math.max(document.documentElement.clientWidth,window.innerWidth)}},getScreenWidth:{configurable:!1,get:function(){return this.innerWidth}},innerHeight:{configurable:!1,get:function(){if(this._innerHeight)return this._innerHeight;var t=this;return window.requestAnimationFrame(function(){delete t._innerHeight}),this._innerHeight=Math.max(document.documentElement.clientHeight,window.innerHeight)}},getScreenHeight:{configurable:!1,get:function(){return this.innerHeight}},getScreenWidthInChars:{configurable:!1,get:function(){return this.innerWidth/this.fontWidth}},getMaxDisplayableChars:{configurable:!1,get:function(){return this._getMaxDisplayableChars?this._getMaxDisplayableChars:this._getMaxDisplayableChars=Math.min(this.getScreenWidth,this.viewportWidth)/this.fontWidth}},getMaxDisplayableSequences:{configurable:!1,get:function(){return this._getMaxDisplayableSequences?this._getMaxDisplayableSequences:this._getMaxDisplayableSequences=Math.min(this.getScreenHeight,this.viewportHeight,this.containerHeight)/this.sequences[0].trackHeight}},getCurrentPosLeft:{configurable:!1,get:function(){if(this._getCurrentPosLeft)return this._getCurrentPosLeft;var t=this,e=this.getMaxTrackLength;return window.requestAnimationFrame(function(){delete t._getCurrentPosLeft}),this._getCurrentPosLeft={posLeft:(this.scrollLeft-e.posOffsetTransform)/e.width*e.sequenceLength*e.charWidth,posOffset:e.posOffset}}},getVisibleRangeVertical:{configurable:!1,get:function(){if(this._getVisibleRangeVertical)return this._getVisibleRangeVertical;var t=this,e=this.mainRect,i=this.containerRect,r=Math.max(e.top,i.top),n=Math.min(e.bottom,i.bottom),o={start:0,end:0},s=this.sequences.length,a=this.getMaxDisplayableSequences;return window.requestAnimationFrame(function(){delete t._getVisibleRangeVertical}),n<=r?(o.start=-1,o.end=-1,this._getVisibleRangeVertical=o):(o.start=(r-e.top)/e.height*s,o.offset=-o.start%1,o.start=0|Math.max(0,o.start-a*this.displayPadding),o.end=Math.ceil(Math.min(s,(n-e.top)/e.height*s+a*this.displayPadding)),this._getVisibleRangeVertical=o)}},getMaxTrackLength:{configurable:!1,get:function(){if(this._getMaxTrackLength)return this._getMaxTrackLength;for(var t,e=this.sequences,i=e.length-1,r=e[i];~--i;)e[i].options.svgWidthInPx>r.options.svgWidthInPx&&(r=e[i]);return t=r.options.svgWidthInPx,this.div.style.width=t+"px",this._getMaxTrackLength={posOffset:r.posOffset,posOffsetTransform:r.options.posOffsetTransform,width:t,charWidth:r.charWidth,sequenceLength:r.seq.length}}}}),e.prototype.strConcat=function(t){for(var e=String.fromCharCode,i=0,r=t.length-1,n=e(t[i]);i<r;++i)n+=e(t[i+1]);return n},e.prototype.getMaxSeqLength=function(t){return this.maxSeqLength=Math.max.apply(null,t.map(function(t,e){return t.seq.length})),this},e.prototype.getInfoFromEvent=function(t){var e;if(!this.isInViewport(e={x:void 0!==t.clientX?t.clientX:t.changedTouches[0].clientX,y:void 0!==t.clientY?t.clientY:t.changedTouches[0].clientY}))return{detail:"MISS"};var i=(e.y-this.mainRect.top)/this.mainRect.height*this.sequences.length|0,r=this.sequences[i],n=r&&r.slabRect,o=r&&r.textSlab,s=o&&o._seqArr;if(!s)return{detail:"MISS",state:this.oState,trackNumber:i,target:r};var a=r.rects.paintedRange,f=r.options,c=(e.x-n.left+f.transformXOffset-f.posOffsetTransform)/n.width*s.length,h=0|c,p=h+a.start;return void 0===s[h]?{detail:"MISS",state:this.oState,trackNumber:i,target:r}:{detail:"HIT",state:this.oState,trackNumber:i,target:r,pos:p,rPos:h,letter:String.fromCharCode(s[h]),offset:c-h}},e.prototype.garbage=function(){return this.detach(),this.wrapper.parentNode.removeChild(this.wrapper),this},e.prototype.getInfoFromRect=function(t){var e,i,r,n,o,s,a,f,c,h,p;if(!this.isInViewport({x:t.left,y:t.top}))return[];for(e=this.viewportRect,i=this._trackHeight,(t=this.caveManCopy(t)).width=Math.min(t.width,e.width-t.left+e.left),t.height=Math.min(t.height,e.height-t.top+e.top),a=t.width/this.fontWidth,n=[],r=0;"HIT"===(f=this.getInfoFromEvent({clientX:t.left,clientY:t.top+r})).detail&&(o=(s=f.target).textSlab._seqArr,c=f.rPos,h=Math.min(o.length,Math.ceil(c+a/s.charWidth+f.offset)),f.end=f.pos+h,f.captured=o.slice(c,h).map(function(t){return String.fromCharCode(t)})),p&&p===f.trackNumber||n.push(f),r!==t.height;r+=i,r=Math.min(r,t.height))p=f.trackNumber;return n},e.prototype.enableDrag=function(t){if(this._dragEnabled)return this;var e=this.wrapper,i=this.startDrag(t);return this._dragEnabled=!0,e.addEventListener("mousedown",i,!1),e.addEventListener("touchstart",i,!!this.quirks.passiveSupported&&{capture:!1,passive:!1}),this.toggleClass(e,"drag",!0),this},e.prototype.disableDrag=function(){if(!this._dragEnabled)return this;var t=this.wrapper;return delete this._dragEnabled,delete t._dragging,t.removeEventListener("mousedown",t._startDrag,!1),t.removeEventListener("touchstart",t._startDrag,!!this.quirks.passiveSupported&&{capture:!1,passive:!1}),delete t._startDrag,this.toggleClass(t,"drag",!1),this},e.prototype.startDrag=function(t){var e=this,i=this.container,r=this.wrapper,n=!1;return r._startDrag=function(o){n||(n=!0,window.requestAnimationFrame(function(){n=!1}),r._dragging||(o.preventDefault(),r._dragging=!0,e.Drag(e,i,r,t,o)))}},e.prototype.Drag=function(t,e,i,r,n){var o=void 0!==n.clientX?n.clientX:n.changedTouches[0].clientX,s=void 0!==n.clientY?n.clientY:n.changedTouches[0].clientY,a=t.scrollLeft,f=i.scrollTop,c=Object(),h=t.drag.bind(c,t,e,i,o,s,a,f,r),p=function(e){this.removeEventListener("resize",p,!1),this.removeEventListener("mouseup",p,!1),this.removeEventListener("touchend",p,!1),this.removeEventListener("touchmove",h,!!t.quirks.passiveSupported&&{capture:!1,passive:!1}),this.removeEventListener("mousemove",h,!1),t.quirks.enableScroll(),i._dragging=!1,r&&r.end&&r.end.call(t,e,r)};t.quirks.disableScroll(),window.addEventListener("resize",p,!1),window.addEventListener("mouseup",p,!1),window.addEventListener("touchend",p,!1),"touchstart"===n.type?(n.preventDefault(),window.addEventListener("touchmove",h,!!t.quirks.passiveSupported&&{capture:!1,passive:!1})):window.addEventListener("mousemove",h,!1)},e.prototype.drag=function(t,e,i,r,n,o,s,a,f){if(f.preventDefault(),!this.busy){this.dragStarted||(this.dragStarted=!0,a&&a.start&&a.start.call(t,f,a));var c=void 0!==f.clientX?f.clientX:f.changedTouches[0].clientX,h=void 0!==f.clientY?f.clientY:f.changedTouches[0].clientY,p=this;this.busy=!0,window.requestAnimationFrame(function(){p.busy=!1}),t.scrollLeft=o-(c-r),i.scrollTop=s-(h-n),a&&a.drag&&a.drag.call(t,f,a)}},e.prototype.skipFrames=function(t,e,i,r){t=t instanceof this.skipFrames.Timer?t:new this.skipFrames.Timer(t);var n=this;e="object"!=typeof e?{value:e,done:!0}:n.skipFrames.isExtractable(e)?e:{value:e,done:!0};return{_instance:n.skipFrames,_parent:i,_invoked:!1,_child:null,_isErrored:!1,_catch:r||null,then:function(i){this._invoked=!0;var r=this,o={value:void 0,done:!1},s=null,a=!1;return n.watchman(n,function(t){return e.value&&e.value._instance===n.skipFrames?(e.value._invoked||e.value.then(function(t){e.value=t}),!1):e.done&&t.decrement()<=0},function(){if(e.value instanceof Error)o.value=e.value,r._isErrored=!0;else try{if(s=i.call(n,e.value),!(a=n.skipFrames.isExtractable(s))&&(o.value=s)instanceof Error)throw o.value}catch(t){o.value=t,r._isErrored=!0}a?n.watchman(null,function(){return s.done},function(){n.skipFrames.Extractor(n,r,o,s).PerformCatch(n,r,o)},null):(o.done=!0,n.skipFrames.PerformCatch(n,r,o))},t),this._child=n.skipFrames(new n.skipFrames.Timer(1,t),o,this,this._catch)},skipFrames:function(i){return this._invoked=!0,this._child=n.skipFrames(new n.skipFrames.Timer(i,t),e,this,this._catch)},catch:function(t){return"function"==typeof t&&(this._catch=t,this._parent&&(this._parent._catch=t)),this}}},e.prototype.skipFrames.Catcher=function(t){throw t},e.prototype.skipFrames.PerformCatch=function(t,i,r){!i._child._invoked&&i._isErrored&&(i._catch?i._catch.call(t,r.value):e.prototype.skipFrames.Catcher.call(t,r.value))},e.prototype.skipFrames.Extractor=function(t,e,i,r){return i.value=r.value,i.done=r.done,i.value instanceof Error&&(e._isErrored=!0),t.skipFrames},e.prototype.skipFrames.isExtractable=function(t){return"object"==typeof t&&t.hasOwnProperty("done")&&t.hasOwnProperty("value")},e.prototype.skipFrames.Timer=function(t,e){this.counter=t||1,this.parent=e||0},e.prototype.skipFrames.Timer.prototype.valueOf=function(){return this.counter+this.parent},e.prototype.skipFrames.Timer.prototype.decrement=function(){return--this.counter,this},e.prototype.async=function(t){return this.skipFrames(1,"function"==typeof t?t.call(this):t)},e.prototype.quirks={busy:!1,parent:e.prototype,passiveSupported:!1,scrollDisabled:!1,disableScroll:function(){this.scrollDisabled||(this.parent.toggleClass(document.body,"lock-scroll",!0),document.body.addEventListener("touchmove",this.disableScrollFunction,!!this.passiveSupported&&{capture:!1,passive:!1}),this.scrollDisabled=!0)},enableScroll:function(){this.scrollDisabled&&(this.parent.toggleClass(document.body,"lock-scroll",!1),document.body.removeEventListener("touchmove",this.disableScrollFunction,!!this.passiveSupported&&{capture:!1,passive:!1}),this.scrollDisabled=!1)}},i=e.prototype.quirks,r=Object.defineProperty({},"passive",{get:function(){i.passiveSupported=!0}}),window.addEventListener("lexiconMonoSeqPassiveTest",null,r),i.disableScrollFunction=function(t){i.busy||(window.requestAnimationFrame(function(){i.busy=!1}),i.busy=!0,t.cancelable&&t.preventDefault())},t.createRuler=function(t,e,i){for(var r="",n=Math.max.apply(null,t.map(function(t,e){return t.seq.length*(t.charWidth||1)+(t.posOffset||0)})),o=1,s=20,a=0;~--n;)a?(a--,s++):((s%=20)?r+="·":(a=(""+o).length-1,r+=o,o+=20),s++);return e?(i?t.push({name:"ruler",seq:r,type:"ruler"}):t.unshift({name:"ruler",seq:r,type:"ruler"}),t):r},t.readClustal=function(t,i){var r,n,o,s,a=e.prototype.generateRandomString(),f=a.length,c=/(?:\s|\t)(?:[0-9]+(?:\s+)?)?$/,h=t.split("\n").slice(1).map(function(t,e,r){switch((this.sequence.test(t)<<1)+((i&&i.conservation&&this.previous)<<0)){case 3:return t;case 2:return this.previous=!0,t;case 1:return this.previous=!1,a+t;case 0:return!1}},{sequence:/([A-Z_\-0-9]+)\s+([A-Z\-]+)(?:\s+[0-9]+)?/i,previous:!1}).filter(Boolean).reduce(function(t,e,i,h){var p,l=e.split(/\s+/),u=e.indexOf(a)?l[0]:"Cons.";return r?p="Cons."!==u?e.slice(n,s):e.slice(n+f,s+f):(p=l[1],r=!0,n=e.indexOf(p),o=p.length,s=n+o),p=p.replace(c,""),t[u]?t[u]+=p:t[u]=p,t},{});return Object.keys(h).map(function(t,e){return{name:t,seq:h[t],charWidth:i&&i.charWidth||1,type:i&&i.type||"aa"}})},t.parseURL=function(t){var e=document.createElement("a");e.href=t;var i={source:t,protocol:e.protocol.replace(":",""),host:e.hostname,port:e.port,query:e.search,params:function(){for(var t,i={},r=e.search.replace(/^\?/,"").split("&"),n=r.length,o=0;o<n;o++)r[o]&&(i[(t=r[o].split("="))[0]]=t[1]);return i}(),file:(e.pathname.match(/\/?([^\/?#]+)$/i)||[,""])[1],hash:e.hash.replace("#",""),path:e.pathname.replace(/^([^\/])/,"/$1"),relative:(e.href.match(/tps?:\/\/[^\/]+(.+)/)||[,""])[1],segments:e.pathname.replace(/^\//,"").split("/")};return i.isLocal=!/^https?|^\/\//i.test(i.source),i},e.prototype.AnimLedger=function(t){Object.defineProperties(this,{a:this.returnDescriptor("a",t),u:this.returnDescriptor("u",t),r:this.returnDescriptor("r",t),s:this.returnDescriptor("s",t),sMan:this.returnDescriptor("sMan",t),l:this.returnDescriptor("l",t)}),this.instance=t},e.prototype.AnimLedger.prototype.nonCancelableFrames=["_r","_l"],e.prototype.AnimLedger.prototype.returnDescriptor=function(t,e){var i=Object();return i.configurable=!1,i.get=function(){return this["_"+t]},i.set=function(i){this["_"+t]=i,void 0===i&&this.getKeys().every(function(t,e){return void 0===this[t]},this)&&(e.state="IDLE")},i},e.prototype.AnimLedger.prototype.getKeys=function(){return Object.keys(this).filter(function(t,e){return"_"===t.slice(0,1)})},e.prototype.AnimLedger.prototype.getCancelable=function(){return this.getKeys().filter(function(t,e){return!~this.nonCancelableFrames.indexOf(t)},this)},e.prototype.AnimLedger.prototype.cancelFrames=function(){return this.getCancelable().forEach(function(t,e){window.cancelAnimationFrame(this[t]),this[t.slice(1)]=void 0},this),this},e.prototype.AnimLedger.prototype.prepareForUpdate=function(t){return this.instance.state="ANIM",this.instance.sequences.forEach(function(t,e){delete t.source}),this._a=void 0,this.instance.set("_trackHeight",void 0).set("_getMaxTrackLength",void 0).set("_getMaxDisplayableChars",void 0).set("_getMaxDisplayableSequences",void 0),this},e.prototype.Sequence=function(t,e){var i=document.createElement("div"),r=this.svg=e.SVG(i),n=i.appendChild(document.createElement("div")),o=i.appendChild(document.createElement("div"));this.set("rm",!1).set("_rm",!1).set("div",i).set("style",i.style).set("svg",r).set("styleSVG",r.style).set("textDiv",n).set("styleTextDiv",n.style).set("textSlab",o).set("styleTextSlab",o.style).set("parent",e).set("seq",t.seq).set("type",t.type).set("charWidth",t.charWidth||1).set("name",t.name).set("posOffset",t.posOffset||0).set("isVisible",!0),this.style.transform="translate("+-1*e.viewportWidth+"px,0px)",this.style.opacity=0,i.className="LexiconMonoSeq sequence custom",r.setAttribute("class","LexiconMonoSeq custom"),n.className="LexiconMonoSeq textDiv custom",o.className="LexiconMonoSeq textSlab custom",o._transformX=0,o._textColor="rgba(0,0,0,0)",e.div.appendChild(i),new e.Rect(this),t=void 0},Object.defineProperties(e.prototype.Sequence.prototype,{trackRect:{configurable:!1,get:function(){if(this._trackRect)return this._trackRect;var t=this;return window.requestAnimationFrame(function(){delete t._trackRect}),this._trackRect=this.svg.getBoundingClientRect()}},slabRect:{configurable:!1,get:function(){if(this._slabRect)return this._slabRect;var t=this;return window.requestAnimationFrame(function(){delete t._slabRect}),this._slabRect=this.textSlab.getBoundingClientRect()}},trackHeight:{configurable:!1,get:function(){var t=this.parent._trackHeight;return t||(this.parent._trackHeight=this.trackRect.height)}},unitLength:{configurable:!1,get:function(){return this.seq.length*this.charWidth}},isInTrack:{configurable:!1,writable:!1,value:function(t){var e=this.trackRect;return t.x-e.left>0&&t.x-e.left<e.width}},visibleRange:{configurable:!1,get:function(){var t=this.parent.getCurrentPosLeft,e=t.posLeft-(this.posOffset-t.posOffset),i=this.charWidth,r=this.unitLength,n=-e/i%1,o=this.parent.getMaxDisplayableChars/i,s=e/i;return e>=r?-1:{start:s,end:s+o,offset:n}}},adjustRange:{configurable:!1,writable:!1,value:function(t){var e=this.charWidth,i=this.parent.getMaxDisplayableChars/e,r=this.parent.displayPadding*i;return{start:Math.max(0,t.start-r|0),end:Math.min(this.seq.length,Math.max(0,Math.ceil(t.end+r))),offset:t.offset}}},rangeWithinRange:{configurable:!1,writable:!1,value:function(t,e){return t.start-e.start>=0&&t.end-e.end<=0}},rangeEqual:{configurable:!1,writable:!1,value:function(t,e){return t.start===e.start&&t.end===e.end}},withinVerticalRange:{configurable:!1,get:function(){var t=this.parent.sequences.indexOf(this),e=this.parent.getVisibleRangeVertical;return~t&&!this.rm&&t>=e.start&&t<e.end}},toggleVisibility:{configurable:!1,writable:!1,value:function(t){return(t=!!t)!==this.isVisible&&(this.isVisible=t,this.style.visibility=t?"visible":"hidden"),this}},update:{configurable:!1,writable:!1,value:function(t,e,i){var r=this.parent,n=r.sequences.indexOf(this),o=this.textSlab;if(!e.target)return this._rm||(r.toggleClass(this.div,"rm",!0),r.sequences.splice(n,1),this._rm=!0),this.style.transform="translate("+e.viewportWidth*t+"px,0px)",this.style.opacity=1-t,void(t>=1&&this.div.parentNode&&r.div.removeChild(this.div));if(!e.firstCall){var s=" <"+(n+1)+". ",a=s.length+" /> ".length,f=r.maxAllowedLabelLength-a,c=s+(this.name.length>f?this.name.slice(0,f-3)+"...":(this.name+r._50spaces).slice(0,f))+" /> ";c.length!==r.maxAllowedLabelLength&&(r.scrollLeftOffset=r.fontWidth*c.length,r.divStyle.transform="translate("+r.scrollLeftOffset+"px,0px)"),this.textDiv.textContent=c,o._textColorInterpolator=r.ColorShiftRgba(o._textColor,r.textColors[this.type]||"rgba(0,0,0,0.9)"),e.firstCall=!0}this.styleTextSlab.color=i<1?o._textColorInterpolator(t):o._textColor=o._textColorInterpolator(t)}},set:{configurable:!1,writable:!1,value:function(t,e){return this[t]=e,this}}}),e.prototype.Rect=function(t){SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;var e=t.parent;t.rects=this,this.id=e.generateRandomString(),this.parent=t,this.svg=t.svg,this.cNodes=this.svg.childNodes,this.stopWidths=[],this.stopOffsets=[],this.stopColors=[],this.stopOpacities=[],this.paintedRange={start:-1,end:-1},this.fragment=document.createDocumentFragment(),this.depot=new this.Depot(this)},e.prototype.Rect.prototype.getVal=function(t,e){return t[e].baseVal.value},e.prototype.Rect.prototype.setAttr=function(t,e,i){return this.chain(t).setAttr(e,i)},e.prototype.Rect.prototype.setVal=function(t,e,i){return this.chain(t).setVal(e,i)},e.prototype.Rect.prototype.chain=function(t){return t._chain||(t._chain=new this.Chain(t))},e.prototype.Rect.prototype.Chain=function(t){this.n=t},e.prototype.Rect.prototype.Chain.prototype.u=SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE,e.prototype.Rect.prototype.Chain.prototype.setAttr=function(t,e){return this.n.setAttribute(t,e),this},e.prototype.Rect.prototype.Chain.prototype.setVal=function(t,e){return this.n[t].baseVal.newValueSpecifiedUnits(this.u,e),this},e.prototype.Rect.prototype.rect=function(){return this.setAttr(document.createElementNS("http://www.w3.org/2000/svg","rect"),"fill","#ffffff").setAttr("fill-opacity",0).setVal("width",1).setVal("height",1).setVal("x",0).n}.call(e.prototype.Rect.prototype),e.prototype.Rect.prototype.setViewBox=function(t,e){var i=t.viewBox.baseVal;for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);return t},e.prototype.Rect.prototype.update=function(t){var e=this.parent.parent,i=this.parent,r=this.depot;if(!i.rm)if(i.withinVerticalRange){var n=i.options,o=i.visibleRange;if(t||!i.rangeWithinRange(o,this.paintedRange)||!i.isVisible){var s=i.adjustRange(o),a=s.end-s.start;if(a){r.claim(a);for(var f=[],c=this.cNodes.length,h=0;h<c;++h)f.push(this.cNodes[h]);r.borrow(f,a);var p,l,u,d,g,m,v,y=i.seq,b=i.type,w=n.uC;for(d=n.stopOffsets=[],p=0,l=s.start;p<a;++p)d.push((l+p)*w);for(d=n.stopOpacities=[],p=0,g=e.opacities[b];p<a;++p)u=+g[y[l+p]],d.push(u==u?u:.8);for(d=n.stopColors=[],p=0,u=(g=this.stopColors).length,m=e.colors[b];p<u;++p)d.push(e.ColorShift(g[p],m[y[l+p]]));if(n.rects=this,n.aR=s,h=f.length,this.paintedRange.end-s.end>=a)for(v=(s.start+a+1)*w;~--h;)this.stopOffsets[h]=v;else if(s.start-this.paintedRange.start>=a)for(v=(s.start-a)*w;~--h;)this.stopOffsets[h]=v;else if(i.rangeEqual(this.paintedRange,s))for(v=(s.start+s.end)/2*w;~--h;)this.stopOffsets[h]=v;(v=v/n.svgWidthInUnits*n.svgWidthInPx)&&(i.textSlab._transformX=v),this.paintedRange=s,i.painter.schedulePaint(f,n)}}}else r.claim()},e.prototype.Rect.prototype.Depot=function(t){this.isEmpty=!0,this.parent=t,this.rect=t.rect,this.svg=t.svg,this.cNodes=t.cNodes,this.mockSVG=t.parent.parent.SVG(),this.mockSVG.style.display="none",this.fragment=t.fragment,this.stopColors=t.stopColors,this.stopOffsets=t.stopOffsets,this.stopOpacities=t.stopOpacities,this.stopWidths=t.stopWidths},e.prototype.Rect.prototype.Depot.prototype.nodes=[],e.prototype.Rect.prototype.Depot.prototype.claim=function(t){if(t)for(;this.cNodes.length>t;)this.nodes.push(this.svg.removeChild(this.svg.lastChild)),this.stopOffsets.pop(),this.stopColors.pop(),this.stopOpacities.pop(),this.stopWidths.pop();else for(;this.svg.hasChildNodes();)this.nodes.push(this.svg.removeChild(this.svg.lastChild)),this.stopOffsets.pop(),this.stopColors.pop(),this.stopOpacities.pop(),this.stopWidths.pop();return this},e.prototype.Rect.prototype.Depot.prototype.borrow=function(t,e){for(var i;t.length<e;)i=this.nodes.pop()||this.rect.cloneNode(!1),t.push(this.fragment.appendChild(i)),this.stopOffsets.push(0),this.stopColors.push("#ffffff"),this.stopOpacities.push(0),this.stopWidths.push(1);return this.isEmpty&&(this.isEmpty=!1),this},e.prototype.Rect.prototype.Depot.prototype.emptyFragment=function(){for(this.mockSVG.appendChild(this.fragment);this.mockSVG.hasChildNodes();)this.nodes.push(this.mockSVG.removeChild(this.mockSVG.lastChild)),this.stopOffsets.pop(),this.stopColors.pop(),this.stopOpacities.pop(),this.stopWidths.pop();return!this.isEmpty&&(this.isEmpty=!0),this},e.prototype.Rect.prototype.Depot.prototype.transfer=function(){this.svg.appendChild(this.fragment),this.isEmpty=!0},e.prototype.Ease=function(t,e,i){this._resolution=i&&i.resolution||1e3,this._precision=i&&i.precision||1e-6,this._arr=[],this.registerEase(t,e);var r=this._arr,n=r.length,o=Math.max,s=Math.min;return function(t){return r[(n-2)*o(0,s(t,1))|0]}},e.prototype.Ease.prototype.returnParametric=function(t,e,i,r){return r?function(r){return 3*r*r*(1+3*e[t]-3*i[t])+6*r*(i[t]-2*e[t])+3*e[t]}:function(r){return 3*e[t]*(1-r)*(1-r)*r+3*i[t]*(1-r)*r*r+r*r*r}},e.prototype.Ease.prototype.registerEase=function(t,e){var i,r=this.returnParametric("x",t,e),n=this.returnParametric("x",t,e,!0),o=this.returnParametric("y",t,e),s=(this.returnParametric("y",t,e,!0),this._arr),a=this._resolution,f=1/a;a+=1;for(var c,h=0;h<=a;++h)c=o(i=this.getCloseXTo(f*h,r,n,i,this._precision)),s.push(c);return this},e.prototype.Ease.prototype.getCloseXTo=function(t,e,i,r,n){for(var o=1/n,s=-1*o,a=t,f=2*n;f/n|0;)if((a-=(f=e(a)-t)/i(a))>=o||a<=s)throw new RangeError("Target cannot be reached!");return a!=a&&(a=r),a},e.prototype.ease=new e.prototype.Ease({x:.75,y:0},{x:.25,y:1}),e.prototype.easeElastic=new e.prototype.Ease({x:1,y:-1},{x:0,y:2}),e.prototype.Paint=function(t){var e=this;this.parent=t,this.tasks=Object.defineProperties({},{_clearFrame:{configurable:!1,writable:!1,value:function(t,i){e.frames[t]&&window.cancelAnimationFrame(e.frames[t]),delete e.frames[t],i||Object.keys(e.frames).length||!e.active||this._resumeTask()}},_setTask:{configurable:!1,writable:!1,value:function(t,i){Object.keys(e.frames).length||(e.active=!1),e.tasks[t]=i,e.active||(e.active=!0,i[0]())}},_resumeTask:{configurable:!1,writable:!1,value:function(){var t=this._rndKey;t?e.tasks[t][0]():e.active=!1}},_rndKey:{configurable:!1,get:function(){var t=Object.keys(this).filter(function(t,e){return"_"!==t.slice(0,1)});return t[Math.random()*t.length|0]}},_destroyTasks:{configurable:!1,writable:!1,value:function(){for(var t,e=0,i=Object.keys(this),r=i.length;e<r;++e)"_"!==(t=i[e]).slice(0,1)&&delete this[t]}}}),this.frames={},this.active=!1,this.repaintScheduled=!1},e.prototype.Paint.prototype.schedulePaint=function(t,e){for(var i=t.length,r=[],n=0,o=0,s=0;n<i;++n,++o)(o%=this.nodeLimit)?r[s].push(t[n]):(r.push([t[n]]),s=r.length-1,n||(r[s]._firstTask=!0)),t[n]._i=n;e.tasks=r.map(function(t,i){return this.transformToTask(t,e)},this),this.tasks._setTask(e.rects.id,e.tasks)},e.prototype.Paint.prototype.ease=new e.prototype.Ease({x:.5,y:.1},{x:.75,y:.9}),e.prototype.Paint.prototype.nodeLimit=80,e.prototype.Paint.prototype.duration=150,e.prototype.Paint.prototype.cornerRadius=0,e.prototype.Paint.prototype.transformToTask=function(t,e){var i,r=this,n=r.parent,o=e.rects,s=t.length,a=function(l){l=(l-(i=i||l))/r.duration;var u=e.tasks,m=r.ease(l);t._firstTask&&(n.interpolateAndStoreArrInt(g,d,m),h.textContent=n.strConcat(g),p.transform="translate("+(h._transformX=y+(b-y)*m)+"px,0px)",l||f||(f=!0,o.depot.transfer(),c.toggleVisibility(!0)));for(var v=0,w=0,x=null;v<s;++v)w=(x=t[v])._i,x.parentNode&&o.setVal(x,"width",n.interpolateAndStoreAtEnd(o.stopWidths,w,e.uC,l,m)).setVal("x",n.interpolateAndStoreAtEnd(o.stopOffsets,w,e.stopOffsets[w],l,m)).setAttr("fill",l<1?e.stopColors[w](m):o.stopColors[w]=e.stopColors[w](m)).setAttr("fill-opacity",n.interpolateAndStoreAtEnd(o.stopOpacities,w,e.stopOpacities[w],l,m));if(l>=1)return u.shift(),void(u.length?u[0]():(delete r.tasks[o.id],delete r.frames[o.id],r.tasks._resumeTask()));r.frames[o.id]=window.requestAnimationFrame(a)};if(t._firstTask){for(var f=!1,c=e.target,h=c.textSlab,p=c.styleTextSlab,l=e.aR,u=l.end-l.start,d=c.seq.slice(l.start,l.end).split("").map(function(t,e){return t.charCodeAt(0)}),g=h._seqArr=h._seqArr||Array.apply(null,Array(u)).map(function(t,e){return"@".charCodeAt(0)}),m=g[g.length-1],v=e.svgWidthInPx,y=h._transformX,b=e.transformXOffset+e.stopOffsets[0]/e.svgWidthInUnits*v;g.length<u;)g.push(m);for(;g.length>u;)g.pop()}return function(){r.frames[o.id]=window.requestAnimationFrame(a)}},e.prototype.toggleLabels=function(t,e){window.cancelAnimationFrame(this.currentAnimationFrame.l),this.state="ANIM";var i,r,n,o=this,s=this.scrollLeftOffset,a="number"==typeof this.sequenceTextDivOpacity?this.sequenceTextDivOpacity:1,f=e&&e.duration||1500,c=e&&e.ease?new this.Ease(e.ease[0],e.ease[1],{resolution:e.easeResolution,precision:e.easePrecision}):this.easeElastic;return t?(r=this.fontWidth*this.maxAllowedLabelLength,n=1):(r=0,n=0),this.currentAnimationFrame.l=window.requestAnimationFrame(function t(e){var h=c(e=(e-(i=i||e))/f);o.scrollLeftOffset=s+(r-s)*h,o.divStyle.transform="translate("+o.scrollLeftOffset+"px,0px)";for(var p,l=o.sequences.length;~--l;)(p=o.sequences[l]).rm||(p.styleTextDiv.opacity=o.sequenceTextDivOpacity=a+(n-a)*e,!e&&n?p.styleTextDiv.visibility="visible":e>=1&&!n&&(p.styleTextDiv.visibility="hidden"));if(e>=1)return o.currentAnimationFrame.l=void 0,void++o.scrollLeft;o.currentAnimationFrame.l=window.requestAnimationFrame(t)}),this},e.prototype.removeSequences=function(t,e){var i=this,r={viewportWidth:this.viewportWidth};return t.forEach(function(t,e){delete t.painter.frames[t.rects.id]}),this.currentAnimationFrame.r=window.requestAnimationFrame(function n(o){e.startTime=e.startTime||o,o=e.ease((o-e.startTime)/(e.options&&e.options.duration||1500));for(var s=t.length;~--s;)t[s].update(o,r);i.currentAnimationFrame.r=o>=1?void 0:window.requestAnimationFrame(n)}),this},e.prototype.appendSequences=function(t,e){window.requestAnimationFrame(function i(r){e.startTime=e.startTime||r,r=e.ease((r-e.startTime)/(e.options&&e.options.duration||1500));for(var n,o=t.length;~--o;)(n=t[o].target).rm||(n.style.transform="translate("+t[o].viewportWidth*(r-1)+"px,0px)",n.style.opacity=r);r>=1||window.requestAnimationFrame(i)})},e.prototype.updateSequences=function(t,e){var i=this,r=t[0].source?"u":"a",n=this.fontWidth,o=this.viewportWidth;return t=t.map(function(t,e){var i=t.source||t;"u"===r&&(t.seq=i.seq,t.charWidth=i.charWidth||1,t.type=i.type,t.name=i.name,t.posOffset=i.posOffset||0);var s=(t.charWidth-1)*n,a=t.unitLength*this.fontRatio,f=t.unitLength*n,c=t.posOffset*n,h=t.style,p=t.styleTextDiv;return h.letterSpacing=s+"px",h.width=f+"px",t.styleSVG.width=f+"px",t.styleSVG.transform=c?"translate("+c+"px,0px)":"none",p.letterSpacing="normal",t.rects.setViewBox(t.svg,{width:a}),t.options={frameKey:r,viewportWidth:o,uC:t.charWidth*this.fontRatio,target:t,firstCall:!1,posOffsetTransform:c,transformXOffset:c+s/2,svgWidthInUnits:a,svgWidthInPx:f}},this),"a"===r&&this.appendSequences(t,{ease:e.ease,startTime:void 0,options:e.options}),this.repaint(!0),this.currentAnimationFrame[r]=window.requestAnimationFrame(function n(o){var s,a,f=t.length;for(e.startTime=e.startTime||o,o=(o-e.startTime)/(e.options&&e.options.duration||1500),a=e.ease(o);~--f&&(s=t[f]);)s.target.update(a,s,o);if(o>=1)for(i.currentAnimationFrame[r]=void 0,f=t.length;~--f&&(s=t[f]);)delete s.target.source;else i.currentAnimationFrame[r]=window.requestAnimationFrame(n)}),this},e.prototype.Style=function(t){return["body.lock-scroll {","\toverflow:hidden;","}",".LexiconMonoSeqContainer {","}","div.LexiconMonoSeq,svg.LexiconMonoSeq {","\tborder:0px;","\tmargin:0px;","\tpadding:0px;","\tbox-sizing:border-box;","}","div.LexiconMonoSeq.wrapper {","\twidth:100%;","\theight:100%;","\toverflow:auto;","\tfont-size:16px;","\t-webkit-overflow-scrolling:touch;","\tfont-family: Consolas","}","div.LexiconMonoSeq.wrapper::-webkit-scrollbar-track {","\t-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);","\tborder-radius: 0px;","\tbackground-color: #F5F5F5;","}","div.LexiconMonoSeq.wrapper::-webkit-scrollbar {","\twidth: 8px;","\theight: 8px;","\tbackground-color: #F5F5F5;","}","div.LexiconMonoSeq.wrapper::-webkit-scrollbar-thumb {","\tborder-radius: 0px;","\t-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);","\tbackground-color: #555;","}","div.LexiconMonoSeq.wrapper.drag {","\tcursor: move;","}","div.LexiconMonoSeq.main,div.LexiconMonoSeq.hidden {","\tfont-size:100%;","\twhite-space:pre;",t.textRendering?"\ttext-rendering:"+t.textRendering+";":"",t.fontKerning?"\tfont-kerning:"+t.fontKerning+";":"",t.webkitFontSmoothing?"\t-webkit-font-smoothing:"+t.webkitFontSmoothing+";":"","}","div.LexiconMonoSeq.sequence {","\tdisplay:table;","}","div.LexiconMonoSeq.textDiv {","\tbackground-color: rgba(0,0,0,0.8);","\tcolor: rgba(255,255,255,0.9);","\tdisplay: table;","\ttransform: translate(-100%,0%);","}","div.LexiconMonoSeq.textSlab {","\tposition:absolute;"," \ttop:0px;","\tleft:0px;","\tz-index:-1;","\theight:100%;","}","svg.LexiconMonoSeq {","\tdisplay:block;","\tposition:absolute;"," \ttop:0px;","\tleft:0px;","\theight:100%;","\tz-index:-2;","\toverflow:hidden;","}","div.LexiconMonoSeq.hidden {","\tposition:absolute;","\ttop:1px;","\tleft:1px;","\tvisibility:hidden;","}","div.LexiconMonoSeq.busy {","\tposition:absolute;","\tvisibility:hidden;","\tz-index:1;","\ttop:0px;","\tleft:0px;","\tfont-size:500%;","}","div.LexiconMonoSeq.wrapper.labelsOff > .main {","\ttransform: translate(0px,0px) !important;","}","div.LexiconMonoSeq.wrapper.labelsOff .textDiv {","\tvisibility: hidden !important;","}"].filter(function(t,e){return t})},e.prototype.Style.string=function(t){return this(t).join("\n")},e.prototype.Style.array=function(t){return this(t)},e.prototype.scrollToPos=function(t,e,i){window.cancelAnimationFrame(this.currentAnimationFrame.s);var r,n,o,s,a=this,f=i&&i.ease?new this.Ease(i.ease[0],i.ease[1],{resolution:i.easeResolution,precision:i.easePrecision}):this.ease,c=i&&i.duration||1500,h=this.scrollToPos.methods;a.state="ANIM",a.currentAnimationFrame.s=window.requestAnimationFrame(function(){a.currentAnimationFrame.s=window.requestAnimationFrame(function(){r=a.viewportWidth,n=a.viewportHeight,a.currentAnimationFrame.s=window.requestAnimationFrame(function(){o=a.getMaxTrackLength,s=a._trackHeight,a.currentAnimationFrame.s=window.requestAnimationFrame(h.moveTo(t,e,a,f,c,r,n,o,s))})})})},e.prototype.scrollToPos.methods={moveTo:function(t,e,i,r,n,o,s,a,c){var h,p=i.scrollLeft,l=Math.max(0,t/(a.sequenceLength*a.charWidth+a.posOffset)*(a.width+a.posOffsetTransform)-o/2)-p,u=i.wrapper.scrollTop,d=("number"!=typeof e?u:Math.max(0,e*c-s/2))-u;return f=function(t){var e=r(t=(t-(h=h||t))/n);i.scrollLeft=p+l*e,i.wrapper.scrollTop=u+d*e,i.currentAnimationFrame.s=t>=1?void 0:window.requestAnimationFrame(f)},f}},e.prototype.repaintOnScroll=function(){var t=this,e=function(i){e._busy||(t.currentAnimationFrame.sMan=window.requestAnimationFrame(function(){t.painters.every(function(t,e){return!t.repaintScheduled})&&t.repaint(),e._busy=!1,t.currentAnimationFrame.sMan=void 0}),e._busy=!0,t.state="ANIM",t.busyStyle.top=t.container.scrollTop+"px")};return e},e.prototype.repaint=function(t){if(!this.painters.some(function(t,e){return t.repaintScheduled})){this.painters.forEach(function(t,e){t.repaintScheduled=!0});this.watchman(this,function(t){var e,i,r,n;if("IDLE"===this.state?t.counter++:t.counter=0,1!==t.counter||t.framesCleared){if(23===t.counter)for(i=(e=this.sequences).length;~--i;)e[i].toggleVisibility(!1);else if(24===t.counter)for(i=(e=this.sequences).length;~--i;)!(r=e[i].rects.depot).isEmpty&&r.emptyFragment()}else{for(t.framesCleared=!0,i=(e=this.sequences).length;~--i;)(n=e[i]).painter.tasks._clearFrame(n.rects.id,!0);this.painters.forEach(function(t,e){t.tasks._destroyTasks()})}return t.counter>=25},function(e){for(var i=this.sequences,r=i.length;~--r;)i[r].rects.update(t);this.painters.forEach(function(t,e){t.repaintScheduled=!1})},{counter:0,framesCleared:!1})}},e.prototype.watchman=function(t,e,i,r){var n={value:void 0};return n.value=window.requestAnimationFrame(function o(){e.call(t,r)?i.call(t,r):n.value=window.requestAnimationFrame(o)}),n},e.prototype.fetch=function(e,i){i=i||"text";var r=t.parseURL(e),n=r.isLocal,o=new XMLHttpRequest,s="text"===i?"responseText":"response",a={done:!1,value:null};return n?(a.done=!0,a.value=new Error("Your URL refers to a local path. Fetch will not work.")):(o.responseType=i,o.onload=function(){a.done=!0,a.value=o[s]},o.onerror=function(t){a.done=!0,a.value=new Error("Request to "+r.file+" has failed.")},o.open("GET",r.source,!0),o.send()),this.async(a)},e.prototype.isFontLoaded=function(t,e){e=(+e||6e4)/17|0,t=(+t||170)/17|0;var i=this.hidden,r=i.parentNode,n=r.appendChild(i.cloneNode(!0)),o=r.appendChild(i.cloneNode(!0)),s=document.createRange(),a=document.createRange(),f={done:!1,value:null},c=!1,h=function(t){return Math.round(100*t)/100};return n.textContent="AYE",o.textContent="AYE",n.style.fontFamily="UnknownTestFont",s.setStart(n.firstChild,0),s.setEnd(n.firstChild,3),a.setStart(o.firstChild,0),a.setEnd(o.firstChild,3),this.watchman(this,function(i){var r,n;if(!(++i.counter%t))return i.counter>=e?(c=!0,!0):(r=s.getBoundingClientRect(),n=a.getBoundingClientRect(),h(r.width)!==h(n.width)||h(r.height)!==h(n.height))},function(t){f.done=!0,f.value=!c||new Error("Font detection timedout."),s.detach&&s.detach(),a.detach&&a.detach(),r.removeChild(n),r.removeChild(o)},{counter:-1}),this.async(f)},t});
//# sourceMappingURL=/sm/718730e5988e2ea52c4f59d980d6add52e689e5700684ad90e62d3490ead1ee1.map