var ProtvistaPdb=function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=14)}([function(t,e){t.exports=d3},function(t,e,i){"use strict";i.r(e),i.d(e,"DefaultTemplateProcessor",(function(){return j})),i.d(e,"defaultTemplateProcessor",(function(){return P})),i.d(e,"directive",(function(){return n})),i.d(e,"isDirective",(function(){return a})),i.d(e,"removeNodes",(function(){return l})),i.d(e,"reparentNodes",(function(){return o})),i.d(e,"noChange",(function(){return c})),i.d(e,"AttributeCommitter",(function(){return x})),i.d(e,"AttributePart",(function(){return w})),i.d(e,"BooleanAttributePart",(function(){return S})),i.d(e,"EventPart",(function(){return T})),i.d(e,"isPrimitive",(function(){return _})),i.d(e,"NodePart",(function(){return k})),i.d(e,"PropertyCommitter",(function(){return A})),i.d(e,"PropertyPart",(function(){return C})),i.d(e,"parts",(function(){return O})),i.d(e,"render",(function(){return D})),i.d(e,"templateCaches",(function(){return M})),i.d(e,"templateFactory",(function(){return I})),i.d(e,"TemplateInstance",(function(){return f})),i.d(e,"SVGTemplateResult",(function(){return m})),i.d(e,"TemplateResult",(function(){return y})),i.d(e,"createMarker",(function(){return v})),i.d(e,"isTemplatePartActive",(function(){return g})),i.d(e,"Template",(function(){return u})),i.d(e,"html",(function(){return q})),i.d(e,"svg",(function(){return $}));
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
const r=new WeakMap,n=t=>(...e)=>{const i=t(...e);return r.set(i,!0),i},a=t=>"function"==typeof t&&r.has(t)
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */,s=void 0!==window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,o=(t,e,i=null,r=null)=>{let n=e;for(;n!==i;){const e=n.nextSibling;t.insertBefore(n,r),n=e}},l=(t,e,i=null)=>{let r=e;for(;r!==i;){const e=r.nextSibling;t.removeChild(r),r=e}},c={},h=`{{lit-${String(Math.random()).slice(2)}}}`,d=`\x3c!--${h}--\x3e`,p=new RegExp(`${h}|${d}`);class u{constructor(t,e){this.parts=[],this.element=e;let i=-1,r=0;const n=[],a=e=>{const s=e.content,o=document.createTreeWalker(s,133,null,!1);let l,c;for(;o.nextNode();){i++,l=c;const e=c=o.currentNode;if(1===e.nodeType){if(e.hasAttributes()){const n=e.attributes;let a=0;for(let t=0;t<n.length;t++)n[t].value.indexOf(h)>=0&&a++;for(;a-- >0;){const n=t.strings[r],a=b.exec(n)[2],s=a.toLowerCase()+"$lit$",o=e.getAttribute(s).split(p);this.parts.push({type:"attribute",index:i,name:a,strings:o}),e.removeAttribute(s),r+=o.length-1}}"TEMPLATE"===e.tagName&&a(e)}else if(3===e.nodeType){const t=e.nodeValue;if(t.indexOf(h)<0)continue;const a=e.parentNode,s=t.split(p),o=s.length-1;r+=o;for(let t=0;t<o;t++)a.insertBefore(""===s[t]?v():document.createTextNode(s[t]),e),this.parts.push({type:"node",index:i++});a.insertBefore(""===s[o]?v():document.createTextNode(s[o]),e),n.push(e)}else if(8===e.nodeType)if(e.nodeValue===h){const t=e.parentNode,a=e.previousSibling;null===a||a!==l||a.nodeType!==Node.TEXT_NODE?t.insertBefore(v(),e):i--,this.parts.push({type:"node",index:i++}),n.push(e),null===e.nextSibling?t.insertBefore(v(),e):i--,c=l,r++}else{let t=-1;for(;-1!==(t=e.nodeValue.indexOf(h,t+1));)this.parts.push({type:"node",index:-1})}}};a(e);for(const t of n)t.parentNode.removeChild(t)}}const g=t=>-1!==t.index,v=()=>document.createComment(""),b=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F \x09\x0a\x0c\x0d"'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
class f{constructor(t,e,i){this._parts=[],this.template=t,this.processor=e,this.options=i}update(t){let e=0;for(const i of this._parts)void 0!==i&&i.setValue(t[e]),e++;for(const t of this._parts)void 0!==t&&t.commit()}_clone(){const t=s?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),e=this.template.parts;let i=0,r=0;const n=t=>{const a=document.createTreeWalker(t,133,null,!1);let s=a.nextNode();for(;i<e.length&&null!==s;){const t=e[i];if(g(t))if(r===t.index){if("node"===t.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(s),this._parts.push(t)}else this._parts.push(...this.processor.handleAttributeExpressions(s,t.name,t.strings,this.options));i++}else r++,"TEMPLATE"===s.nodeName&&n(s.content),s=a.nextNode();else this._parts.push(void 0),i++}};return n(t),s&&(document.adoptNode(t),customElements.upgrade(t)),t}}
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */class y{constructor(t,e,i,r){this.strings=t,this.values=e,this.type=i,this.processor=r}getHTML(){const t=this.strings.length-1;let e="";for(let i=0;i<t;i++){const t=this.strings[i];let r=!1;e+=t.replace(b,(t,e,i,n)=>(r=!0,e+i+"$lit$"+n+h)),r||(e+=d)}return e+this.strings[t]}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}class m extends y{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),e=t.content,i=e.firstChild;return e.removeChild(i),o(e,i.firstChild),t}}
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */const _=t=>null===t||!("object"==typeof t||"function"==typeof t);class x{constructor(t,e,i){this.dirty=!0,this.element=t,this.name=e,this.strings=i,this.parts=[];for(let t=0;t<i.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new w(this)}_getValue(){const t=this.strings,e=t.length-1;let i="";for(let r=0;r<e;r++){i+=t[r];const e=this.parts[r];if(void 0!==e){const t=e.value;if(null!=t&&(Array.isArray(t)||"string"!=typeof t&&t[Symbol.iterator]))for(const e of t)i+="string"==typeof e?e:String(e);else i+="string"==typeof t?t:String(t)}}return i+=t[e],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class w{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===c||_(t)&&t===this.value||(this.value=t,a(t)||(this.committer.dirty=!0))}commit(){for(;a(this.value);){const t=this.value;this.value=c,t(this)}this.value!==c&&this.committer.commit()}}class k{constructor(t){this.value=void 0,this._pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(v()),this.endNode=t.appendChild(v())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t._insert(this.startNode=v()),t._insert(this.endNode=v())}insertAfterPart(t){t._insert(this.startNode=v()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this._pendingValue=t}commit(){for(;a(this._pendingValue);){const t=this._pendingValue;this._pendingValue=c,t(this)}const t=this._pendingValue;t!==c&&(_(t)?t!==this.value&&this._commitText(t):t instanceof y?this._commitTemplateResult(t):t instanceof Node?this._commitNode(t):Array.isArray(t)||t[Symbol.iterator]?this._commitIterable(t):this._commitText(t))}_insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}_commitNode(t){this.value!==t&&(this.clear(),this._insert(t),this.value=t)}_commitText(t){const e=this.startNode.nextSibling;t=null==t?"":t,e===this.endNode.previousSibling&&e.nodeType===Node.TEXT_NODE?e.textContent=t:this._commitNode(document.createTextNode("string"==typeof t?t:String(t))),this.value=t}_commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value&&this.value.template===e)this.value.update(t.values);else{const i=new f(e,t.processor,this.options),r=i._clone();i.update(t.values),this._commitNode(r),this.value=i}}_commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let i,r=0;for(const n of t)i=e[r],void 0===i&&(i=new k(this.options),e.push(i),0===r?i.appendIntoPart(this):i.insertAfterPart(e[r-1])),i.setValue(n),i.commit(),r++;r<e.length&&(e.length=r,this.clear(i&&i.endNode))}clear(t=this.startNode){l(this.startNode.parentNode,t.nextSibling,this.endNode)}}class S{constructor(t,e,i){if(this.value=void 0,this._pendingValue=void 0,2!==i.length||""!==i[0]||""!==i[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=i}setValue(t){this._pendingValue=t}commit(){for(;a(this._pendingValue);){const t=this._pendingValue;this._pendingValue=c,t(this)}if(this._pendingValue===c)return;const t=!!this._pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)),this.value=t,this._pendingValue=c}}class A extends x{constructor(t,e,i){super(t,e,i),this.single=2===i.length&&""===i[0]&&""===i[1]}_createPart(){return new C(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class C extends w{}let E=!1;try{const t={get capture(){return E=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}class T{constructor(t,e,i){this.value=void 0,this._pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=i,this._boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this._pendingValue=t}commit(){for(;a(this._pendingValue);){const t=this._pendingValue;this._pendingValue=c,t(this)}if(this._pendingValue===c)return;const t=this._pendingValue,e=this.value,i=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),r=null!=t&&(null==e||i);i&&this.element.removeEventListener(this.eventName,this._boundHandleEvent,this._options),r&&(this._options=L(t),this.element.addEventListener(this.eventName,this._boundHandleEvent,this._options)),this.value=t,this._pendingValue=c}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const L=t=>t&&(E?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */;class j{handleAttributeExpressions(t,e,i,r){const n=e[0];if("."===n){return new A(t,e.slice(1),i).parts}if("@"===n)return[new T(t,e.slice(1),r.eventContext)];if("?"===n)return[new S(t,e.slice(1),i)];return new x(t,e,i).parts}handleTextExpression(t){return new k(t)}}const P=new j;
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */function I(t){let e=M.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},M.set(t.type,e));let i=e.stringsArray.get(t.strings);if(void 0!==i)return i;const r=t.strings.join(h);return i=e.keyString.get(r),void 0===i&&(i=new u(t,t.getTemplateElement()),e.keyString.set(r,i)),e.stringsArray.set(t.strings,i),i}const M=new Map,O=new WeakMap,D=(t,e,i)=>{let r=O.get(e);void 0===r&&(l(e,e.firstChild),O.set(e,r=new k(Object.assign({templateFactory:I},i))),r.appendInto(e)),r.setValue(t),r.commit()},q=(t,...e)=>new y(t,e,"html",P),$=(t,...e)=>new m(t,e,"svg",P);
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */},function(t,e,i){"use strict";var r=i(5),n="object"==typeof self&&self&&self.Object===Object&&self,a=r.a||n||Function("return this")();e.a=a},function(t,e,i){"use strict";(function(t){var r=i(5),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===n&&r.a.process,o=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();e.a=o}).call(this,i(8)(t))},function(t,e,i){"use strict";(function(t){var r=i(2),n=i(11),a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof t&&t&&!t.nodeType&&t,o=s&&s.exports===a?r.a.Buffer:void 0,l=(o?o.isBuffer:void 0)||n.a;e.a=l}).call(this,i(8)(t))},function(t,e,i){"use strict";(function(t){var i="object"==typeof t&&t&&t.Object===Object&&t;e.a=i}).call(this,i(17))},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",r=t[3];if(!r)return i;if(e&&"function"==typeof btoa){var n=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),a=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[i].concat(a).concat([n]).join("\n")}var s;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},n=0;n<this.length;n++){var a=this[n][0];null!=a&&(r[a]=!0)}for(n=0;n<t.length;n++){var s=t[n];null!=s[0]&&r[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),e.push(s))}},e}},function(t,e,i){var r,n,a={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===n&&(n=r.apply(this,arguments)),n}),o=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,i){if("function"==typeof t)return t();if(void 0===e[t]){var r=o.call(this,t,i);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),c=null,h=0,d=[],p=i(16);function u(t,e){for(var i=0;i<t.length;i++){var r=t[i],n=a[r.id];if(n){n.refs++;for(var s=0;s<n.parts.length;s++)n.parts[s](r.parts[s]);for(;s<r.parts.length;s++)n.parts.push(m(r.parts[s],e))}else{var o=[];for(s=0;s<r.parts.length;s++)o.push(m(r.parts[s],e));a[r.id]={id:r.id,refs:1,parts:o}}}}function g(t,e){for(var i=[],r={},n=0;n<t.length;n++){var a=t[n],s=e.base?a[0]+e.base:a[0],o={css:a[1],media:a[2],sourceMap:a[3]};r[s]?r[s].parts.push(o):i.push(r[s]={id:s,parts:[o]})}return i}function v(t,e){var i=l(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===t.insertAt)r?r.nextSibling?i.insertBefore(e,r.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),d.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var n=l(t.insertAt.before,i);i.insertBefore(e,n)}}function b(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=d.indexOf(t);e>=0&&d.splice(e,1)}function f(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return i.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),v(t,e),e}function y(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function m(t,e){var i,r,n,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var s=h++;i=c||(c=f(e)),r=w.bind(null,i,s,!1),n=w.bind(null,i,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),v(t,e),e}(e),r=S.bind(null,i,e),n=function(){b(i),i.href&&URL.revokeObjectURL(i.href)}):(i=f(e),r=k.bind(null,i),n=function(){b(i)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=g(t,e);return u(i,e),function(t){for(var r=[],n=0;n<i.length;n++){var s=i[n];(o=a[s.id]).refs--,r.push(o)}t&&u(g(t,e),e);for(n=0;n<r.length;n++){var o;if(0===(o=r[n]).refs){for(var l=0;l<o.parts.length;l++)o.parts[l]();delete a[o.id]}}}};var _,x=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function w(t,e,i,r){var n=i?"":r.css;if(t.styleSheet)t.styleSheet.cssText=x(e,n);else{var a=document.createTextNode(n),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(a,s[e]):t.appendChild(a)}}function k(t,e){var i=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function S(t,e,i){var r=i.css,n=i.sourceMap,a=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||a)&&(r=p(r)),n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var s=new Blob([r],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(s),o&&URL.revokeObjectURL(o)}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,i){var r=i(15);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(7)(r,n);r.locals&&(t.exports=r.locals)},function(t,e){t.exports=ResizeObserver},function(t,e,i){"use strict";e.a=function(){return!1}},function(t,e,i){"use strict";(function(t){var r=i(2),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===n?r.a.Buffer:void 0,o=s?s.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var i=t.length,r=o?o(i):new t.constructor(i);return t.copy(r),r}}).call(this,i(8)(t))},,function(t,e,i){t.exports=i(24)},function(t,e,i){(t.exports=i(6)(!1)).push([t.i,'protvista-checkbox {\n  font-size: 12px;\n}\n\nprotvista-checkbox[disabled] {\n  opacity: 0.50;\n}\n\n.protvista_checkbox {\n  position: relative;\n  cursor: pointer;\n  box-sizing: border-box;\n  display: flex;\n  align-items: center;\n  margin-top: 10px;\n  line-height: 24px;\n  outline: none;\n  font-size: 1em;\n}\n\n.protvista_checkbox_input {\n  opacity: 0;\n  width: 0;\n  height: 0;\n  margin: 0;\n}\n\n.protvista_checkbox_label {\n  display: flex;\n  flex-direction: column;\n  text-indent: 1em;\n  margin-left: 16px;\n}\n\n.protvista_checkbox_input + .protvista_checkbox_label::before {\n  content: "";\n  width:  24px;\n  position: absolute;\n  left: 0;\n  top:  0;\n  bottom: 0;\n  border-radius: 4px;\n  display: block;\n  box-sizing: border-box;\n  border: 1px solid #bdc3c7;\n}\n',""])},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,r=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(n=0===a.indexOf("//")?a:0===a.indexOf("/")?i+a:r+a.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){var r=i(19);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(7)(r,n);r.locals&&(t.exports=r.locals)},function(t,e,i){(t.exports=i(6)(!1)).push([t.i,"protvista-pdb-variation {\n  display: flex;\n  width: 100%;\n}\n\nprotvista-pdb-variation svg {\n  background-color: #fff;\n}\n\nprotvista-pdb-variation circle {\n  opacity: 0.6;\n}\nprotvista-pdb-variation circle:hover {\n  opacity: 0.9;\n}\nprotvista-pdb-variation .tick line,\nprotvista-pdb-variation .axis path {\n  opacity: 0.1;\n}\n\nprotvista-pdb-variation .protvista-highlight {\n  fill: #ffe999;\n}\n\nprotvista-pdb-variation .variation-y-right line,\nprotvista-pdb-variation .axis path {\n  fill: none;\n  stroke: none;\n}\n\n.pvVariantPlotSection {\n  padding-left: 9px !important;\n}\n",""])},function(t,e,i){var r=i(21);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i(7)(r,n);r.locals&&(t.exports=r.locals)},function(t,e,i){e=t.exports=i(6)(!1);var r=i(22)(i(23));e.push([t.i,'.protvista-pdb {\r\n    font-family: Helvetica,Arial,FreeSans,"Liberation Sans",sans-serif !important;\r\n    position: relative;\r\n    /* width: 100%; */\r\n    border: 1px solid lightgray;\r\n    margin-bottom: 20px;\r\n    padding: 20px 10px;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n}\r\n\r\n\r\n.protvistaRow {\r\n    display: table;\r\n    width: 100%;\r\n    clear: both;\r\n}\r\n\r\n.protvistaCol1 {\r\n    display: table-cell;\r\n    vertical-align: middle;\r\n    width: 15%;\r\n    font-size:90%;\r\n}\r\n\r\n.protvistaCol2 {\r\n    display: table-cell;\r\n    width: 85%;\r\n    overflow: hidden;\r\n    padding-left: 10px;\r\n}\r\n\r\n@media (max-width: 1800px) {\r\n    .protvistaCol1 {\r\n        width: 20%;\r\n        font-size:90%;\r\n    }\r\n    .protvistaCol2 {\r\n        width: 80%;\r\n    }\r\n}\r\n\r\n@media (max-width: 1400px) {\r\n    .protvistaCol1 {\r\n        width: 22%;\r\n        font-size:90%;\r\n    }\r\n    .protvistaCol2 {\r\n        width: 78%;\r\n    }\r\n}\r\n\r\n@media (max-width: 1100px) {\r\n    .protvistaCol1 {\r\n        width: 25%;\r\n        font-size:75%;\r\n    }\r\n    .protvistaCol2 {\r\n        width: 75%;\r\n    }\r\n}\r\n\r\n@media (max-width: 1000px) {\r\n    .protvistaCol1 {\r\n        width: 27%;\r\n        font-size:70%;\r\n    }\r\n    .protvistaCol2 {\r\n        width: 73%;\r\n    }\r\n}\r\n\r\n@media (max-width: 767px) {\r\n    .protvistaCol1 {\r\n        width: 30%;\r\n        font-size:70%;\r\n    }\r\n    .protvistaCol2 {\r\n        width: 70%;\r\n    }\r\n}\r\n\r\n.category-label {\r\n    border-top: 1px solid #fff;\r\n    border-bottom: 1px solid #fff;\r\n    background-color: #b2f5ff;\r\n    cursor: pointer;\r\n    padding: .8em 1.3em .8em .8em;\r\n    position: relative;\r\n}\r\n\r\n.category-label:hover {\r\n    background-color: #80EEFF;\r\n}\r\n\r\n.category-label::before {\r\n    content: \' \';\r\n    display: inline-block;\r\n    width: 0;\r\n    height: 0;\r\n    border-top: 5px solid transparent;\r\n    border-bottom: 5px solid transparent;\r\n    border-left: 5px solid #333;\r\n    margin-right: 5px;\r\n    -webkit-transition: all .1s;\r\n    /* Safari */\r\n    transition: all .1s;\r\n}\r\n\r\n.protvistaRow.expanded > .category-label {\r\n    background-color: #80EEFF;\r\n}\r\n\r\n.protvistaRow.expanded > .category-label::before {\r\n    content: \' \';\r\n    display: inline-block;\r\n    width: 0;\r\n    height: 0;\r\n    border-left: 5px solid transparent;\r\n    border-right: 5px solid transparent;\r\n    border-top: 5px solid #333;\r\n    margin-right: 5px;\r\n}\r\n\r\n.track-label {\r\n    background-color: #d9faff;\r\n    padding: 0.5em 1.2em 0.5em 1.8em;\r\n    cursor:pointer;\r\n    position: relative;\r\n}\r\n\r\n.category-label.pdbIconsLabel, .track-label.pdbIconsLabel {\r\n    border-left: 1px solid #b2f5ff;\r\n    border-right: 1px solid #b2f5ff;\r\n    background-color: #fff;\r\n}\r\n\r\n.aggregate-track-content, .track-content-single {\r\n    opacity: 1;\r\n    -webkit-transition: opacity .1s;\r\n    /* Safari */\r\n    transition: opacity .1s;\r\n    border-bottom: 1px solid #b2f5ff;\r\n}\r\n\r\n.aggregate-track-content{\r\n    padding-bottom: 5px;\r\n}\r\n\r\n.track-label, .track-content {\r\n    border-bottom: 1px solid #b2f5ff;\r\n}\r\n\r\n.top-border {\r\n    border-top: 1px solid #b2f5ff;\r\n}\r\n\r\n.is-hidden{\r\n    display: none!important;\r\n}\r\n\r\n.pdbIcon {\r\n    display: inline-block;\r\n    padding: 5px 4px;\r\n}\r\n\r\n.pdbIcon i {\r\n    color: #fff;\r\n    font-size: 21px;\r\n}\r\n\r\n.pdbIcon.rotate i {\r\n    filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=1);\r\n    -webkit-transform: rotate(90deg);\r\n    -moz-transform: rotate(90deg);\r\n    -ms-transform: rotate(90deg);\r\n    -o-transform: rotate(90deg);\r\n    transform: rotate(90deg);\r\n    display: inline-block;\r\n}\r\n\r\n.legendRow{\r\n    min-height: 30px;\r\n    line-height: 30px;\r\n}\r\n\r\n.legendColor {\r\n    display: inline-block;\r\n    height:10px;\r\n    width:26px;\r\n}\r\n\r\n.legendText{\r\n    /* min-width: 135px; */\r\n    display: inline-block;\r\n    font-size: 90%;\r\n    text-align: left;\r\n    color:#333;\r\n    margin-left: 2px;\r\n}\r\n\r\n.protvistaRowGroup{\r\n    max-height: 210px;\r\n    overflow-y: auto;\r\n    clear: both;\r\n    display: none;\r\n}\r\n\r\n.protvistaRowGroup.noPaddingRight > .protvistaRow > .protvistaCol2 {\r\n    padding-right: 0 !important;\r\n}\r\n\r\n.labelZoomIcon{\r\n    position: absolute;\r\n    left: 5px;\r\n    cursor: zoom-in;\r\n    color: #848a86;\r\n    top: 50%;\r\n    transform: translateY(-50%);\r\n    font-size: 12px;\r\n}\r\n\r\n.labelZoomIcon.active{\r\n    cursor: zoom-out!important;\r\n    color: #009e38!important;\r\n}\r\n\r\n.hideLabelIcon{\r\n    position: absolute;\r\n    right: 5px;\r\n    cursor: pointer;\r\n    color: #848a86;\r\n    top: 10%;\r\n    transform: translateY(-10%);\r\n    font-size: 10px;\r\n}\r\n\r\n.protvistaResetSectionIcon{\r\n    position: absolute;\r\n    border: 1px solid #828181;\r\n    background-color: #828181;\r\n    border-radius: 50%;\r\n    cursor: pointer;\r\n    text-align: center;\r\n    text-align: center;\r\n    width: 20px;\r\n    height: 20px;\r\n    line-height: 19px;\r\n    right: 10px;\r\n    display: none;\r\n}\r\n\r\n.protvistaResetSectionIcon i{\r\n    color: #fff;\r\n    cursor: pointer;\r\n    font-size:80%;\r\n}\r\n\r\n.protvistaToolbar{\r\n    text-align: right;\r\n}\r\n\r\n.protvistaToolbarIcon{\r\n    display: inline-block;\r\n    border: 1px solid #828181;\r\n    background-color: #828181;\r\n    border-radius: 50%;\r\n    margin-right: 10px;\r\n    cursor: pointer;\r\n    text-align: center;\r\n    text-align: center;\r\n    width: 30px;\r\n    height: 30px;\r\n    line-height: 28px;\r\n}\r\n\r\n.protvistaToolbar i{\r\n    color: #fff;\r\n    cursor: pointer;\r\n    margin:2px;\r\n}\r\n\r\n.protvistaRangeMenuTitle{\r\n    position: relative;\r\n    color: #1b1919;\r\n}\r\n\r\n.protvistaRangeMenuTitle > div{\r\n    padding: 10px 10px 0 10px;\r\n}\r\n\r\n.protvistaRangeMenuTitle > div:first-child{\r\n    font-weight: bold;\r\n    text-align: left;\r\n}\r\n\r\n.protvistaMenuClose{\r\n    position: absolute;\r\n    right: 10px;\r\n    top: 14px;\r\n    color: #6d6d6d;\r\n    font-size: 12px;\r\n    cursor: pointer;\r\n}\r\n\r\n.protvistaForm{\r\n    padding: 10px;\r\n    font-size: 12px;\r\n    max-height: 300px;\r\n    overflow: auto;\r\n    text-align: left;\r\n    font-weight: 600;\r\n    color: #444;\r\n}\r\n\r\n.divWithScroll {\r\n    position: relative;\r\n    clear: both;\r\n    overflow-y: scroll;\r\n    height:40px;\r\n}\r\n\r\n.label-tooltip .label-tooltip-text {\r\n    visibility: hidden;\r\n    /*white-space: nowrap;*/\r\n    width: 400px;\r\n    background-color: black;\r\n    color: #fff;\r\n    text-align: center;\r\n    border-radius: 6px;\r\n    padding: 5px;\r\n    position: absolute;\r\n    z-index: 1;\r\n    top: 5px;\r\n    left: 100%;\r\n}\r\n  \r\n.label-tooltip .label-tooltip-text::after {\r\n    content: "";\r\n    position: absolute;\r\n    top: 50%;\r\n    right: 100%;\r\n    margin-top: -5px;\r\n    border-width: 5px;\r\n    border-style: solid;\r\n    border-color: transparent black transparent transparent;\r\n}\r\n  \r\n.label-tooltip:hover .label-tooltip-text {\r\n    visibility: visible;\r\n}\r\n\r\n.protvista-pdb protvista-pdb-navigation .handle, \r\n.protvista-pdb protvista-navigation .handle {\r\n    fill: darkgray;\r\n    height: 19px !important;\r\n    stroke: black;\r\n}\r\n\r\nprotvista-tooltip {\r\n    z-index: 50000;\r\n    position: absolute;\r\n    min-width: 220px;\r\n    max-width: 350px;\r\n    margin-top: 20px;\r\n    margin-left: -20px;\r\n    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n    -moz-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\r\n    box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);\r\n    /*opacity: .9;*/\r\n}\r\n\r\nprotvista-tooltip[mirror="H"] {\r\n    margin-left: 0;\r\n    margin-right: 20px;\r\n}\r\n\r\nprotvista-tooltip .tooltip-header .tooltip-header-title{\r\n    color: #ffffff;\r\n}\r\n\r\n/* protvista-tooltip a,\r\nprotvista-tooltip a:link,\r\nprotvista-tooltip a:hover,\r\nprotvista-tooltip a:active,\r\nprotvista-tooltip a:visited {\r\n    color: #ffffff;\r\n} */\r\n\r\nprotvista-tooltip .tooltip-body {\r\n    /* color: #ffffff; */\r\n    color: #555;\r\n}\r\n\r\nprotvista-tooltip .tooltip-header {\r\n    background-color: #595959;\r\n    line-height: 3em;\r\n}\r\n\r\n/* protvista-tooltip .tooltip-header::before {\r\n    content: " ";\r\n    position: absolute;\r\n    bottom: 100%;\r\n    left: 20px;\r\n    margin-left: -10px;\r\n    border-width: 10px;\r\n    border-style: solid;\r\n    border-color: transparent transparent black transparent;\r\n} */\r\n\r\nprotvista-tooltip[mirror="H"] .tooltip-header::before {\r\n    left: initial;\r\n    right: 20px;\r\n}\r\n\r\nprotvista-tooltip .tooltip-header .tooltip-header-title {\r\n    /* background-color: #000000;\r\n    font-weight: 700;\r\n    line-height: 1em;\r\n    display: inline-block;\r\n    vertical-align: middle;\r\n    padding-left: .4em; */\r\n    font-weight: 400;\r\n    white-space: nowrap;\r\n    letter-spacing: .05em;\r\n    font-size: 1.1em;\r\n    background-color: #595959;\r\n    line-height: 2em;\r\n    padding: 0 .7em;\r\n    color: #FFF;\r\n}\r\n\r\nprotvista-tooltip .tooltip-body {\r\n    padding: 1em;\r\n    background: #FFF;\r\n    font-weight: normal;\r\n    max-height: 160px;\r\n    overflow-x: hidden;\r\n    overflow-y: auto;\r\n}\r\n\r\nprotvista-tooltip .tooltip-close {\r\n    height: 3em;\r\n    width: 3em;\r\n    display: inline-block;\r\n    background-repeat: no-repeat;\r\n    background-position: center;\r\n    background-image: url('+r+');\r\n    cursor: pointer;\r\n    vertical-align: middle;\r\n}\r\n\r\nprotvista-tooltip .tooltip-close:hover {\r\n    background-color: #1a1a1a;\r\n}\r\n\r\nprotvista-tooltip table td {\r\n    padding: .5em .5em;\r\n    vertical-align: top;\r\n}\r\n\r\nprotvista-tooltip table td:first-child {\r\n    font-weight: 600;\r\n    text-align: right\r\n}\r\n\r\nprotvista-tooltip table td p {\r\n    margin-top: 0;\r\n}\r\n\r\nprotvista-tooltip table thead, table tbody, table tfoot {\r\n    /* border: 0px solid #f1f1f1;\r\n    background-color: #616161; */\r\n    background-color: #FFF;\r\n}\r\n\r\nprotvista-tooltip .tooltip-body table tbody{\r\n    font-size: 12px;\r\n}\r\n\r\nprotvista-tooltip table tbody tr:nth-child(even) {\r\n    border-bottom: 0;\r\n    /* background-color: #616161; */\r\n    background-color: #FFF;\r\n}\r\n\r\nprotvista-tooltip .tooltip-body table tbody h4, protvista-tooltip .tooltip-body table tbody h5{\r\n    text-align: left;\r\n    font-size: 14px;\r\n    font-weight: bold;\r\n    color: #333;\r\n}\r\n\r\nprotvista-tooltip h4, protvista-tooltip h5 {\r\n    margin: 0;\r\n}\r\n\r\nprotvista-tooltip table {\r\n    border-spacing: 0;\r\n    border-collapse: collapse;\r\n    background-color: #FFF;\r\n    /* -webkit-box-shadow: 5px 5px 2px 0 rgba(0,0,0,.1);\r\n    -moz-box-shadow: 5px 5px 2px 0 rgba(0,0,0,.1);\r\n    box-shadow: 5px 5px 2px 0 rgba(0,0,0,.1); */\r\n    width: 100%;\r\n    font-family:Verdana,Arial,sans-serif;\r\n    font-size: 93%;\r\n}\r\n\r\nprotvista-tooltip  table td {\r\n    /* border: 1px solid #CCC; */\r\n    color: #555;\r\n}\r\n\r\nprotvista-tooltip  table tr td:first-child {\r\n    font-weight: 700;\r\n}\r\n\r\n/* filter */\r\nul.filter-list {\r\n    list-style:none;\r\n    margin:0;\r\n    padding:0;\r\n}\r\nul.filter-list a {\r\n    cursor:pointer;\r\n}\r\n.filter-list li {\r\n    margin: .4em 0;\r\n}\r\n.filter-select-trigger {\r\n    text-decoration:none;\r\n}\r\n.filter-select-wrapper {\r\n    box-sizing: border-box;\r\n    display:inline-block;\r\n    border-radius:.2em;\r\n    margin-right: .2em;\r\n    margin-left: .3em;\r\n    line-height: .2em;\r\n    padding: .2em;\r\n    border: .1em solid rgba(255, 0, 0, 0);\r\n}\r\n.filter-select {\r\n    margin:0;\r\n    box-sizing:border-box;\r\n    border-radius:.2em;\r\n    width:1.2em;\r\n    height:1.2em;\r\n    display:inline-block;\r\n    background-color: #333333;\r\n}\r\n.filter-select-trigger:hover .filter-select-wrapper {\r\n    border: .1em solid rgba(255, 0, 0, .5);\r\n}\r\n.filter-select-trigger.active .filter-select-wrapper {\r\n    border: .1em solid rgba(255, 0, 0, .9);\r\n}\r\n\r\n.pdbIconsId {\r\n    color: #0000EE !important;\r\n    /* border-bottom: none !important;\r\n    min-width: 43px; */\r\n    display: inline-block;\r\n}\r\n\r\n.pdbIconsId:visited {\r\n    color: #551A8B !important;\r\n    border-bottom: none !important;\r\n}\r\n\r\n.pdbIconslogoA {\r\n    border-bottom: none !important;\r\n}\r\n\r\n.pdbIconslogo {\r\n    display: inline-block;\r\n    padding: 0px 4px;\r\n    height: 18px;\r\n    line-height: 18px;\r\n}\r\n@media (max-width: 1000px) {\r\n    .pdbIconsId{\r\n        min-width: 25px;\r\n    }\r\n    .pdbIconsWrapper{\r\n        display: block;\r\n    }\r\n}\r\n\r\n.protvista-pdb a, .protvista-pdb a:visited {\r\n    border-bottom-width: 1px;\r\n    border-bottom-style: dotted;\r\n    border-bottom-color: inherit;\r\n    text-decoration: none;\r\n    color: #222;\r\n}\r\n\r\n.protvista-pdb a:hover, .protvista-pdb a:focus, .protvista-pdb a:active {\r\n    color: rgb(116,179,96);\r\n}\r\n\r\n.labelTooltipBox {\r\n    max-width: 400px;\r\n    background-color: #e4e2e2;\r\n    color: #222;\r\n    border-radius: 6px;\r\n    padding: 5px 10px;\r\n    position: fixed;\r\n    z-index: 1;\r\n    font-size: 80%;\r\n}\r\n  \r\n.labelTooltipBox::after {\r\n    content: "";\r\n    position: absolute;\r\n    top: 10px;\r\n    right: 100%;\r\n    border-width: 5px;\r\n    border-style: solid;\r\n    border-color: transparent #e4e2e2 transparent transparent;\r\n}\r\n\r\n.viewMenuBox {\r\n    display: block;\r\n    position: absolute;\r\n    z-index: 1;\r\n    background: #fff;\r\n    left: 70%;\r\n    top: 47px;\r\n    min-width: 150px;\r\n    max-width: 280px;\r\n    overflow: auto;\r\n    -webkit-overflow-scrolling: touch;\r\n    max-height: calc(100vh - 48px);\r\n    border-radius: 4px;\r\n    outline: 0;\r\n    box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);\r\n}\r\n\r\n#filter-disease .protvista_checkbox_input + .protvista_checkbox_label::before {\r\nbackground: #990000;\r\nopacity: 0.4;\r\n}\r\n\r\n#filter-disease .protvista_checkbox_input:checked + .protvista_checkbox_label::before {\r\nopacity: 1;\r\n}\r\n\r\n#filter-predicted .protvista_checkbox_input + .protvista_checkbox_label::before {\r\nbackground: linear-gradient(#002594, #8FE3FF);\r\nopacity: 0.4;\r\n}\r\n\r\n#filter-predicted .protvista_checkbox_input:checked + .protvista_checkbox_label::before {\r\nopacity: 1;\r\n}\r\n\r\n#filter-nonDisease .protvista_checkbox_input + .protvista_checkbox_label::before {\r\nbackground: #99cc00;\r\nopacity: 0.4;\r\n}\r\n\r\n#filter-nonDisease .protvista_checkbox_input:checked + .protvista_checkbox_label::before {\r\nopacity: 1;\r\n}\r\n\r\n#filter-uncertain .protvista_checkbox_input + .protvista_checkbox_label::before {\r\nbackground: #FFCC00;\r\nopacity: 0.4;\r\n}\r\n\r\n#filter-uncertain .protvista_checkbox_input:checked + .protvista_checkbox_label::before {\r\nopacity: 1;\r\n}',""])},function(t,e,i){"use strict";t.exports=function(t,e){return"string"!=typeof t?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),/["'() \t\n]/.test(t)||e?'"'+t.replace(/"/g,'\\"').replace(/\n/g,"\\n")+'"':t)}},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTdweCIgaGVpZ2h0PSIxN3B4IiB2aWV3Qm94PSIwIDAgMTcgMTciIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ4LjIgKDQ3MzI3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5BcnRib2FyZDwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZS1saW5lY2FwPSJzcXVhcmUiPgogICAgICAgIDxnIGlkPSJBcnRib2FyZCIgc3Ryb2tlPSIjRkZGRkZGIiBzdHJva2Utd2lkdGg9IjIiPgogICAgICAgICAgICA8ZyBpZD0iR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuMDAwMDAwLCAyLjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTAuNDMxODE4MTgyLDAuNDMxODE4MTgyIEwxMi41MTAzNTM0LDEyLjUxMDM1MzQiIGlkPSJMaW5lIj48L3BhdGg+CiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMC40MzE4MTgxODIsMC40MzE4MTgxODIgTDEyLjUxMDM1MzQsMTIuNTEwMzUzNCIgaWQ9IkxpbmUtQ29weSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi41MDAwMDAsIDYuNTAwMDAwKSBzY2FsZSgtMSwgMSkgdHJhbnNsYXRlKC02LjUwMDAwMCwgLTYuNTAwMDAwKSAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"},function(t,i,r){"use strict";r.r(i);class n extends HTMLElement{constructor(){super(),this.protvistaElements=new Set}static get observedAttributes(){return["attributes"]}attributeChangedCallback(t,e,i){if(e!==i&&"attributes"===t){if(this._attributes=i.split(" "),-1!==this._attributes.indexOf("type"))throw new Error("'type' can't be used as a protvista attribute");if(-1!==this._attributes.indexOf("value"))throw new Error("'value' can't be used as a protvista attribute")}}_setAttributes(t,e,i){for(const r of t)!1===i?r.removeAttribute(e):r.setAttribute(e,"boolean"==typeof i?"":i)}_registerProtvistaDescendents(t){for(const e of t.children)e.isManaged&&this.protvistaElements.add(e),this._registerProtvistaDescendents(e)}addListeners(){for(const t of this.protvistaElements)t.addEventListener("change",t=>{-1!==this._attributes.indexOf(t.detail.type)&&this._setAttributes(this.protvistaElements,t.detail.type,t.detail.value);for(let e in t.detail)-1!==this._attributes.indexOf(e)&&this._setAttributes(this.protvistaElements,e,t.detail[e])})}connectedCallback(){this._registerProtvistaDescendents(this),this.addListeners();var t=this;"MutationObserver"in window&&(this.mutationObserver=new MutationObserver(e=>{t._registerProtvistaDescendents(t),t.addListeners()}),this.mutationObserver.observe(this,{childList:!0}))}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}}var a=n,s=r(0),o=r(10),l=r.n(o);class c extends HTMLElement{constructor(){super(),this._updateScaleDomain=this._updateScaleDomain.bind(this),this._initZoom=this._initZoom.bind(this),this.zoomed=this.zoomed.bind(this),this._applyZoomTranslation=this.applyZoomTranslation.bind(this);let t=!1;this.applyZoomTranslation=()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1,this._applyZoomTranslation()}))},this._onResize=this._onResize.bind(this),this._listenForResize=this._listenForResize.bind(this)}connectedCallback(){this.style.display="block",this.style.width="100%",this.width=this.offsetWidth,this._length=this.getAttribute("length")?parseFloat(this.getAttribute("length")):0,this._displaystart=this.getAttribute("displaystart")?parseFloat(this.getAttribute("displaystart")):1,this._displayend=this.getAttribute("displayend")?parseFloat(this.getAttribute("displayend")):this.width,this._updateScaleDomain(),this._originXScale=this.xScale.copy(),this._initZoom(),this._listenForResize(),this.addEventListener("error",t=>{throw t})}disconnectedCallback(){this._ro?this._ro.unobserve(this):window.removeEventListener("resize",this._onResize)}get width(){return this._width}set width(t){this._width=t}set length(t){this._length=t}get length(){return this._length}get xScale(){return this._xScale}set xScale(t){this._xScale=t}get zoom(){return this._zoom}set svg(t){this._svg=t,t.call(this._zoom),this.applyZoomTranslation()}get svg(){return this._svg}get isManaged(){return!0}get margin(){return{top:10,right:10,bottom:10,left:10}}getWidthWithMargins(){return this.width?this.width-this.margin.left-this.margin.right:0}_updateScaleDomain(){this.xScale=Object(s.scaleLinear)().domain([1,this._length+1]).range([0,this.getWidthWithMargins()])}_initZoom(){this._zoom=Object(s.zoom)().scaleExtent([1,1/0]).translateExtent([[0,0],[this.getWidthWithMargins(),0]]).on("zoom",this.zoomed)}static get observedAttributes(){return["displaystart","displayend","length"]}attributeChangedCallback(t,e,i){if(e!==i){const e=parseFloat(i);this["_"+t]=isNaN(e)?i:e,"length"===t&&(this._updateScaleDomain(),this._originXScale=this.xScale.copy()),this.applyZoomTranslation()}}zoomed(){if(this.xScale=s.event.transform.rescaleX(this._originXScale),this.dontDispatch)return;let[t,e]=this.xScale.domain();e--,this.dispatchEvent(new CustomEvent("change",{detail:{displaystart:Math.max(1,t),displayend:Math.min(this.length,e)},bubbles:!0,cancelable:!0}))}applyZoomTranslation(){if(!this.svg||!this._originXScale)return;const t=Math.max(1,this.length/(1+this._displayend-this._displaystart)),e=-this._originXScale(this._displaystart);this.dontDispatch=!0,this.svg.call(this.zoom.transform,s.zoomIdentity.scale(t).translate(e,0)),this.dontDispatch=!1,this.refresh()}_onResize(){this.width=this.offsetWidth,this._updateScaleDomain(),this._originXScale=this.xScale.copy(),this.svg&&this.svg.attr("width",this.width),this._zoom.scaleExtent([1,1/0]).translateExtent([[0,0],[this.getWidthWithMargins(),0]]),this.applyZoomTranslation()}_listenForResize(){this._ro=new l.a(this._onResize),this._ro.observe(this)}getXFromSeqPosition(t){return this.margin.left+this.xScale(t)}getSingleBaseWidth(){return this.xScale(2)-this.xScale(1)}}var h=c;const d=function(){customElements.define("protvista-zoomable",h)};window.customElements?d():document.addEventListener("WebComponentsReady",(function(){d()}));var p=h;var u=class extends p{connectedCallback(){super.connectedCallback(),this._highlightstart=parseInt(this.getAttribute("highlightstart")),this._highlightend=parseInt(this.getAttribute("highlightend")),this.sequence=this.getAttribute("sequence"),this.sequence&&this._createSequence()}static get observedAttributes(){return p.observedAttributes.concat("highlightstart","highlightend")}get data(){return this.sequence}set data(t){"string"==typeof t?this.sequence=t:"sequence"in t&&(this.sequence=t.sequence),this.sequence&&!super.svg?this._createSequence():this.refresh()}_createSequence(){super.svg=Object(s.select)(this).append("div").attr("class","").append("svg").attr("id","").attr("width",this.width).attr("height",40),this.seq_bg=super.svg.append("g").attr("class","background"),this.axis=super.svg.append("g").attr("class","x axis"),this.seq_g=super.svg.append("g").attr("class","sequence").attr("transform","translate(0,30)"),this.seq_g.append("text").attr("class","base").text("T"),this.chWidth=.8*this.seq_g.select("text.base").node().getBBox().width,this.seq_g.select("text.base").remove(),this.highlighted=super.svg.append("rect").attr("class","highlighted").attr("fill","yellow").attr("height",40),this.refresh()}refresh(){if(this.axis){const t=this.getSingleBaseWidth(),e=t-this.chWidth,i=t/2,r=Math.round(Math.max(0,this._displaystart-2)),n=Math.round(Math.min(this.sequence.length,this._displayend+1)),a=e<0?[]:this.sequence.slice(r,n).split("").map((t,e)=>[1+r+e,t]);this.xAxis=Object(s.axisBottom)(this.xScale).tickFormat(t=>Number.isInteger(t)?t:"").ticks(3,"s"),this.axis.call(this.xAxis),this.axis.attr("transform",`translate(${this.margin.left+i},0)`),this.axis.select(".domain").remove(),this.axis.selectAll(".tick line").remove(),this.bases=this.seq_g.selectAll("text.base").data(a,t=>t[0]),this.bases.enter().append("text").attr("class","base").attr("text-anchor","middle").attr("x",([t])=>this.getXFromSeqPosition(t)+i).text(([t,e])=>e).attr("style","font-family:monospace"),this.bases.exit().remove(),this.bases.attr("x",([t])=>this.getXFromSeqPosition(t)+i),this.background=this.seq_bg.selectAll("rect.base_bg").data(a,t=>t[0]),this.background.enter().append("rect").attr("class","base_bg").attr("height",40).merge(this.background).attr("width",t).attr("fill",([t])=>Math.round(t)%2?"#ccc":"#eee").attr("x",([t])=>this.getXFromSeqPosition(t)),this.background.exit().remove(),this.seq_g.style("opacity",Math.min(1,e)),this.background.style("opacity",Math.min(1,e)),Number.isInteger(this._highlightstart)&&Number.isInteger(this._highlightend)?this.highlighted.attr("x",super.getXFromSeqPosition(this._highlightstart)).style("opacity",.3).attr("width",t*(this._highlightend-this._highlightstart+1)):this.highlighted.style("opacity",0)}}};const g=function(){customElements.define("protvista-sequence",u)};window.customElements?g():document.addEventListener("WebComponentsReady",(function(){g()}));var v=u,b=r(1),f=r(2),y=f.a.Symbol,m=Object.prototype,_=m.hasOwnProperty,x=m.toString,w=y?y.toStringTag:void 0;var k=function(t){var e=_.call(t,w),i=t[w];try{t[w]=void 0;var r=!0}catch(t){}var n=x.call(t);return r&&(e?t[w]=i:delete t[w]),n},S=Object.prototype.toString;var A=function(t){return S.call(t)},C=y?y.toStringTag:void 0;var E=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":C&&C in Object(t)?k(t):A(t)};var T=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var L,j=function(t){if(!T(t))return!1;var e=E(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},P=f.a["__core-js_shared__"],I=(L=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+L:"";var M=function(t){return!!I&&I in t},O=Function.prototype.toString;var D=function(t){if(null!=t){try{return O.call(t)}catch(t){}try{return t+""}catch(t){}}return""},q=/^\[object .+?Constructor\]$/,$=Function.prototype,F=Object.prototype,R=$.toString,N=F.hasOwnProperty,H=RegExp("^"+R.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var z=function(t){return!(!T(t)||M(t))&&(j(t)?H:q).test(D(t))};var B=function(t,e){return null==t?void 0:t[e]};var W=function(t,e){var i=B(t,e);return z(i)?i:void 0},V=function(){try{var t=W(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var Z=function(t,e,i){"__proto__"==e&&V?V(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i};var G=function(t,e,i,r){for(var n=-1,a=null==t?0:t.length;++n<a;){var s=t[n];e(r,s,i(s),t)}return r};var U=function(t){return function(e,i,r){for(var n=-1,a=Object(e),s=r(e),o=s.length;o--;){var l=s[t?o:++n];if(!1===i(a[l],l,a))break}return e}}();var X=function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r};var Y=function(t){return null!=t&&"object"==typeof t};var K=function(t){return Y(t)&&"[object Arguments]"==E(t)},J=Object.prototype,Q=J.hasOwnProperty,tt=J.propertyIsEnumerable,et=K(function(){return arguments}())?K:function(t){return Y(t)&&Q.call(t,"callee")&&!tt.call(t,"callee")},it=Array.isArray,rt=r(4),nt=/^(?:0|[1-9]\d*)$/;var at=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&nt.test(t))&&t>-1&&t%1==0&&t<e};var st=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},ot={};ot["[object Float32Array]"]=ot["[object Float64Array]"]=ot["[object Int8Array]"]=ot["[object Int16Array]"]=ot["[object Int32Array]"]=ot["[object Uint8Array]"]=ot["[object Uint8ClampedArray]"]=ot["[object Uint16Array]"]=ot["[object Uint32Array]"]=!0,ot["[object Arguments]"]=ot["[object Array]"]=ot["[object ArrayBuffer]"]=ot["[object Boolean]"]=ot["[object DataView]"]=ot["[object Date]"]=ot["[object Error]"]=ot["[object Function]"]=ot["[object Map]"]=ot["[object Number]"]=ot["[object Object]"]=ot["[object RegExp]"]=ot["[object Set]"]=ot["[object String]"]=ot["[object WeakMap]"]=!1;var lt=function(t){return Y(t)&&st(t.length)&&!!ot[E(t)]};var ct=function(t){return function(e){return t(e)}},ht=r(3),dt=ht.a&&ht.a.isTypedArray,pt=dt?ct(dt):lt,ut=Object.prototype.hasOwnProperty;var gt=function(t,e){var i=it(t),r=!i&&et(t),n=!i&&!r&&Object(rt.a)(t),a=!i&&!r&&!n&&pt(t),s=i||r||n||a,o=s?X(t.length,String):[],l=o.length;for(var c in t)!e&&!ut.call(t,c)||s&&("length"==c||n&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||at(c,l))||o.push(c);return o},vt=Object.prototype;var bt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||vt)};var ft=function(t,e){return function(i){return t(e(i))}},yt=ft(Object.keys,Object),mt=Object.prototype.hasOwnProperty;var _t=function(t){if(!bt(t))return yt(t);var e=[];for(var i in Object(t))mt.call(t,i)&&"constructor"!=i&&e.push(i);return e};var xt=function(t){return null!=t&&st(t.length)&&!j(t)};var wt=function(t){return xt(t)?gt(t):_t(t)};var kt=function(t,e){return t&&U(t,e,wt)};var St=function(t,e){return function(i,r){if(null==i)return i;if(!xt(i))return t(i,r);for(var n=i.length,a=e?n:-1,s=Object(i);(e?a--:++a<n)&&!1!==r(s[a],a,s););return i}}(kt);var At=function(t,e,i,r){return St(t,(function(t,n,a){e(r,t,i(t),a)})),r};var Ct=function(){this.__data__=[],this.size=0};var Et=function(t,e){return t===e||t!=t&&e!=e};var Tt=function(t,e){for(var i=t.length;i--;)if(Et(t[i][0],e))return i;return-1},Lt=Array.prototype.splice;var jt=function(t){var e=this.__data__,i=Tt(e,t);return!(i<0)&&(i==e.length-1?e.pop():Lt.call(e,i,1),--this.size,!0)};var Pt=function(t){var e=this.__data__,i=Tt(e,t);return i<0?void 0:e[i][1]};var It=function(t){return Tt(this.__data__,t)>-1};var Mt=function(t,e){var i=this.__data__,r=Tt(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};function Ot(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Ot.prototype.clear=Ct,Ot.prototype.delete=jt,Ot.prototype.get=Pt,Ot.prototype.has=It,Ot.prototype.set=Mt;var Dt=Ot;var qt=function(){this.__data__=new Dt,this.size=0};var $t=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};var Ft=function(t){return this.__data__.get(t)};var Rt=function(t){return this.__data__.has(t)},Nt=W(f.a,"Map"),Ht=W(Object,"create");var zt=function(){this.__data__=Ht?Ht(null):{},this.size=0};var Bt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Wt=Object.prototype.hasOwnProperty;var Vt=function(t){var e=this.__data__;if(Ht){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return Wt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var Gt=function(t){var e=this.__data__;return Ht?void 0!==e[t]:Zt.call(e,t)};var Ut=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Ht&&void 0===e?"__lodash_hash_undefined__":e,this};function Xt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}Xt.prototype.clear=zt,Xt.prototype.delete=Bt,Xt.prototype.get=Vt,Xt.prototype.has=Gt,Xt.prototype.set=Ut;var Yt=Xt;var Kt=function(){this.size=0,this.__data__={hash:new Yt,map:new(Nt||Dt),string:new Yt}};var Jt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Qt=function(t,e){var i=t.__data__;return Jt(e)?i["string"==typeof e?"string":"hash"]:i.map};var te=function(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e};var ee=function(t){return Qt(this,t).get(t)};var ie=function(t){return Qt(this,t).has(t)};var re=function(t,e){var i=Qt(this,t),r=i.size;return i.set(t,e),this.size+=i.size==r?0:1,this};function ne(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var r=t[e];this.set(r[0],r[1])}}ne.prototype.clear=Kt,ne.prototype.delete=te,ne.prototype.get=ee,ne.prototype.has=ie,ne.prototype.set=re;var ae=ne;var se=function(t,e){var i=this.__data__;if(i instanceof Dt){var r=i.__data__;if(!Nt||r.length<199)return r.push([t,e]),this.size=++i.size,this;i=this.__data__=new ae(r)}return i.set(t,e),this.size=i.size,this};function oe(t){var e=this.__data__=new Dt(t);this.size=e.size}oe.prototype.clear=qt,oe.prototype.delete=$t,oe.prototype.get=Ft,oe.prototype.has=Rt,oe.prototype.set=se;var le=oe;var ce=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var he=function(t){return this.__data__.has(t)};function de(t){var e=-1,i=null==t?0:t.length;for(this.__data__=new ae;++e<i;)this.add(t[e])}de.prototype.add=de.prototype.push=ce,de.prototype.has=he;var pe=de;var ue=function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(t[i],i,t))return!0;return!1};var ge=function(t,e){return t.has(e)};var ve=function(t,e,i,r,n,a){var s=1&i,o=t.length,l=e.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var h=-1,d=!0,p=2&i?new pe:void 0;for(a.set(t,e),a.set(e,t);++h<o;){var u=t[h],g=e[h];if(r)var v=s?r(g,u,h,e,t,a):r(u,g,h,t,e,a);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!ue(e,(function(t,e){if(!ge(p,e)&&(u===t||n(u,t,i,r,a)))return p.push(e)}))){d=!1;break}}else if(u!==g&&!n(u,g,i,r,a)){d=!1;break}}return a.delete(t),a.delete(e),d},be=f.a.Uint8Array;var fe=function(t){var e=-1,i=Array(t.size);return t.forEach((function(t,r){i[++e]=[r,t]})),i};var ye=function(t){var e=-1,i=Array(t.size);return t.forEach((function(t){i[++e]=t})),i},me=y?y.prototype:void 0,_e=me?me.valueOf:void 0;var xe=function(t,e,i,r,n,a,s){switch(i){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new be(t),new be(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Et(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=fe;case"[object Set]":var l=1&r;if(o||(o=ye),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var h=ve(o(t),o(e),r,n,a,s);return s.delete(t),h;case"[object Symbol]":if(_e)return _e.call(t)==_e.call(e)}return!1};var we=function(t,e){for(var i=-1,r=e.length,n=t.length;++i<r;)t[n+i]=e[i];return t};var ke=function(t,e,i){var r=e(t);return it(t)?r:we(r,i(t))};var Se=function(t,e){for(var i=-1,r=null==t?0:t.length,n=0,a=[];++i<r;){var s=t[i];e(s,i,t)&&(a[n++]=s)}return a};var Ae=function(){return[]},Ce=Object.prototype.propertyIsEnumerable,Ee=Object.getOwnPropertySymbols,Te=Ee?function(t){return null==t?[]:(t=Object(t),Se(Ee(t),(function(e){return Ce.call(t,e)})))}:Ae;var Le=function(t){return ke(t,wt,Te)},je=Object.prototype.hasOwnProperty;var Pe=function(t,e,i,r,n,a){var s=1&i,o=Le(t),l=o.length;if(l!=Le(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:je.call(e,h)))return!1}var d=a.get(t);if(d&&a.get(e))return d==e;var p=!0;a.set(t,e),a.set(e,t);for(var u=s;++c<l;){var g=t[h=o[c]],v=e[h];if(r)var b=s?r(v,g,h,e,t,a):r(g,v,h,t,e,a);if(!(void 0===b?g===v||n(g,v,i,r,a):b)){p=!1;break}u||(u="constructor"==h)}if(p&&!u){var f=t.constructor,y=e.constructor;f==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof f&&f instanceof f&&"function"==typeof y&&y instanceof y||(p=!1)}return a.delete(t),a.delete(e),p},Ie=W(f.a,"DataView"),Me=W(f.a,"Promise"),Oe=W(f.a,"Set"),De=W(f.a,"WeakMap"),qe=D(Ie),$e=D(Nt),Fe=D(Me),Re=D(Oe),Ne=D(De),He=E;(Ie&&"[object DataView]"!=He(new Ie(new ArrayBuffer(1)))||Nt&&"[object Map]"!=He(new Nt)||Me&&"[object Promise]"!=He(Me.resolve())||Oe&&"[object Set]"!=He(new Oe)||De&&"[object WeakMap]"!=He(new De))&&(He=function(t){var e=E(t),i="[object Object]"==e?t.constructor:void 0,r=i?D(i):"";if(r)switch(r){case qe:return"[object DataView]";case $e:return"[object Map]";case Fe:return"[object Promise]";case Re:return"[object Set]";case Ne:return"[object WeakMap]"}return e});var ze=He,Be=Object.prototype.hasOwnProperty;var We=function(t,e,i,r,n,a){var s=it(t),o=it(e),l=s?"[object Array]":ze(t),c=o?"[object Array]":ze(e),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),p=l==c;if(p&&Object(rt.a)(t)){if(!Object(rt.a)(e))return!1;s=!0,h=!1}if(p&&!h)return a||(a=new le),s||pt(t)?ve(t,e,i,r,n,a):xe(t,e,l,i,r,n,a);if(!(1&i)){var u=h&&Be.call(t,"__wrapped__"),g=d&&Be.call(e,"__wrapped__");if(u||g){var v=u?t.value():t,b=g?e.value():e;return a||(a=new le),n(v,b,i,r,a)}}return!!p&&(a||(a=new le),Pe(t,e,i,r,n,a))};var Ve=function t(e,i,r,n,a){return e===i||(null==e||null==i||!Y(e)&&!Y(i)?e!=e&&i!=i:We(e,i,r,n,t,a))};var Ze=function(t,e,i,r){var n=i.length,a=n,s=!r;if(null==t)return!a;for(t=Object(t);n--;){var o=i[n];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<a;){var l=(o=i[n])[0],c=t[l],h=o[1];if(s&&o[2]){if(void 0===c&&!(l in t))return!1}else{var d=new le;if(r)var p=r(c,h,l,t,e,d);if(!(void 0===p?Ve(h,c,3,r,d):p))return!1}}return!0};var Ge=function(t){return t==t&&!T(t)};var Ue=function(t){for(var e=wt(t),i=e.length;i--;){var r=e[i],n=t[r];e[i]=[r,n,Ge(n)]}return e};var Xe=function(t,e){return function(i){return null!=i&&(i[t]===e&&(void 0!==e||t in Object(i)))}};var Ye=function(t){var e=Ue(t);return 1==e.length&&e[0][2]?Xe(e[0][0],e[0][1]):function(i){return i===t||Ze(i,t,e)}};var Ke=function(t){return"symbol"==typeof t||Y(t)&&"[object Symbol]"==E(t)},Je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qe=/^\w*$/;var ti=function(t,e){if(it(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!Ke(t))||(Qe.test(t)||!Je.test(t)||null!=e&&t in Object(e))};function ei(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],a=i.cache;if(a.has(n))return a.get(n);var s=t.apply(this,r);return i.cache=a.set(n,s)||a,s};return i.cache=new(ei.Cache||ae),i}ei.Cache=ae;var ii=ei;var ri=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ni=/\\(\\)?/g,ai=function(t){var e=ii(t,(function(t){return 500===i.size&&i.clear(),t})),i=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ri,(function(t,i,r,n){e.push(r?n.replace(ni,"$1"):i||t)})),e}));var si=function(t,e){for(var i=-1,r=null==t?0:t.length,n=Array(r);++i<r;)n[i]=e(t[i],i,t);return n},oi=y?y.prototype:void 0,li=oi?oi.toString:void 0;var ci=function t(e){if("string"==typeof e)return e;if(it(e))return si(e,t)+"";if(Ke(e))return li?li.call(e):"";var i=e+"";return"0"==i&&1/e==-1/0?"-0":i};var hi=function(t){return null==t?"":ci(t)};var di=function(t,e){return it(t)?t:ti(t,e)?[t]:ai(hi(t))};var pi=function(t){if("string"==typeof t||Ke(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var ui=function(t,e){for(var i=0,r=(e=di(e,t)).length;null!=t&&i<r;)t=t[pi(e[i++])];return i&&i==r?t:void 0};var gi=function(t,e,i){var r=null==t?void 0:ui(t,e);return void 0===r?i:r};var vi=function(t,e){return null!=t&&e in Object(t)};var bi=function(t,e,i){for(var r=-1,n=(e=di(e,t)).length,a=!1;++r<n;){var s=pi(e[r]);if(!(a=null!=t&&i(t,s)))break;t=t[s]}return a||++r!=n?a:!!(n=null==t?0:t.length)&&st(n)&&at(s,n)&&(it(t)||et(t))};var fi=function(t,e){return null!=t&&bi(t,e,vi)};var yi=function(t,e){return ti(t)&&Ge(e)?Xe(pi(t),e):function(i){var r=gi(i,t);return void 0===r&&r===e?fi(i,t):Ve(e,r,3)}};var mi=function(t){return t};var _i=function(t){return function(e){return null==e?void 0:e[t]}};var xi=function(t){return function(e){return ui(e,t)}};var wi=function(t){return ti(t)?_i(pi(t)):xi(t)};var ki=function(t){return"function"==typeof t?t:null==t?mi:"object"==typeof t?it(t)?yi(t[0],t[1]):Ye(t):wi(t)};var Si=function(t,e){return function(i,r){var n=it(i)?G:At,a=e?e():{};return n(i,t,ki(r,2),a)}},Ai=Object.prototype.hasOwnProperty,Ci=Si((function(t,e,i){Ai.call(t,i)?t[i].push(e):Z(t,i,[e])}));r(9);class Ei extends HTMLElement{static get tagName(){return"protvista-checkbox"}constructor(){super(),this._toggleChecked=this._toggleChecked.bind(this)}connectedCallback(){this._render()}static get observedAttributes(){return["checked","disabled","value"]}attributeChangedCallback(t,e,i){switch(t){case"checked":this.checked=!0;break;case"disabled":this.disabled=!0;break;case"value":this.value=i}}_render(){let{value:t,options:{labels:e,colors:i},checked:r=!1,disabled:n=!1}=this;null==i.length&&(i=[i]),t="filter-"+t.split(":")[1];const a=i.length>1;Object(b.render)(b.html`
      <style>
        #${t} .protvista_checkbox_input + .protvista_checkbox_label::before {
          background: ${a?b.html`linear-gradient(${i[0]}, ${i[1]})`:i[0]};
          opacity: 0.4;
        }

        #${t} .protvista_checkbox_input:checked + .protvista_checkbox_label::before {
          opacity: 1;
        }
      </style>
      <label id="${t}"
             class="protvista_checkbox ${a?"compound":""}"
             tabindex="0">
        <input type="checkbox"
              class="protvista_checkbox_input"
              ?checked="${r}"
              ?disabled="${n}"
              .value="${t}"
              @change="${this._toggleChecked}">
        <span class="protvista_checkbox_label">
          ${e.map(t=>b.html`<span>${t}</span>`)}
        </span>
      </label>
    `,this)}_toggleChecked(t){t.stopPropagation(),this.checked=!this.checked,this._fireEvent(),this._render()}_fireEvent(){this.dispatchEvent(new CustomEvent("filterChange",{bubbles:!0,composed:!0,detail:{checked:this.checked,value:this.value}}))}}customElements.define(Ei.tagName,Ei);class Ti extends HTMLElement{static get tagName(){return"protvista-filter"}constructor(){super(),this._filters=[],this._selectedFilters=new Set}get isManaged(){return!0}static get observedAttributes(){return["filters"]}attributeChangedCallback(t,e,i){if(e!==i){if("filters"!==t)return;this._filters=JSON.parse(i),this._filters.forEach(({name:t,type:e,options:i})=>{i.selected&&this._selectedFilters.add(`${e.name}:${t}`)}),this._renderFilters()}}connectedCallback(){this._renderFilters(),this.addEventListener("filterChange",this._onFilterChange)}disconnectedCallback(){this.removeEventListener("filterChange",this._onFilterChange)}_renderFilters(){const t=Ci(this._filters,t=>t.type.text),e=t=>b.html`
      <div style="display: flex; flex-direction: column;">
        ${t}
      </div>
    `,i=b.html`
      ${e(Object.keys(t).map(i=>{return b.html`
          ${r=i,b.html`
      <h5>${r}</h5>
    `}
          ${e(t[i].map(({name:t,type:e,options:i})=>b.html`
              <protvista-checkbox
                  value="${e.name}:${t}"
                  .options="${i}"
                  ?checked="${i.selected}"></protvista-checkbox>`))}
        `;var r}))}
    `;var r;Object(b.render)((r=i,b.html`
      <div style="display: flex;">
        ${r}
      </div>
    `),this)}_onFilterChange(t){let{detail:{checked:e,value:i}}=t;e?this._selectedFilters.add(i):this._selectedFilters.delete(i),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:{type:"activefilters",value:[...this._selectedFilters]}}))}_fireEvent(t){this.dispatchEvent(t)}}var Li=Ti;const ji=10,Pi=10,Ii=10;class Mi extends HTMLElement{constructor(){super(),this._x=null,this.dontDispatch=!1}connectedCallback(){this.style.display="block",this.style.width="100%",this.width=this.offsetWidth,this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._onResize=this._onResize.bind(this),this._createNavRuler()}disconnectedCallback(){this._ro?this._ro.unobserve(this):window.removeEventListener(this._onResize)}static get observedAttributes(){return["length","displaystart","displayend","highlightStart","highlightEnd","width"]}attributeChangedCallback(t,e,i){e!==i&&(this["_"+t]=parseFloat(i),this._updateNavRuler())}get width(){return this._width}set width(t){this._width=t}get isManaged(){return!0}_createNavRuler(){this._x=Object(s.scaleLinear)().range([Ii,this.width-ji]),this._x.domain([1,this._length]),this._svg=Object(s.select)(this).append("div").attr("class","").append("svg").attr("id","").attr("width",this.width).attr("height",40),this._xAxis=Object(s.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",40-Pi),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",40-Pi).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(s.brushX)().extent([[Ii,0],[this.width-ji,20.4]]).on("brush",()=>{s.event.selection&&(this._displaystart=Object(s.format)("d")(this._x.invert(s.event.selection[0])),this._displayend=Object(s.format)("d")(this._x.invert(s.event.selection[1])),this.dontDispatch||this.dispatchEvent(new CustomEvent("change",{detail:{displayend:this._displayend,displaystart:this._displaystart,extra:{transform:s.event.transform}},bubbles:!0,cancelable:!0})),this._updateLabels(),this._updatePolygon())}),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}_onResize(){this.width=this.offsetWidth,this._x=this._x.range([Ii,this.width-ji]),this._svg.attr("width",this.width),this._axis.call(this._xAxis),this._viewport.extent([[Ii,0],[this.width-ji,20.4]]),this._brushG.call(this._viewport),this._updateNavRuler()}_updateNavRuler(){this._x&&(this._updatePolygon(),this._updateLabels(),this._brushG&&(this.dontDispatch=!0,this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.dontDispatch=!1))}_updateLabels(){this._displaystartLabel&&this._displaystartLabel.text(this._displaystart),this._displayendLabel&&this._displayendLabel.attr("x",this.width).text(this._displayend)}_updatePolygon(){this.polygon&&this.polygon.attr("points",`${this._x(this._displaystart)},20\n        ${this._x(this._displayend)},20\n        ${this.width},40\n        0,40`)}}var Oi=Mi;const Di=function(){customElements.define("protvista-navigation",Oi)};window.customElements?Di():document.addEventListener("WebComponentsReady",(function(){Di()}));var qi=Oi;const $i=10,Fi=10,Ri=10;var Ni=class extends qi{connectedCallback(){this.style.display="block",this.style.width="100%",this.width=this.offsetWidth,this._offset=parseFloat(this.getAttribute("offset"))||0,this._length=parseFloat(this.getAttribute("length")),this._displaystart=parseFloat(this.getAttribute("displaystart"))||this._offset>0?this._offset:1,this._displayend=parseFloat(this.getAttribute("displayend"))||this._offset>0?this._length+this._offset-1:this._length,this._highlightStart=parseFloat(this.getAttribute("highlightStart")),this._highlightEnd=parseFloat(this.getAttribute("highlightEnd")),this._onResize=this._onResize.bind(this),this._createNavRuler()}_createNavRuler(){let t=this._offset>0?this._offset:1,e=this._offset>0?this._length+this._offset-1:this._length;this._x=Object(s.scaleLinear)().range([Ri,this.width-$i]),this._x.domain([t,e]),this._svg=Object(s.select)(this).append("div").attr("class","").append("svg").attr("id","").attr("width",this.width).attr("height",40),this._xAxis=Object(s.axisBottom)(this._x),this._displaystartLabel=this._svg.append("text").attr("class","start-label").attr("x",0).attr("y",40-Fi),this._displayendLabel=this._svg.append("text").attr("class","end-label").attr("x",this.width).attr("y",40-Fi).attr("text-anchor","end"),this._axis=this._svg.append("g").attr("class","x axis").call(this._xAxis),this._viewport=Object(s.brushX)().extent([[Ri,0],[this.width-$i,20.4]]).on("brush",()=>{s.event.selection&&(this._displaystart=Object(s.format)("d")(this._x.invert(s.event.selection[0])),this._displayend=Object(s.format)("d")(this._x.invert(s.event.selection[1])),this.dontDispatch||this.dispatchEvent(new CustomEvent("change",{detail:{displayend:this._displayend,displaystart:this._displaystart,extra:{transform:s.event.transform}},bubbles:!0,cancelable:!0})),this._updateLabels(),this._updatePolygon())}),this._brushG=this._svg.append("g").attr("class","brush").call(this._viewport),this._brushG.call(this._viewport.move,[this._x(this._displaystart),this._x(this._displayend)]),this.polygon=this._svg.append("polygon").attr("class","zoom-polygon").attr("fill","#777").attr("fill-opacity","0.3"),this._updateNavRuler(),"ResizeObserver"in window&&(this._ro=new ResizeObserver(this._onResize),this._ro.observe(this)),window.addEventListener("resize",this._onResize)}};var Hi=function(t,e,i,r){for(var n=t.length,a=i+(r?1:-1);r?a--:++a<n;)if(e(t[a],a,t))return a;return-1};var zi=function(t){return t!=t};var Bi=function(t,e,i){for(var r=i-1,n=t.length;++r<n;)if(t[r]===e)return r;return-1};var Wi=function(t,e,i){return e==e?Bi(t,e,i):Hi(t,zi,i)};var Vi=function(t){return"string"==typeof t||!it(t)&&Y(t)&&"[object String]"==E(t)},Zi=/^\s+|\s+$/g,Gi=/^[-+]0x[0-9a-f]+$/i,Ui=/^0b[01]+$/i,Xi=/^0o[0-7]+$/i,Yi=parseInt;var Ki=function(t){if("number"==typeof t)return t;if(Ke(t))return NaN;if(T(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=T(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Zi,"");var i=Ui.test(t);return i||Xi.test(t)?Yi(t.slice(2),i?2:8):Gi.test(t)?NaN:+t};var Ji=function(t){return t?(t=Ki(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var Qi=function(t){var e=Ji(t),i=e%1;return e==e?i?e-i:e:0};var tr=function(t,e){return si(e,(function(e){return t[e]}))};var er=function(t){return null==t?[]:tr(t,wt(t))},ir=Math.max;var rr=function(t,e,i,r){t=xt(t)?t:er(t),i=i&&!r?Qi(i):0;var n=t.length;return i<0&&(i=ir(n+i,0)),Vi(t)?i<=n&&t.indexOf(e,i)>-1:!!n&&Wi(t,e,i)>-1};class nr{getFeatureShape(t,e,i,r){r=r||"rectangle",this._ftLength=i,this._ftHeight=e,this._ftWidth=t*i,"function"!=typeof this["_"+r]&&(r="rectangle");return this["_"+r]()}static isContinuous(t){return"bridge"!==type.toLowerCase()}_rectangle(){return"M0,0L"+this._ftWidth+",0L"+this._ftWidth+","+this._ftHeight+"L0,"+this._ftHeight+"Z"}_roundRectangle(){return"M6,0h"+(this._ftWidth-12)+",0a6,6 0 0 1 6,6v"+(this._ftHeight-12)+"a6,6 0 0 1 "+"-6,6h"+(12-this._ftWidth)+"a6,6 0 0 1 "+"-6,"+"-6v"+(12-this._ftHeight)+"a6,6 0 0 1 6,"+"-6Z"}_bridge(){return 1!==this._ftLength?"M0,"+this._ftHeight+"L0,0L"+this._ftWidth+",0L"+this._ftWidth+","+this._ftHeight+"L"+this._ftWidth+",2L0,2Z":"M0,"+this._ftHeight+"L0,"+this._ftHeight/2+"L"+this._ftWidth/2+","+this._ftHeight/2+"L"+this._ftWidth/2+",0L"+this._ftWidth/2+","+this._ftHeight/2+"L"+this._ftWidth+","+this._ftHeight/2+"L"+this._ftWidth+","+this._ftHeight+"Z"}_getMiddleLine(t){return"M0,"+t+"L"+this._ftWidth+","+t+"Z"}_diamond(){const t=this._ftWidth/2,e="M"+t+",0L"+(t+5)+",5L"+t+",10L"+(t-5)+",5";return 1!==this._ftLength?e+this._getMiddleLine(5,this._ftWidth):e+"Z"}_chevron(){const t=this._ftWidth/2,e="M"+t+",5L"+(5+t)+",0L"+(5+t)+",5L"+t+",10L"+(-5+t)+",5L"+(-5+t)+",0";return 1!==this._ftLength?e+"L"+t+",5"+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_catFace(){const t=this._ftWidth/2;var e="M"+(-5+t)+",0L"+(-5+t)+",6L"+(-2+t)+",10L"+(2+t)+",10L"+(5+t)+",6L"+(5+t)+",0L"+(2+t)+",4L"+(-2+t)+",4";return 1!==this._ftLength?e+"M"+t+",0"+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_triangle(){const t=this._ftWidth/2;var e="M"+t+",0L"+(5+t)+",10L"+(-5+t)+",10";return 1!==this._ftLength?e+"L"+t+",0"+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_wave(){const t=this._ftWidth/2;var e="M"+(-5+t)+",5A2.5,5 0 1,1 "+t+",5A2.5,5 0 1,0 "+(5+t)+",5";return 1!==this._ftLength?e+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_getPolygon(t){let e="M ";const i=this._ftWidth/2;for(var r=0;r<t;r++)e+=5*Math.cos(2*Math.PI*r/t)+i+","+(5*Math.sin(2*Math.PI*r/t)+5)+" ";return 1!==this._ftLength?e+" "+(5*Math.cos(0)+i)+","+(5*Math.sin(0)+5)+" "+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_hexagon(){return this._getPolygon(6)}_pentagon(){return this._getPolygon(5)}_circle(){const t=this._ftWidth/2,e=Math.sqrt(10/Math.PI),i="M"+t+",0A"+e+","+e+" 0 1,1 "+t+",10A"+e+","+e+" 0 1,1 "+t+",0";return 1!==this._ftLength?i+this._getMiddleLine(5,this._ftWidth)+"Z":i+"Z"}_arrow(){const t=this._ftWidth/2,e="M"+t+",0L"+(-1+t)+",0L"+(-5+t)+",4L"+(-1+t)+","+this._ftHeight+"L"+t+","+this._ftHeight+"L"+(4+t)+",4";return 1!==this._ftLength?e+"L"+t+",0"+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_doubleBar(){const t=this._ftWidth/2,e="M"+t+",0L"+(-5+t)+",10L"+t+",10L"+(5+t)+",0";return 1!==this._ftLength?e+"L"+t+",0"+this._getMiddleLine(5,this._ftWidth)+"Z":e+"Z"}_getBrokenEnd(){const t=this._ftHeight/4;return"L"+(this._ftWidth-t)+","+t+"L"+this._ftWidth+","+2*t+"L"+(this._ftWidth-t)+","+3*t+"L"+this._ftWidth+","+this._ftHeight}_getBrokenStart(){const t=this._ftHeight/4;return"L"+t+","+3*t+"L0,"+2*t+"L"+t+","+t}_discontinuosStart(){return"M0,0L"+this._ftWidth+",0L"+this._ftWidth+","+this._ftHeight+"L0,"+this._ftHeight+this._getBrokenStart()+"Z"}_discontinuos(){return"M0,0L"+this._ftWidth+",0"+this._getBrokenEnd()+"L0,"+this._ftHeight+this._getBrokenStart()+"Z"}_discontinuosEnd(){return"M0,0L"+this._ftWidth+",0"+this._getBrokenEnd()+"L0,"+this._ftHeight+"Z"}}var ar=function(t,e){for(var i=-1,r=null==t?0:t.length;++i<r&&!1!==e(t[i],i,t););return t};var sr=function(t){return"function"==typeof t?t:mi};var or=function(t,e){return(it(t)?ar:St)(t,sr(e))};var lr=function(t,e){var i;return St(t,(function(t,r,n){return!(i=e(t,r,n))})),!!i};var cr=function(t,e,i){if(!T(i))return!1;var r=typeof e;return!!("number"==r?xt(i)&&at(e,i.length):"string"==r&&e in i)&&Et(i[e],t)};var hr=function(t,e,i){var r=it(t)?ue:lr;return i&&cr(t,e,i)&&(e=void 0),r(t,ki(e,3))};class dr{constructor({features:t,layoutHeight:e,padding:i=1,minHeight:r=17}){this._padding=i,this._minHeight=r,this._layoutHeight=e}init(t){this._features=t}getFeatureYPos(t){return Math.min(this._layoutHeight,this._minHeight)}getFeatureHeight(t){return Math.min(this._layoutHeight,this._minHeight)}}class pr{constructor(){this._rowFeatures=[]}_featureOverlap(t,e,i,r){const n=Number(t.start)>=Number(e.start)&&Number(t.start)<=Number(r),a=Number(i)>=Number(e.start)&&Number(i)<=Number(r);return n||a}_dOverlap(t,e,i,r){const n=Number(e.start)>=Number(t.start)&&Number(e.start)<=Number(i),a=Number(r)>=Number(t.start)&&Number(r)<=Number(i);return n||a}_addAbsoluteLimits(t){const e=t.locations.reduce((t,e)=>t.concat(e.fragments),[]).reduce((t,e)=>({start:Math.min(e.start,t.start),end:Math.max(e.end,t.end)}),{start:Number.POSITIVE_INFINITY,end:Number.NEGATIVE_INFINITY});t.start=e.start,t.end=e.end}containsOverlap(t){return this._addAbsoluteLimits(Object.assign(t)),hr(this._rowFeatures,e=>{this._addAbsoluteLimits(Object.assign(e));const i=t.end?t.end:t.start,r=e.end?e.end:e.start;return this._featureOverlap(t,e,i,r)||this._dOverlap(t,e,i,r)})}addFeature(t){this._rowFeatures.push(t)}}class ur extends dr{constructor(t){super(t),this._rowHeight=0,this._rows=[],this._minHeight=15}init(t){this._features=t,or(this._features,t=>{if(!hr(this._rows,e=>{if(!e.containsOverlap(t))return e.addFeature(t),!0})){let e=new pr;e.addFeature(t),this._rows.push(e)}}),this._rowHeight=Math.min(this._layoutHeight/this._rows.length,this._minHeight)-2*this._padding}getFeatureYPos(t){let e;const i=this._layoutHeight/this._rows.length>this._minHeight?(this._layoutHeight-this._rows.length*this._minHeight)/2:0;return or(this._rows,(r,n)=>{or(r._rowFeatures,r=>{r===t&&(e=n*(this._rowHeight+2*this._padding)+i)})}),e}getFeatureHeight(){return this._rowHeight}}const gr={chain:{label:"Chain",tooltip:"(aka mature region). This describes the extent of a polypeptide chain in the mature protein following processing",shape:"rectangle",color:"#CC9933"},transit:{label:"Transit peptide",tooltip:"This describes the extent of a transit peptide",shape:"rectangle",color:"#009966"},init_met:{label:"Initiator methionine",tooltip:"This indicates that the initiator methionine is cleaved from the mature protein",shape:"arrow",color:"#996633"},propep:{label:"Propeptide",tooltip:"Part of a protein that is cleaved during maturation or activation",shape:"rectangle",color:"#99CCCC"},peptide:{label:"Peptide",tooltip:"The position and length of an active peptide in the mature protein",shape:"rectangle",color:"#006699"},signal:{label:"Signal peptide",tooltip:"N-terminal signal peptide",shape:"rectangle",color:"#CC0033"},helix:{label:"Helix",tooltip:"The positions of experimentally determined helical regions",shape:"rectangle",color:"#FF0066"},strand:{label:"Beta strand",tooltip:"The positions of experimentally determined beta strands",shape:"rectangle",color:"#FFCC00"},turn:{label:"Turn",tooltip:"The positions of experimentally determined hydrogen-bonded turns",shape:"rectangle",color:"#0571AF"},disulfid:{label:"Disulfide bond",tooltip:"The positions of cysteine residues participating in disulphide bonds",shape:"bridge",color:"#23B14D"},crosslnk:{label:"Cross-link",tooltip:"Covalent linkages of various types formed between two proteins or between two parts of the same protein",shape:"bridge",color:"#FF6600"},region:{label:"Region",tooltip:"Regions in multifunctional enzymes or fusion proteins, or characteristics of a region, e.g., protein-protein interactions mediation",shape:"rectangle",color:"#B33E00"},coiled:{label:"Coiled coil",tooltip:"Coiled coils are built by two or more alpha-helices that wind around each other to form a supercoil",shape:"rectangle",color:"#006699"},motif:{label:"Motif",tooltip:"Short conserved sequence motif of biological significance",shape:"rectangle",color:"#402060"},repeat:{label:"Repeat",tooltip:"Repeated sequence motifs or repeated domains within the protein",shape:"rectangle",color:"#9900FF"},ca_bind:{label:"Calcium binding",tooltip:"Calcium-binding regions, such as the EF-hand motif",shape:"rectangle",color:"#FF3399"},dna_bind:{label:"DNA binding",tooltip:"DNA-binding domains such as AP2/ERF domain, the ETS domain, the Fork-Head domain, the HMG box and the Myb domain",shape:"rectangle",color:"#009933"},domain:{label:"Domain",tooltip:"Specific combination of secondary structures organized into a characteristic three-dimensional structure or fold",shape:"rectangle",color:"#9999FF"},zn_fing:{label:"Zinc finger",tooltip:"Small, functional, independently folded domain that coordinates one or more zinc ions",shape:"rectangle",color:"#990066"},np_bind:{label:"Nucleotide binding",tooltip:"(aka flavin-binding). Region in the protein which binds nucleotide phosphates",shape:"rectangle",color:"#FF9900"},metal:{label:"Metal binding",tooltip:"Binding site for a metal ion",shape:"diamond",color:"#009900"},site:{label:"Site",tooltip:"Any interesting single amino acid site on the sequence",shape:"chevron",color:"#660033"},binding:{label:"Binding site",tooltip:"Binding site for any chemical group (co-enzyme, prosthetic group, etc.)",shape:"rectangle",color:"#catFace"},act_site:{label:"Active site",tooltip:"Amino acid(s) directly involved in the activity of an enzyme",shape:"circle",color:"#FF6666"},mod_res:{label:"Modified residue",tooltip:"Modified residues such as phosphorylation, acetylation, acylation, methylation",shape:"triangle",color:"#000066"},lipid:{label:"Lipidation",tooltip:"Covalently attached lipid group(s)",shape:"wave",color:"#99CC33"},carbohyd:{label:"Glycosylation",tooltip:"Covalently attached glycan group(s)",shape:"hexagon",color:"#CC3366"},compbias:{label:"Compositional bias",tooltip:"Position of regions of compositional bias within the protein and the particular amino acids that are over-represented within those regions",shape:"rectangle",color:"#FF3366"},conflict:{label:"Sequence conflict",tooltip:"Sequence discrepancies of unknown origin",shape:"rectangle",color:"#6633CC"},non_cons:{label:"Non-adjacent residues",tooltip:"Indicates that two residues in a sequence are not consecutive and that there is an undetermined number of unsequenced residues between them",shape:"doubleBar",color:"#FF0033"},non_ter:{label:"Non-terminal residue",tooltip:"The sequence is incomplete. The residue is not the terminal residue of the complete protein",shape:"doubleBar",color:"#339933"},unsure:{label:"Sequence uncertainty",tooltip:"Regions of a sequence for which the authors are unsure about the sequence assignment",shape:"rectangle",color:"#33FF00"},non_std:{label:"Non-standard residue",tooltip:"Non-standard amino acids (selenocysteine and pyrrolysine)",shape:"pentagon",color:"#330066"},mutagen:{label:"Mutagenesis",tooltip:"Site which has been experimentally altered by mutagenesis",shape:"rectangle",color:"#FF9900"},topo_dom:{label:"Topological domain",tooltip:"Location of non-membrane regions of membrane-spanning proteins",shape:"rectangle",color:"#CC0000"},transmem:{label:"Transmembrane",tooltip:"Extent of a membrane-spanning region",shape:"rectangle",color:"#CC00CC"},intramem:{label:"Intramembrane",tooltip:"Extent of a region located in a membrane without crossing it",shape:"rectangle",color:"#0000CC"},variant:{label:"Natural variant",tooltip:"Natural variant of the protein, including polymorphisms, variations between strains, isolates or cultivars, disease-associated mutations and RNA editing events",shape:"circle",color:"black"},unique:{label:"Unique peptide",tooltip:"",shape:"rectangle",color:"#fc3133"},non_unique:{label:"Non-unique peptide",tooltip:"",shape:"rectangle",color:"#8585fc"},antigen:{label:"Antibody binding sequences",tooltip:"",shape:"rectangle",color:"#996699"},pdbe_cover:{label:"PDBe 3D structure coverage",tooltip:"",shape:"rectangle",color:"#669966"}};class vr{constructor(t){this._config=t}getShapeByType(t){return this._config[t.toLowerCase()]?this._config[t.toLowerCase()].shape:"rectangle"}getColorByType(t){return this._config[t.toLowerCase()]?this._config[t.toLowerCase()].color:"black"}}var br=class extends p{getLayout(t){return"non-overlapping"===String(this.getAttribute("layout")).toLowerCase()?new ur({layoutHeight:this._height}):new dr({layoutHeight:this._height})}set height(t){this._height=t}get height(){return this._height}connectedCallback(){super.connectedCallback(),this._highlightstart=parseInt(this.getAttribute("highlightstart")),this._highlightend=parseInt(this.getAttribute("highlightend")),this._height=this.getAttribute("height")?parseInt(this.getAttribute("height")):44,this._tooltipEvent=this.getAttribute("tooltip-event")?this.getAttribute("tooltip-event"):"mouseover",this._color=this.getAttribute("color"),this._shape=this.getAttribute("shape"),this._featureShape=new nr,this._layoutObj=this.getLayout(),this._config=new vr(gr),this.createTooltip=this.createTooltip.bind(this),this._data&&this._createTrack(),this.addEventListener("load",t=>{rr(this.children,t.target)&&(this.data=t.detail.payload)})}normalizeLocations(t){return t.map(t=>{const{locations:e,start:i,end:r}=t;return e?t:Object.assign(t,{locations:[{fragments:[{start:i,end:r}]}]})})}set data(t){this._data=this.normalizeLocations(t),this._createTrack()}static get observedAttributes(){return["length","displaystart","displayend","highlightstart","highlightend","color","shape","layout"]}_getFeatureColor(t){return t.color?t.color:this._color?this._color:t.type?this._config.getColorByType(t.type):"black"}_getShape(t){return t.shape?t.shape:this._shape?this._shape:t.type?this._config.getShapeByType(t.type):"rectangle"}_createTrack(){this._layoutObj.init(this._data),Object(s.select)(this).selectAll("svg").remove(),this.svg=Object(s.select)(this).append("div").style("line-height",0).append("svg").attr("width",this.width).attr("height",this._height),this.highlighted=this.svg.append("rect").attr("class","highlighted").attr("fill","rgba(255, 235, 59, 0.8)").attr("height",this._height),this.seq_g=this.svg.append("g").attr("class","sequence-features").attr("transform","translate(0 ,"+this.margin.top+")"),this._createFeatures(),this.refresh()}_createFeatures(){this.featuresG=this.seq_g.selectAll("g.feature-group").data(this._data),this.locations=this.featuresG.enter().append("g").attr("class","feature-group").attr("id",t=>"g_"+t.accession).selectAll("g.location-group").data(t=>t.locations.map(e=>Object.assign({},e,{feature:t}))).enter().append("g").attr("class","location-group"),this.features=this.locations.selectAll("g.fragment-group").data(t=>t.fragments.map(e=>Object.assign({},e,{feature:t.feature}))).enter().append("path").attr("class","feature").attr("tooltip-trigger","true").attr("d",t=>this._featureShape.getFeatureShape(this.getSingleBaseWidth(),this._layoutObj.getFeatureHeight(t),t.end?t.end-t.start+1:1,this._getShape(t.feature))).attr("transform",t=>"translate("+this.getXFromSeqPosition(t.start)+","+(this.margin.top+this._layoutObj.getFeatureYPos(t.feature))+")").attr("fill",t=>this._getFeatureColor(t.feature)).attr("stroke",t=>this._getFeatureColor(t.feature)).on("mouseover",t=>{var e=this,i=s.event;"mouseover"===this._tooltipEvent&&window.setTimeout((function(){e.createTooltip(i,t)}),50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:t.end,highlightstart:t.start},bubbles:!0,cancelable:!0}))}).on("mouseout",()=>{var t=this;"mouseover"===this._tooltipEvent&&window.setTimeout((function(){t.removeAllTooltips()}),50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:null,highlightstart:null},bubbles:!0,cancelable:!0}))}).on("click",t=>{"click"===this._tooltipEvent&&this.createTooltip(s.event,t,!0)})}createTooltip(t,e,i=!1){if(!e.feature||!e.feature.tooltipContent)return;this.removeAllTooltips();const r=document.createElement("protvista-tooltip");r.top=t.clientY+3,r.left=t.clientX+2,r.title=`${e.feature.type} ${e.start}-${e.end}`,r.closeable=i,r.content=e.feature.tooltipContent,this.appendChild(r);const n=this.svg._groups[0][0].clientWidth,a=Object(s.select)(r).node().getBoundingClientRect();a.width+a.x>n&&(this.removeChild(r),r.left=n-a.width,r.mirror="H",this.appendChild(r))}removeAllTooltips(){document.querySelectorAll("protvista-tooltip").forEach(t=>t.remove())}refresh(){this.xScale&&this.seq_g&&(this.features=this.seq_g.selectAll("path.feature").data(this._data.reduce((t,e)=>t.concat(e.locations.reduce((t,i)=>t.concat(i.fragments.map(t=>Object.assign({},t,{feature:e}))),[])),[])),this.features.attr("d",t=>this._featureShape.getFeatureShape(this.getSingleBaseWidth(),this._layoutObj.getFeatureHeight(t),t.end?t.end-t.start+1:1,this._getShape(t.feature))).attr("transform",t=>"translate("+this.getXFromSeqPosition(t.start)+","+(this.margin.top+this._layoutObj.getFeatureYPos(t.feature))+")"),this._updateHighlight())}_updateHighlight(){Number.isInteger(this._highlightstart)&&Number.isInteger(this._highlightend)?this.highlighted.attr("x",this.getXFromSeqPosition(this._highlightstart)).style("opacity",.3).attr("width",this.getSingleBaseWidth()*(this._highlightend-this._highlightstart+1)):this.highlighted.style("opacity",0)}};const fr=function(){customElements.define("protvista-track",br)};window.customElements?fr():document.addEventListener("WebComponentsReady",(function(){fr()}));var yr=br;var mr=class extends yr{connectedCallback(){super.connectedCallback()}_createTrack(){this._layoutObj.init(this._data),s.select(this).selectAll("svg").remove(),this.svg=s.select(this).append("div").style("line-height",0).append("svg").style("width","100%").attr("height",this._height),this.highlighted=this.svg.append("rect").attr("class","highlighted").attr("fill","rgba(255, 235, 59, 0.8)").attr("stroke","black").attr("height",this._height),this.seq_g=this.svg.append("g").attr("class","sequence-features").attr("transform","translate(0,-5)"),this._createFeatures(),this.refresh()}_createFeatures(){this.featuresG=this.seq_g.selectAll("g.feature-group").data(this._data),this.locations=this.featuresG.enter().append("g").attr("class","feature-group").attr("id",t=>"g_"+t.accession).selectAll("g.location-group").data(t=>t.locations.map(e=>Object.assign({},e,{feature:t}))).enter().append("g").attr("class","location-group"),this.features=this.locations.selectAll("g.fragment-group").data(t=>t.fragments.map(e=>Object.assign({},e,{feature:t.feature}))).enter().append("path").attr("class","feature").attr("tooltip-trigger","true").attr("d",t=>this._featureShape.getFeatureShape(this.getSingleBaseWidth(),this._layoutObj.getFeatureHeight(t),t.end?t.end-t.start+1:1,this._getShape(t))).attr("transform",t=>"translate("+this.getXFromSeqPosition(t.start)+","+(this.margin.top+this._layoutObj.getFeatureYPos(t.feature))+")").attr("fill",(t,e)=>{let i=t.feature;return t.feature.color&&(i={color:t.feature.color}),t.feature.locations&&t.feature.locations[0].fragments[e]&&t.feature.locations[0].fragments[e].color&&(i={color:t.feature.locations[0].fragments[e].color}),this._getFeatureColor(i)}).attr("stroke",(t,e)=>{let i=t.feature;t.feature.color&&(i={color:t.feature.color}),t.feature.locations&&t.feature.locations[0].fragments[e]&&t.feature.locations[0].fragments[e].color&&(i={color:t.feature.locations[0].fragments[e].color});let r=this._getFeatureColor(i);return this.colorMixer(-.3,r)}).on("mouseover",(t,e)=>{const i=this,r=s.event,n=document.querySelectorAll("protvista-tooltip");n&&n[0]&&"click-open"==n[0].className||window.setTimeout((function(){i.createTooltip(r,t)}),50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:t.end,highlightstart:t.start},bubbles:!0,cancelable:!0})),t.trackIndex=e,this.dispatchEvent(new CustomEvent("protvista-mouseover",{detail:t,bubbles:!0,cancelable:!0}))}).on("mouseout",()=>{const t=this,e=document.querySelectorAll("protvista-tooltip");e&&e[0]&&"click-open"==e[0].className||window.setTimeout((function(){t.removeAllTooltips()}),50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:null,highlightstart:null},bubbles:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("protvista-mouseout",{detail:null,bubbles:!0,cancelable:!0}))}).on("click",(t,e)=>{t.trackIndex=e,this.createTooltip(s.event,t,!0),this.dispatchEvent(new CustomEvent("protvista-click",{detail:t,bubbles:!0,cancelable:!0}))})}_getShape(t){return t.shape?t.shape:t.feature&&t.feature.shape?t.feature.shape:this._shape?this._shape:"rectangle"}createTooltip(t,e,i=!1){this.removeAllTooltips();const r=document.createElement("protvista-tooltip");r.left=t.pageX+15,r.top=t.pageY+5,r.style.marginLeft=0,r.style.marginTop=0,r.title=`${e.feature.type} ${e.start}-${e.end}`,e.start==e.end&&(r.title=`${e.feature.type} residue ${e.start}`),r.closeable=i,r.content=e.feature.tooltipContent,e.tooltipContent&&(r.content=e.tooltipContent),"click"==t.type&&r.classList.add("click-open"),document.body.appendChild(r);const n=s.select(r).node(),a=n.getBoundingClientRect(),o=window.innerHeight-t.clientY,l=window.innerWidth-t.clientX;o<130&&(n.style.top=t.pageY-(a.height+20)+"px"),l<300&&(n.style.left="",n.style.right=l-10+"px")}colorMixer(t,e,i,r){let n,a,s,o,l,c,h,d=parseInt,p=Math.round,u="string"==typeof i;return"number"!=typeof t||t<-1||t>1||"string"!=typeof e||"r"!=e[0]&&"#"!=e[0]||i&&!u?null:(this.pSBCr||(this.pSBCr=t=>{let e=t.length,i={};if(e>9){if([n,a,s,u]=t=t.split(","),e=t.length,e<3||e>4)return null;i.r=d("a"==n[3]?n.slice(5):n.slice(4)),i.g=d(a),i.b=d(s),i.a=u?parseFloat(u):-1}else{if(8==e||6==e||e<4)return null;e<6&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(e>4?t[4]+t[4]:"")),t=d(t.slice(1),16),9==e||5==e?(i.r=t>>24&255,i.g=t>>16&255,i.b=t>>8&255,i.a=p((255&t)/.255)/1e3):(i.r=t>>16,i.g=t>>8&255,i.b=255&t,i.a=-1)}return i}),h=e.length>9,h=u?i.length>9||"c"==i&&!h:h,l=this.pSBCr(e),o=t<0,c=i&&"c"!=i?this.pSBCr(i):o?{r:0,g:0,b:0,a:-1}:{r:255,g:255,b:255,a:-1},o=1-(t=o?-1*t:t),l&&c?(r?(n=p(o*l.r+t*c.r),a=p(o*l.g+t*c.g),s=p(o*l.b+t*c.b)):(n=p((o*l.r**2+t*c.r**2)**.5),a=p((o*l.g**2+t*c.g**2)**.5),s=p((o*l.b**2+t*c.b**2)**.5)),u=l.a,c=c.a,l=u>=0||c>=0,u=l?u<0?c:c<0?u:u*o+c*t:0,h?"rgb"+(l?"a(":"(")+n+","+a+","+s+(l?","+p(1e3*u)/1e3:"")+")":"#"+(4294967296+16777216*n+65536*a+256*s+(l?p(255*u):0)).toString(16).slice(1,l?void 0:-2)):null)}};var _r=class extends mr{constructor(){super()}connectedCallback(){super.connectedCallback(),this._accession=this.getAttribute("accession"),this._data=void 0,this._height=parseInt(this.getAttribute("height"))||44}set data(t){this._data=t,this._createTrack()}getFeatureShape(t,e,i){return"M0,"+t+"L0,"+(t-i)+"L"+e+","+(t-i)+"L"+e+","+t+"Z"}_createFeatures(){this._yScale=Object(s.scaleLinear)().domain([0,10]).range([0,30]),this.featuresG=this.seq_g.selectAll("g.location-group").data(this._data.data.index),this.locations=this.featuresG.enter().filter(t=>this._data.data.conservation_score[t-1]>0).append("g").attr("class","location-group"),this.locations.append("path").attr("class","feature").attr("tooltip-trigger","true").attr("id",t=>"hsc_"+t).attr("fill","rgb(128, 128, 128)").on("mouseover",t=>{const e=this,i=d3.event,r=document.querySelectorAll("protvista-tooltip");r&&r[0]&&"click-open"===r[0].className||window.setTimeout((function(){const r={start:t,end:t,feature:{tooltipContent:"Conservation score: "+e._data.data.conservation_score[t-1],labelColor:"rgb(211,211,211)",type:"Sequence conservation"}};e.createTooltip(i,r)}),50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:t,highlightstart:t},bubbles:!0,cancelable:!0}))}).on("mouseout",()=>{const t=this,e=document.querySelectorAll("protvista-tooltip");e&&e[0]&&"click-open"==e[0].className||window.setTimeout((function(){t.removeAllTooltips()}),50),t.dispatchEvent(new CustomEvent("change",{detail:{highlightend:null,highlightstart:null},bubbles:!0,cancelable:!0})),t.dispatchEvent(new CustomEvent("protvista-mouseout",{detail:null,bubbles:!0,cancelable:!0}))}).on("click",t=>{const e={start:t,end:t,feature:{tooltipContent:"Conservation score: "+this._data.data.conservation_score[t-1],labelColor:"rgb(211,211,211)",type:"Sequence conservation"}};this.createTooltip(d3.event,e,!0),this.dispatchEvent(new CustomEvent("protvista-click",{detail:e,bubbles:!0,cancelable:!0}))})}refresh(){if(this.xScale&&this.seq_g){let t=this.getSingleBaseWidth();this.features=this.seq_g.selectAll("path.feature").data(this._data.data.index.filter(t=>this._data.data.conservation_score[t-1]>0)),this.features.attr("d",e=>this.getFeatureShape(this._height,t,this._yScale(this._data.data.conservation_score[e-1]))).attr("transform",(t,e)=>`translate(${this.getXFromSeqPosition(t)}, 0)`).attr("fill","rgb(128, 128, 128)"),this._updateHighlight()}}};var xr=class extends mr{constructor(){super()}connectedCallback(){super.connectedCallback(),this._accession=this.getAttribute("accession"),this._displayOrder=this.getAttribute("sc-display-order"),this._data=void 0,this._height=parseInt(this.getAttribute("height"))||430,this.aaYvalue=20,this.displayOrder=this._displayOrder||"property",this.aaList=["H","Y","Q","S","T","N","M","L","I","V","A","F","W","D","E","P","K","R","C","G"],this.aaDetails={G:{name:"Glycine",code:"GLY",color:"#f09048"},C:{name:"Cysteine",code:"CYS",color:"#f08080"},R:{name:"Arginine",code:"ARG",color:"#f01505"},K:{name:"Lysine",code:"LYS",color:"#f01505"},P:{name:"Proline",code:"PRO",color:"#c0c000"},E:{name:"Glutamic acid",code:"GLU",color:"#c048c0"},D:{name:"Aspartic acid",code:"ASP",color:"#c048c0"},W:{name:"Tryptophan",code:"TRP",color:"#80a0f0"},M:{name:"Methionine",code:"MET",color:"#80a0f0"},F:{name:"Phenylalanine",code:"PHE",color:"#80a0f0"},I:{name:"Isoleucine",code:"ILE",color:"#80a0f0"},V:{name:"Valine",code:"VAL",color:"#80a0f0"},L:{name:"Leucine",code:"LEU",color:"#80a0f0"},A:{name:"Alanine",code:"ALA",color:"#80a0f0"},T:{name:"Threonine",code:"THR",color:"#15c015"},Q:{name:"Glutamine",code:"GLN",color:"#15c015"},S:{name:"Serine",code:"SER",color:"#15c015"},N:{name:"Asparagine",code:"ASN",color:"#15c015"},Y:{name:"Tyrosine",code:"TYR",color:"#15a4a4"},H:{name:"Histidine",code:"HIS",color:"#15a4a4"}},this.propertySortedData=[],this.probabilitySortedData=[]}static get observedAttributes(){return super.observedAttributes.concat("sc-display-order")}attributeChangedCallback(t,e,i){if(e!==i&&"sc-display-order"==t)null!==e&&this.resetDisplayData(i);else if(super.attributeChangedCallback(t,e,i),!super.svg)return}set data(t){this._data=t,this._createTrack()}_createTrack(){this._layoutObj.init(this._data),d3.select(this).selectAll("svg").remove(),this.svg=d3.select(this).append("div").append("svg").style("width","100%").attr("height",this._height),this.highlighted=this.svg.append("rect").attr("class","highlighted").attr("fill","rgba(255, 235, 59, 0.8)").attr("height",this._height),this.seq_g=this.svg.append("g").attr("class","sequence-features").attr("transform","translate(0,-5)"),this._createFeatures(),this.refresh()}_createFeatures(){this._yScale=Object(s.scaleLinear)().domain([0,1]).range([0,400])}_aaYPosition(t,e){0===t&&(this.aaYvalue=20);let i=this.aaYvalue;return this.aaYvalue+=this._yScale(e),i}refresh(){if(this.xScale&&this.seq_g){this.svg.selectAll("foreignObject").remove(),this.seq_g.selectAll("g.location-group").remove();const t=this.getSingleBaseWidth();t<9.4?(this.foreign=this.svg.append("foreignObject").attr("width","100%").attr("height",this._height),this.commentdiv=this.foreign.append("xhtml:div").attr("class","zoomout").attr("style","text-align: center; height: "+this._height+"px"),this.span=this.commentdiv.append("span").attr("style","line-height:"+this._height+"px"),this.span.append("i").attr("class","icon icon-functional").attr("data-icon","3"),this.span.append("text").text("Please zoom in (until 150 or fewer residues are shown) to see the probabilities")):(this.featuresG=this.seq_g.selectAll("g.location-group").data(this._data.data.index),this.svg.attr("height",this._height),this.locations=this.featuresG.enter().filter(t=>t-1>this._displaystart-3&&t-1<this._displayend+3).append("g").attr("class","location-group").attr("height",this._height),this.aminorect=this.locations.selectAll(".aminogroup").data(t=>this.getAaList(t)).enter().filter((t,e,i)=>{const r=i[e]._parent.__data__,n=this._data.data.index.indexOf(r);return this._data.data["probability_"+t][n]>0}).append("g").attr("class","aminogroup").append("rect").attr("class","rectamino").style("fill",t=>this.aaDetails[t].color).attr("y",(t,e,i)=>{const r=i[e].parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r);return this._aaYPosition(e,this._data.data["probability_"+t][n])}).attr("height",(t,e,i)=>{const r=i[e].parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r);return this._yScale(this._data.data["probability_"+t][n])}).attr("width",t).style("stroke-width","0.5").style("stroke","rgb(211,211,211)").attr("x",(t,e,i)=>{const r=i[e].parentElement.parentElement.__data__;return this.getXFromSeqPosition(r)}).attr("data-res-details",(t,e,i)=>{const r=i[e].parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r);return`${r}-${t}-${this._data.data["probability_"+t][n]}`}),this.locations.selectAll(".aminogroup").append("text").attr("class","textamino").style("cursor","default").attr("y",(t,e,i)=>{const r=i[e].parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r),a=this._data.data["probability_"+t][n];return this._aaYPosition(e,a)+(this._yScale(a)/2+5)}).attr("color","black").text(t=>t).attr("text-anchor","middle").attr("x",(e,i,r)=>{const n=r[i].parentElement.parentElement.__data__;return this.getXFromSeqPosition(n)+t/2}).attr("font-size",(e,i,r)=>{const n=r[i].parentElement.parentElement.__data__,a=this._data.data.index.indexOf(n),s=this._data.data["probability_"+e][a];return this.adaptLabelFontSize(t,this._yScale(s))}),this.locations.on("click",()=>{const t=d3.event,e=t.target,i=e.__data__,r=e.parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r),a=this._data.data["probability_"+i][n],s={start:r,end:r,feature:{tooltipContent:`Amino acid: ${this.aaDetails[i].name} (${this.aaDetails[i].code})<br/>Probability: ${(100*a).toFixed(2)}%`,type:"Sequence conservation"}};window.setTimeout(()=>{this.createTooltip(t,s,!0)},50),this.dispatchEvent(new CustomEvent("protvista-click",{detail:s,bubbles:!1,cancelable:!0}))}).on("mouseover",()=>{const t=d3.event,e=t.target,i=e.__data__,r=e.parentElement.parentElement.__data__,n=this._data.data.index.indexOf(r),a=this._data.data["probability_"+i][n],s={start:r,end:r,feature:{tooltipContent:`Amino acid: ${this.aaDetails[i].name} (${this.aaDetails[i].code})<br/>Probability: ${(100*a).toFixed(2)}%`,type:"Sequence conservation"}},o=document.querySelectorAll("protvista-tooltip");o&&o[0]&&"click-open"==o[0].className||window.setTimeout(()=>{this.createTooltip(t,s)},50),this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:r,highlightstart:r},bubbles:!0,cancelable:!0})),this.dispatchEvent(new CustomEvent("protvista-mouseover",{detail:s,bubbles:!1,cancelable:!0}))}).on("mouseout",()=>{this.dispatchEvent(new CustomEvent("change",{detail:{highlightend:null,highlightstart:null},bubbles:!0,cancelable:!0}));const t=document.querySelectorAll("protvista-tooltip");t&&t[0]&&"click-open"==t[0].className||window.setTimeout(()=>{this.removeAllTooltips()},50),this.dispatchEvent(new CustomEvent("protvista-mouseout",{detail:null,bubbles:!0,cancelable:!0}))})),this._updateHighlight()}}adaptLabelFontSize(t,e){return 9.4>t||9.4>e?"0em":"10px"}getAaList(t){const e=this._data.data.index.indexOf(t),i=this._data.data.index[e];if(this[this.displayOrder+"SortedData"][i])return this[this.displayOrder+"SortedData"][i].split(",");let r=[];this.aaList.forEach(t=>{r.push({aa:t,value:this._data.data["probability_"+t][e],color:this.aaDetails[t].color})});let n=[];return r.sort((t,e)=>"property"===this.displayOrder?t.color===e.color?e.value-t.value:t.color<e.color?-1:1:e.value-t.value),n=r.map(t=>t.aa),this[this.displayOrder+"SortedData"][i]=n.join(","),n}resetDisplayData(t){this.displayOrder=t,this.refresh()}disconnectedCallback(){super.disconnectedCallback(),this.manager&&this.manager.unregister(this)}};var wr=class extends mr{constructor(){super(),this._line=Object(s.line)().x(t=>this.xScale(t.x)).y(t=>this._yScale(t.y))}init(){this._totals_dataset={},this._totals_feature=void 0,this._disease_dataset={},this._disease_feature=void 0}connectedCallback(){super.connectedCallback(),this._data=void 0,this._height=parseInt(this.getAttribute("height"))||40,this._yScale=Object(s.scaleLinear)(),this._xExtent,this._yExtent,this.init()}set data(t){if(this._data=t,this.init(),this._data.variants.length<=0)return;let e={},i={};this._data.variants.forEach(t=>{void 0===e[t.start]&&(e[t.start]=0),void 0===i[t.start]&&(i[t.start]=0),e[t.start]++,void 0!==t.association&&t.association.forEach(e=>{!0===e.disease&&i[t.start]++})}),this._totals_dataset=Object.keys(e).map(t=>({x:t,y:e[t]})),this._disease_dataset=Object.keys(i).map(t=>({x:t,y:i[t]})),this._createTrack()}_createTrack(){Object(s.select)(this).selectAll("svg").remove(),this.svg=Object(s.select)(this).append("svg").style("width","100%").attr("height",50),this.highlighted=this.svg.append("rect").attr("class","highlighted").attr("fill","rgba(255, 235, 59, 0.8)").attr("stroke","black").attr("height",50),this._createFeatures(),this.refresh()}_createFeatures(){this._xExtent=Object(s.extent)(this._totals_dataset,t=>parseInt(t.x)),this._yExtent=Object(s.extent)(this._totals_dataset,t=>t.y),this._yExtent[1]+=2,this.xScale.domain(this._xExtent).range([0,this._width]),this._yScale.domain(this._yExtent).range([this._height,0])}refresh(){this.svg&&(this.svg.selectAll("path").remove(),this._disease_feature=this.svg.append("path").attr("d",this._line(this._disease_dataset)).attr("fill","none").attr("stroke","red").attr("stroke-width","1.5px").attr("stroke-dasharray","0").attr("transform","translate(0,0)"),this._totals_feature=this.svg.append("path").attr("d",this._line(this._totals_dataset)).attr("fill","none").attr("stroke","darkgrey").attr("stroke-width","1px").attr("stroke-dasharray",".5").attr("transform","translate(0,0)"),this._updateHighlight())}};var kr=function(t){const{variants:e,sequence:i}=t;if(!i||!e)return;const r=[],n=i.split("");for(let t in n)r.push({type:"VARIANT",normal:n[t],pos:t+1,variants:[]});return e.forEach(t=>{r[t.start-1]&&r[t.start-1].variants.push(t)}),r};var Sr=class{constructor(){this._frequency=Object(s.scalePow)().exponent(.001).domain([0,1]).range([5,10]),this.drawVariationPlot=this.drawVariationPlot.bind(this)}drawVariationPlot(t,e){const i=e.getSingleBaseWidth()/2;t.each((t,r,n)=>{const a=Object(s.select)(n[r]),o=t.filter(t=>0!==t.variants.length),l=a.selectAll("g").data(o,t=>t.pos);l.exit().remove();const c=l.enter().append("g").merge(l).selectAll("circle").data(t=>t.variants);c.exit().remove(),c.enter().append("circle").merge(c).attr("class",(function(t){})).attr("title",t=>t.start).attr("r",t=>t.size?t.size:5).attr("cx",t=>e.getXFromSeqPosition(t.start)+i).attr("cy",t=>e._yScale(t.variant.charAt(0))).attr("name",t=>{let e="*"===t.alternativeSequence?"STOP":t.alternativeSequence;return t.internalId="var_"+t.wildType+t.start+e,t.internalId}).attr("fill",t=>t.color).attr("tooltip-trigger","true").on("mouseover",t=>{const i=d3.event,r=document.querySelectorAll("protvista-tooltip");r&&r[0]&&"click-open"==r[0].className||window.setTimeout((function(){const r={start:t.start,end:t.end,feature:{...t,type:"Variant"}};e.createTooltip(i,r)}),50),e.dispatchEvent(new CustomEvent("change",{detail:{highlightend:t.end,highlightstart:t.start},bubbles:!0,cancelable:!0})),e.dispatchEvent(new CustomEvent("protvista-mouseover",{detail:t,bubbles:!0,cancelable:!0}))}).on("mouseout",()=>{const t=document.querySelectorAll("protvista-tooltip");t&&t[0]&&"click-open"==t[0].className||window.setTimeout((function(){e.removeAllTooltips()}),50),e.dispatchEvent(new CustomEvent("change",{detail:{highlightend:null,highlightstart:null},bubbles:!0,cancelable:!0})),e.dispatchEvent(new CustomEvent("protvista-mouseout",{detail:null,bubbles:!0,cancelable:!0}))}).on("click",t=>{const i={start:t.start,end:t.end,feature:{...t,type:"Variant"}};e.createTooltip(s.event,i,!0),e.dispatchEvent(new CustomEvent("protvista-click",{detail:i,bubbles:!0,cancelable:!0}))})})}},Ar=(r(18),Object.prototype.hasOwnProperty);var Cr=function(t,e,i){var r=t[e];Ar.call(t,e)&&Et(r,i)&&(void 0!==i||e in t)||Z(t,e,i)};var Er=function(t,e,i,r){var n=!i;i||(i={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=r?r(i[o],t[o],o,i,t):void 0;void 0===l&&(l=t[o]),n?Z(i,o,l):Cr(i,o,l)}return i};var Tr=function(t,e){return t&&Er(e,wt(e),t)};var Lr=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e},jr=Object.prototype.hasOwnProperty;var Pr=function(t){if(!T(t))return Lr(t);var e=bt(t),i=[];for(var r in t)("constructor"!=r||!e&&jr.call(t,r))&&i.push(r);return i};var Ir=function(t){return xt(t)?gt(t,!0):Pr(t)};var Mr=function(t,e){return t&&Er(e,Ir(e),t)},Or=r(12);var Dr=function(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i<r;)e[i]=t[i];return e};var qr=function(t,e){return Er(t,Te(t),e)},$r=ft(Object.getPrototypeOf,Object),Fr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)we(e,Te(t)),t=$r(t);return e}:Ae;var Rr=function(t,e){return Er(t,Fr(t),e)};var Nr=function(t){return ke(t,Ir,Fr)},Hr=Object.prototype.hasOwnProperty;var zr=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&Hr.call(t,"index")&&(i.index=t.index,i.input=t.input),i};var Br=function(t){var e=new t.constructor(t.byteLength);return new be(e).set(new be(t)),e};var Wr=function(t,e){var i=e?Br(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)},Vr=/\w*$/;var Zr=function(t){var e=new t.constructor(t.source,Vr.exec(t));return e.lastIndex=t.lastIndex,e},Gr=y?y.prototype:void 0,Ur=Gr?Gr.valueOf:void 0;var Xr=function(t){return Ur?Object(Ur.call(t)):{}};var Yr=function(t,e){var i=e?Br(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)};var Kr=function(t,e,i){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Br(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return Wr(t,i);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Yr(t,i);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Zr(t);case"[object Set]":return new r;case"[object Symbol]":return Xr(t)}},Jr=Object.create,Qr=function(){function t(){}return function(e){if(!T(e))return{};if(Jr)return Jr(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var tn=function(t){return"function"!=typeof t.constructor||bt(t)?{}:Qr($r(t))};var en=function(t){return Y(t)&&"[object Map]"==ze(t)},rn=ht.a&&ht.a.isMap,nn=rn?ct(rn):en;var an=function(t){return Y(t)&&"[object Set]"==ze(t)},sn=ht.a&&ht.a.isSet,on=sn?ct(sn):an,ln={};ln["[object Arguments]"]=ln["[object Array]"]=ln["[object ArrayBuffer]"]=ln["[object DataView]"]=ln["[object Boolean]"]=ln["[object Date]"]=ln["[object Float32Array]"]=ln["[object Float64Array]"]=ln["[object Int8Array]"]=ln["[object Int16Array]"]=ln["[object Int32Array]"]=ln["[object Map]"]=ln["[object Number]"]=ln["[object Object]"]=ln["[object RegExp]"]=ln["[object Set]"]=ln["[object String]"]=ln["[object Symbol]"]=ln["[object Uint8Array]"]=ln["[object Uint8ClampedArray]"]=ln["[object Uint16Array]"]=ln["[object Uint32Array]"]=!0,ln["[object Error]"]=ln["[object Function]"]=ln["[object WeakMap]"]=!1;var cn=function t(e,i,r,n,a,s){var o,l=1&i,c=2&i,h=4&i;if(r&&(o=a?r(e,n,a,s):r(e)),void 0!==o)return o;if(!T(e))return e;var d=it(e);if(d){if(o=zr(e),!l)return Dr(e,o)}else{var p=ze(e),u="[object Function]"==p||"[object GeneratorFunction]"==p;if(Object(rt.a)(e))return Object(Or.a)(e,l);if("[object Object]"==p||"[object Arguments]"==p||u&&!a){if(o=c||u?{}:tn(e),!l)return c?Rr(e,Mr(o,e)):qr(e,Tr(o,e))}else{if(!ln[p])return a?e:{};o=Kr(e,p,l)}}s||(s=new le);var g=s.get(e);if(g)return g;s.set(e,o),on(e)?e.forEach((function(n){o.add(t(n,i,r,n,e,s))})):nn(e)&&e.forEach((function(n,a){o.set(a,t(n,i,r,a,e,s))}));var v=h?c?Nr:Le:c?keysIn:wt,b=d?void 0:v(e);return ar(b||e,(function(n,a){b&&(n=e[a=n]),Cr(o,a,t(n,i,r,a,e,s))})),o};var hn=function(t){return cn(t,5)},dn=y?y.isConcatSpreadable:void 0;var pn=function(t){return it(t)||et(t)||!!(dn&&t&&t[dn])};var un=function t(e,i,r,n,a){var s=-1,o=e.length;for(r||(r=pn),a||(a=[]);++s<o;){var l=e[s];i>0&&r(l)?i>1?t(l,i-1,r,n,a):we(a,l):n||(a[a.length]=l)}return a};var gn=function(t){return(null==t?0:t.length)?un(t,1):[]};var vn=function(t,e){return!!(null==t?0:t.length)&&Wi(t,e,0)>-1};var bn=function(t,e,i){for(var r=-1,n=null==t?0:t.length;++r<n;)if(i(e,t[r]))return!0;return!1};var fn=function(){},yn=Oe&&1/ye(new Oe([,-0]))[1]==1/0?function(t){return new Oe(t)}:fn;var mn=function(t,e,i){var r=-1,n=vn,a=t.length,s=!0,o=[],l=o;if(i)s=!1,n=bn;else if(a>=200){var c=e?null:yn(t);if(c)return ye(c);s=!1,n=ge,l=new pe}else l=e?[]:o;t:for(;++r<a;){var h=t[r],d=e?e(h):h;if(h=i||0!==h?h:0,s&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue t;e&&l.push(d),o.push(h)}else n(l,d,i)||(l!==o&&l.push(d),o.push(h))}return o};var _n=function(t,e){return t&&t.length?mn(t,ki(e,2)):[]};var xn=function(t,e){return t&&kt(t,sr(e))},wn=Math.min;var kn=function(t,e,i){for(var r=i?bn:vn,n=t[0].length,a=t.length,s=a,o=Array(a),l=1/0,c=[];s--;){var h=t[s];s&&e&&(h=si(h,ct(e))),l=wn(h.length,l),o[s]=!i&&(e||n>=120&&h.length>=120)?new pe(s&&h):void 0}h=t[0];var d=-1,p=o[0];t:for(;++d<n&&c.length<l;){var u=h[d],g=e?e(u):u;if(u=i||0!==u?u:0,!(p?ge(p,g):r(c,g,i))){for(s=a;--s;){var v=o[s];if(!(v?ge(v,g):r(t[s],g,i)))continue t}p&&p.push(g),c.push(u)}}return c};var Sn=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)},An=Math.max;var Cn=function(t,e,i){return e=An(void 0===e?t.length-1:e,0),function(){for(var r=arguments,n=-1,a=An(r.length-e,0),s=Array(a);++n<a;)s[n]=r[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=r[n];return o[e]=i(s),Sn(t,this,o)}};var En=function(t){return function(){return t}},Tn=V?function(t,e){return V(t,"toString",{configurable:!0,enumerable:!1,value:En(e),writable:!0})}:mi,Ln=Date.now;var jn=function(t){var e=0,i=0;return function(){var r=Ln(),n=16-(r-i);if(i=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Tn);var Pn=function(t){return Y(t)&&xt(t)};var In=function(t){return Pn(t)?t:[]};var Mn=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},On=function(t,e){return jn(Cn(t,e,mi),t+"")}((function(t){var e=Mn(t),i=si(t,In);return e===Mn(i)?e=void 0:i.pop(),i.length&&i[0]===t[0]?kn(i,ki(e,2)):[]}));const Dn={disease:"likely_disease",predicted:"predicted",nonDisease:"likely_benign",uncertain:"uncertain",UniProt:"uniprot_reviewed",ClinVar:"clinvar_reviewed",LSS:"large_scale_studies",FoldX:"foldx",PDB:"pdb",missense3d:"missense3d",SKEMPI:"skempi",fireprotdb:"fireprotdb",frustratometer:"frustratometer",nextprot:"nextprot"},qn=(t,e)=>((t,e=[])=>{const i=hn(e)||[],r=Dn[t];return i.filter(t=>t.keywords&&t.keywords.indexOf(r)>-1)})(t,e),$n=(t,e,i,r)=>{const{sequence:n,variants:a}=r;if(!(i=i.trim()))return{sequence:n,variants:a};const s=i.split(","),o=Ci(s,t=>t.split(":")[0]);let l=[];return xn(o,t=>{const e=((t,e,i)=>_n(gn(e.map(t=>t.split(":")[1]).map(e=>qn(e,t))),t=>t[i]))(a,t,"accession");l.push(e)}),l=gn(On(...l,t=>t.accession)),l=_n(l,"accession"),{sequence:n,variants:l}};var Fn=[{name:"disease",type:{name:"consequence",text:"Filter Consequence"},options:{labels:["Likely disease"],colors:["#990000"]}},{name:"predicted",type:{name:"consequence",text:"Filter Consequence"},options:{labels:["Predicted deleterious","Predicted benign"],colors:["#002594","#8FE3FF"]}},{name:"nonDisease",type:{name:"consequence",text:"Filter Consequence"},options:{labels:["Likely benign"],colors:["#99cc00"]}},{name:"uncertain",type:{name:"consequence",text:"Filter Consequence"},options:{labels:["Uncertain"],colors:["#009e73"]}},{name:"UniProt",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["UniProt reviewed"],colors:["#e5e5e5"]}},{name:"ClinVar",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["ClinVar reviewed"],colors:["#e5e5e5"]}},{name:"LSS",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["Large scale studies"],colors:["#e5e5e5"]}},{name:"FoldX",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["FoldX analysis"],colors:["#e5e5e5"]}},{name:"missense3d",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["Missense3D"],colors:["#e5e5e5"]}},{name:"PDB",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["Observed in PDB"],colors:["#e5e5e5"]}},{name:"SKEMPI",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["SKEMPI"],colors:["#e5e5e5"]}},{name:"fireprotdb",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["FireProtDB"],colors:["#e5e5e5"]}},{name:"frustratometer",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["Frustratometer"],colors:["#e5e5e5"]}},{name:"nextprot",type:{name:"provenance",text:"Filter Provenance"},options:{labels:["neXtProt"],colors:["#e5e5e5"]}}];const Rn=["G","A","V","L","I","S","T","C","M","D","N","E","Q","R","K","H","F","Y","W","P","d","*"];var Nn=class extends mr{connectedCallback(){super.connectedCallback(),this._accession=this.getAttribute("accession"),this._height=parseInt(this.getAttribute("height"))?parseInt(this.getAttribute("height")):430,this._width=this._width?this._width:0,this._yScale=Object(s.scaleLinear)(),this._yScale=Object(s.scalePoint)().domain(Rn).range([0,this._height-this.margin.top-this.margin.bottom])}static get observedAttributes(){return super.observedAttributes.concat("activefilters")}attributeChangedCallback(t,e,i){if(e!==i&&"activefilters"==t)this.data=$n(0,0,i,this._completeDataSet);else if(super.attributeChangedCallback(t,e,i),!super.svg)return}_fireEvent(t,e){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0,cancelable:!0}))}set data(t){void 0===this._completeDataSet&&(this._completeDataSet=t),this._data=kr(t),this._createTrack()}_createTrack(){this._layoutObj.init(this._data),d3.select(this).selectAll("svg").remove(),this.svg=d3.select(this).append("div").style("line-height",0).append("svg").style("width","100%").attr("height",this._height+40),this.highlighted=this.svg.append("rect").attr("class","highlighted").attr("fill","rgba(255, 235, 59, 0.8)").attr("stroke","black").attr("height",this._height+40).attr("transform","translate(1.5,0)"),this.seq_g=this.svg.append("g").attr("class","sequence-features").attr("transform","translate(1.5,30)"),this._createFeatures(),this.refresh()}_createFeatures(){this._variationPlot=new Sr;const t=super.svg.select("g.sequence-features");this._axisLeft=t.append("g"),this._axisRight=t.append("g");const e=t.append("g").attr("clip-path","url(#plotAreaClip)");let i=this.getWidthWithMargins();if(0==i)try{i=this.parentElement.parentElement.parentElement.previousElementSibling.lastElementChild.clientWidth}catch(t){}this._clipPath=t.append("clipPath").attr("id","plotAreaClip").append("rect").attr("width","100%").attr("height",this._height).attr("transform",`translate(0, -${this.margin.top})`),this._series=e.datum(this._data),this.updateScale()}refresh(){this._series&&(this._clipPath.style("width","100%"),this.updateScale(),this._series.call(this._variationPlot.drawVariationPlot,this),this._updateHighlight())}updateScale(){this._yAxisLScale=Object(s.axisLeft)().scale(this._yScale).tickSize(-this.getWidthWithMargins()),this._yAxisRScale=Object(s.axisRight)().scale(this._yScale),this._axisLeft.attr("class","variation-y-left axis").attr("transform",`translate(${this.margin.left},0)`).call(this._yAxisLScale),this._axisRight.attr("transform",`translate(${this.getWidthWithMargins()-this.margin.right+10}, 0)`).attr("class","variation-y-right axis").call(this._yAxisRScale)}updateData(t){this._series&&this._series.datum(t)}reset(){}};class Hn extends HTMLElement{constructor(){super(),this._top=parseInt(this.getAttribute("top")),this._left=parseInt(this.getAttribute("left")),this._content=this.getAttribute("content"),this._title=this.getAttribute("title"),this._mirror=void 0}set top(t){this._top=t}get top(){return this._top}set left(t){this._left=t}get left(){return this._left}set content(t){this._content=t}get content(){return this._content}set title(t){this._title=t}get title(){return this._title}set closeable(t){t?this.setAttribute("closeable",""):this.removeAttribute("closeable")}get closeable(){return this.hasAttribute("closeable")}get mirror(){return this._mirror}set mirror(t){this.setAttribute("mirror",t)}static get observedAttributes(){return["top","left","mirror"]}attributeChangedCallback(t,e,i){e!=i&&("top"===t||"left"===t?(this["_"+t]=this.getAttribute(t),this._updatePosition()):this.render())}connectedCallback(){this.render(),document.getElementsByTagName("body")[0].addEventListener("click",t=>{this.hasTooltipParent(t.target)&&!t.target.classList.contains("tooltip-close")||null!==t.target.getAttribute("tooltip-trigger")||this.remove()})}hasTooltipParent(t){return!(!t.parentElement||"body"===t.parentElement.tagName)&&("PROTVISTA-TOOLTIP"===t.parentElement.tagName||this.hasTooltipParent(t.parentElement))}_updatePosition(){this.style.top=this._top+"px",this.style.left=this._left+"px"}render(){this._updatePosition(),void 0!==this.mirror&&(this.mirror=this.mirror);let t=`<div class="tooltip-header"><span class="tooltip-header-title">${this._title}</span>`;this.closeable&&(t+='<span class="tooltip-close" style="float:right"></span>'),t=`${t}</div><div class="tooltip-body">${this._content}</div>`,this.innerHTML=t}}var zn=Hn;r(20);const{html:Bn}=r(1);var Wn=function(t){return Bn`<div class="protvistaRow">
                    
        <!-- Top Menu Toolbar -->
        <div class="protvistaCol1 protvistaToolbar" style="position:relative">
            <span class="protvistaToolbarIcon" @click=${e=>t.layoutHelper.resetView()} title="Reset view">
                <i class="icon icon-functional" data-icon="R"></i>
            </span>

            <!-- View / highlight menu -->
            <span class="protvistaToolbarIcon" title="View / highlight region" @click=${e=>t.layoutHelper.openRangeMenu()}>
                <i class="icon icon-generic" data-icon="["></i>
            </span>
            <div class="rangeMenu viewMenuBox" style="display:none">
                <div class="protvistaRangeMenuTitle">
                    <div>View region</div>
                    <span class="icon icon-functional protvistaMenuClose" data-icon="x" title="close" @click=${e=>{e.stopPropagation(),t.layoutHelper.openRangeMenu()}}></span>
                </div>
                <div class="protvistaForm rangeForm" style="width:170px;">
                    <div style="float:left;width:48%;">
                        From <br>
                        <input type="number" class="pvRangeMenuStart" value="0" style="display:inline-block;margin:0;" min="1" max="${t.viewerData.length}" step="1" />
                    </div>
                    <div style="float:right;width:48%;">
                        To <br>
                        <input type="number" class="pvRangeMenuEnd" value="0" style="display:inline-block;margin:0;" min="1" max="${t.viewerData.length}" step="1" /> <br><br>
                    </div>
                    <div style="margin:0 0 10px 0;clear:both;">
                        <input type="checkbox" class="pvRangeMenuHighlight" /> highlight-only
                    </div>                                
                    <button class="button tiny" style="margin:0; letter-spacing: 1px;" @click=${e=>t.layoutHelper.pvRangeMenuSubmit()}>Submit</button>
                </div>
            </div>
            <!-- View / highlight menu -->

            <!-- Track categories settings menu -->
            <span class="protvistaToolbarIcon" title="Hide sections" @click=${e=>t.layoutHelper.openCategorySettingsMenu()}>
                <i class="icon icon-functional" data-icon="M"></i>
            </span>
            <div class="settingsMenu viewMenuBox" style="display:none">
                <div class="protvistaRangeMenuTitle">
                    <div>Hide sections</div>
                    <span class="icon icon-functional protvistaMenuClose" data-icon="x" title="close" @click=${e=>{e.stopPropagation(),t.layoutHelper.openCategorySettingsMenu()}}></span>
                </div>
                <div class="protvistaForm rangeForm" style="width:215px;max-height:400px;">
                    <table style="font-size:inherit;margin-bottom:0" class="pvHideOptionsTable">
                        <tbody>
                        ${t.viewerData.tracks.map((t,e)=>Bn`
                            <tr>
                            <td style="width:10%;vertical-align:top;">
                                <input type="checkbox" class="pvSectionChkBox" name="cb_${e}" style="margin:0" />
                            </td>
                            <td style="padding-bottom:5px;">
                                ${t.label}
                            </td>
                            </tr>
                        `)}
                        <tr style="display:none" class="scOption"></tr>
                        <tr style="display:none" class="variationOption"></tr>
                        </tbody>
                    </table>
                    <br>
                    <button class="button tiny" style="margin:0; letter-spacing: 1px;" @click=${e=>t.layoutHelper.pvCategorySettingsMenuSubmit()}>Submit</button>
                </div>
            </div>
            <!-- Track categories settings menu -->
        </div>

        <!-- Navigation Component -->
        <div class="protvistaCol2 pvNavSection">
            <protvista-pdb-navigation length="${t.viewerData.length}" offset="${t.viewerData.offset}" ></protvista-pdb-navigation>
        </div>

    </div>`};const{html:Vn}=r(1);var Zn=function(t){return Vn`<div class="protvistaRow">
                    
        <!-- Top Menu Toolbar -->
        <div class="protvistaCol1">&nbsp;</div>

        <!-- Navigation Component -->
        <div class="protvistaCol2 pvSeqSection">
            <protvista-sequence length="${t.viewerData.length}" sequence="${t.viewerData.sequence}"></protvista-sequence>
        </div>

    </div>`};
/**
 * @license
 * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */const Gn=new WeakMap,Un=new WeakMap,Xn=Object(b.directive)(t=>e=>{if(!(e instanceof b.AttributePart)||e instanceof b.PropertyPart||"style"!==e.committer.name||e.committer.parts.length>1)throw new Error("The `styleMap` directive must be used in the style attribute and must be the only part in the attribute.");Un.has(e)||(e.committer.element.style.cssText=e.committer.strings.join(" "),Un.set(e,!0));const i=e.committer.element.style,r=Gn.get(e);for(const e in r)e in t||(-1===e.indexOf("-")?i[e]=null:i.removeProperty(e));for(const e in t)-1===e.indexOf("-")?i[e]=t[e]:i.setProperty(e,t[e]);Gn.set(e,t)}),{html:Yn}=r(1);var Kn=function(t){return Yn`${t.viewerData.tracks.map((e,i)=>Yn`
        <div class="protvistaRow pvTrackRow pvTracks_${i}">
            <div class="protvistaCol1 category-label" data-label-index="${i}" @click=${e=>t.layoutHelper.showSubtracks(i)} 
            style=${Xn(e.labelColor?{backgroundColor:e.labelColor,borderBottom:"1px solid lightgrey"}:{})}>
                <span class="pvTrackLabel_${i}"></span>
                <span class="protvistaResetSectionIcon pvResetSection_${i}" @click=${e=>{e.stopPropagation(),t.layoutHelper.resetSection(i)}} title="Reset section">
                <i class="icon icon-functional" data-icon="R"></i>
                </span>
            </div>
            <div class="protvistaCol2 aggregate-track-content" style=${Xn(e.labelColor?{borderBottom:"1px solid lightgrey"}:{})}>
                <protvista-pdb-track class="pvTrack" length="${t.viewerData.length}" layout="${t.layoutHelper.getTrackLayout(e.overlapping)}" height="${t.layoutHelper.getTrackHeight(e.length,e.overlapping)}"></protvista-pdb-track>
            </div>
        </div>
        <!-- Subtrack Rows Start -->
        <div class="protvistaRowGroup pvSubtracks_${i}">
            ${e.data.map((r,n)=>Yn`
                <div class="protvistaRow pvSubtrackRow_${i}_${n}">
                    <div class="protvistaCol1 track-label" style=${Xn(r.labelColor?{backgroundColor:r.labelColor,borderBottom:"1px solid lightgrey"}:{})}
                    @mouseover=${e=>{e.stopPropagation(),t.layoutHelper.showLabelTooltip(e)}} @mouseout=${e=>{e.stopPropagation(),t.layoutHelper.hideLabelTooltip()}}>
                        <span class="icon icon-functional hideLabelIcon" data-icon="x" @click=${e=>{e.stopPropagation(),t.layoutHelper.hideSubTrack(i,n)}} 
                        title="Hide this section"></span> 
                        <div class="pvSubtrackLabel_${i}_${n}" style="word-break: break-all;"></div>
                        <span class="icon icon-functional labelZoomIcon pvZoomIcon_${i}_${n}" data-icon="T" @click="${e=>{t.layoutHelper.zoomTrack({start:1,end:null,trackData:r},i+"_"+n)}}
                        title="Click to zoom-out this section"></span>

                        ${r.labelTooltip?Yn`
                            <span class="labelTooltipContent" style="display:none;">${r.labelTooltip}</span>
                        `:""}
                    </div>
                    <div class="protvistaCol2 track-content" style=${Xn(e.labelColor?{borderBottom:"1px solid lightgrey"}:{})}>
                        <protvista-pdb-track class="pvSubtrack_${i}" length="${t.viewerData.length}" layout="${t.layoutHelper.getTrackLayout(r.overlapping)}" height="${t.layoutHelper.getTrackHeight(r.length,r.overlapping)}"></protvista-pdb-track>
                    </div>
                </div>`)}
        </div>
        <!-- Subrack Rows End -->
    `)}`};const{html:Jn}=r(1);var Qn=function(t){return Jn`<div class="protvistaRow pvConsHistoRow" style="display:none">
                    
                    <div class="protvistaCol1 category-label" @click=${e=>t.layoutHelper.showConservationPlot()} style="background-color:rgb(128,128,128); borderBottom:1px solid lightgrey">Sequence conservation</div>

                    <div class="protvistaCol2 aggregate-track-content pvConservationHistoSection">
                        <protvista-pdb-sc-histogram accession="${t._entryId?t._entryId:t._accession}" length="${t.viewerData.length}"></protvista-pdb-sc-histogram>
                    </div>
                </div>
                <div class="pvConservationPlotRow" style="display:none">
                    <div class="protvistaRow">
                        <div class="protvistaCol1 track-label" style="background-color:rgb(211,211,211); borderBottom:1px solid lightgrey">
                            <div style="height:30px;">
                                <b>Amino acid probabilities</b>
                                <span style="float: right" @mouseover=${e=>{e.stopPropagation(),t.layoutHelper.showLabelTooltip(e)}} @mouseout=${e=>{e.stopPropagation(),t.layoutHelper.hideLabelTooltip()}}>
                                    <a href="https://github.com/PDBe-KB/pdbe-kb-manual/wiki/Sequence-conservation-scores" target="_blank"
                                    style="border-bottom: none">
                                        <i class="icon icon-generic" data-icon="?"></i>
                                    </a>
                                    <span class="labelTooltipContent" style="display:none;">
                                        The amino acid probabilities are calculated using HMM profiles based on multiple sequence alignments. Click to see more details...
                                    </span>
                                </span>
                            </div>
                            <div class="control" style="height:90px;">
                                <p>Data displayed by</p>
                                <div>
                                    <label class="legendText">
                                        <input type="radio" class="sc_radio" name="sc_display_radio" value="property" checked @change=${e=>t.layoutHelper.filterSc("property")}>Property
                                    </label>
                                </div>
                                <div>
                                    <label class="legendText">
                                        <input type="radio" class="sc_radio" name="sc_display_radio" value="probability" @change=${e=>t.layoutHelper.filterSc("probability")}>Probability
                                    </label>
                                </div>
                            </div>

                            <!-- Note: Display is set to none until we expose MSA files per PDB entity -->
                            <div @mouseover=${e=>{e.stopPropagation(),t.layoutHelper.showLabelTooltip(e)}} @mouseout=${e=>{e.stopPropagation(),t.layoutHelper.hideLabelTooltip()}}
                            style = "${t._entryId?"display: none":""}"
                            >
                                <a class="button" style="padding: 2px 4px 2px 4px; background-color: #ececec; border: solid 1px dimgrey; border-radius: 3px; margin-top: 10px;"
                                    href="${t.layoutHelper.getMSADownloadUrl()}">
                                    Download MSA <i class="icon icon-functional" data-icon="="></i>
                                </a>
                                <span class="labelTooltipContent" style="display:none;">
                                    Click to download the multiple sequence alignment (MSA) file
                                </span>
                            </div>

                            <div class="legend" style="height:200px;">
                                <p>Amino acid properties</p>
                                <div class="protvista-sc-legend">
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#15a4a4"></span>
                                        <span class="legendText">Aromatic</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#15c015"></span>
                                        <span class="legendText">Polar</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#80a0f0"></span>
                                        <span class="legendText">Hydrophobic</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#c048c0"></span>
                                        <span class="legendText">Negative charge</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#c0c000"></span>
                                        <span class="legendText">Proline</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#f01505"></span>
                                        <span class="legendText">Positive charge</span>
                                    </div>
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#f08080"></span>
                                        <span class="legendText">Cysteine</span>
                                    </div>                                  
                                    <div class="protvista-sc-legend">
                                        <span class="legendColor" style="background:#f09048"></span>
                                        <span class="legendText">Glycine</span>
                                    </div>
                                </div>
                            </div>

                            <div class="download-sc-align">
                            </div>
                        </div>

                        <div class="protvistaCol2 track-content pvConservationPlotSection">
                            <protvista-pdb-seq-consevation sc-display-order="property" accession="${t._entryId?t._entryId:t._accession}" length="${t.viewerData.length}"></protvista-pdb-seq-consevation>
                        </div>
                    </div>
                </div>`};const{html:ta}=r(1);var ea=function(t){return ta`<div class="protvistaRow pvVariantGraphRow" style="display:none">
                    
                    <div class="protvistaCol1 category-label" @click=${e=>t.layoutHelper.showVariantPlot()}>Variants</div>

                    <div class="protvistaCol2 aggregate-track-content pvVariantGraphSection">
                        <protvista-pdb-variation-graph length="${t.viewerData.length}"></protvista-pdb-variation-graph>
                    </div>
                </div>

                <div class="pvVariantPlotRow" style="display:none">

                    <div class="protvistaRow">
                        
                        <div class="protvistaCol1 track-label">
                            <protvista-filter filters='${t.variantFilterAttr}'></protvista-filter>
                        </div>

                        <div class="protvistaCol2 track-content pvVariantPlotSection">
                            <protvista-pdb-variation length="${t.viewerData.length}"></protvista-pdb-variation>
                        </div>
                    </div>

                </div>`};const{html:ia}=r(1);var ra=function(t){return ia`<div></div>
                <div>
                    ${Object.keys(t.viewerData.legends.data).map(e=>ia`
                            <div class="legendRow" style=${Xn({textAlign:t.viewerData.legends.alignment})}>
                                ${isNaN(parseInt(e))?ia`<span class="legendText"><strong>${e} : </strong></span>`:""}
                                ${t.viewerData.legends.data[e].map(t=>{Array.isArray(t.color)||(t.color=[t.color]);const e=t.color.length,i=100/e;let r="";if(1==e)r="background:"+t.color[0];else{let n=["to right"];t.color.forEach((t,r)=>{0==r?n.push(t+" "+i+"%"):r==e-1?n.push(t+" "+(i*r-1)+"%"):n.push(t+" "+i*r+"% "+i*(r+1)+"%")}),r="background:linear-gradient("+n.join(", ")+")"}return ia`
                                    <span class="legendColor" style="${r}"></span>
                                    <span class="legendText">${t.text}</span>
                                `})}
                            </div>
                            `)}
                </div>`};var na=class{constructor(t,e,i,r,n){this.appUrlEnv=t||(new RegExp("wwwdev").test(window.location.href)?"dev":new RegExp("wwwint").test(window.location.href)?"int":""),this.accession=e,this.entryId=i,this.entityId=r,this.pageSection=n,this.viewerData={displayNavigation:!0,displaySequence:!0,displayConservation:!0,displayVariants:!0,sequence:void 0,length:void 0,tracks:[],legends:{alignment:"right",data:{}}}}getPDBePVApiUrls(){let t={uniport:[`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/protvista/unipdb/${this.accession}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/protvista/domains/${this.accession}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/aggregated-api/uniprot/secondary_structures/protvista/variation/${this.accession}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/protvista/ligand_sites/${this.accession}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/protvista/interface_residues/${this.accession}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/protvista/annotations/${this.accession}`],entry:[`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/uniprot_mapping/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/chains/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/domains/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/rfam/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/secondary_structure/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/binding_sites/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/interfaces/${this.entryId}/${this.entityId}`,`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/pdbe_pages/protvista/annotations/${this.entryId}/${this.entityId}`]},e=[];return this.accession?e=t.uniport:this.entryId&&this.entityId&&!this.pageSection?e=t.entry:this.entryId&&this.entityId&&this.pageSection&&(e="2"===this.pageSection?[t.entry.pop()]:t.entry.slice(0,-1)),e}async processMutlplePDBeApiData(){let t=this.getPDBePVApiUrls();return await Promise.all(t.map(t=>fetch(t))).then(t=>Promise.all(t.map(t=>t.json()))).then(e=>{e.forEach((e,i)=>{if(void 0===e||null==e||0===Object.keys(e).length);else{let r=this.entryId?this.entryId:this.accession;if(t[i].split("/").indexOf("uniprot_mapping")>-1&&e[r].tracks&&1==e[r].tracks.length&&(this.accession=e[r].tracks[0].data[0].label),!e[r])return;if(e[r].displayNavigation&&0==e[r].displayNavigation&&(this.viewerData.displayNavigation=!1),e[r].displaySequence&&0==e[r].displaySequence&&(this.viewerData.displaySequence=!1),e[r].sequence&&(this.viewerData.sequence=e[r].sequence),e[r].length&&(this.viewerData.length=e[r].length),e[r].tracks&&(this.viewerData.tracks=this.viewerData.tracks.concat(e[r].tracks)),e[r].legends&&(e[r].legends.alignment&&(this.viewerData.legends.alignment=e[r].legends.alignment),e[r].legends.data))for(let t in e[r].legends.data)this.viewerData.legends.data[t]=e[r].legends.data[t]}})},t=>{console.log("API unavailable!",e)}),this.viewerData}async getPDBeApiDataByName(t){try{let e=`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/uniprot/${"sequence_conservation"===t?"":"protvista/"}${t}/${this.accession}`;return this.entryId&&this.entityId&&(e=`https://www${this.appUrlEnv}.ebi.ac.uk/pdbe/graph-api/${"sequence_conservation"===t?"pdb":"pdbe_pages/protvista"}/${t}/${this.entryId}/${this.entityId}`),await(await fetch(e)).json()}catch(e){console.log(`API ${t} unavailable!`,e)}}};var aa=class{constructor(t){this.ctx=t}postProcessLayout(){this.getScrollbarWidth();let t=this.ctx.querySelectorAll(".pvNavSection")[0];t&&(t.style.paddingRight=this.ctx.scrollbarWidth+"px",setTimeout(()=>{let t=this.ctx.querySelectorAll("protvista-navigation")[0];t&&(t.firstElementChild.firstElementChild.style.width="100%")},100));let e=this.ctx.querySelectorAll(".pvSeqSection")[0];e&&(e.style.paddingRight=this.ctx.scrollbarWidth+"px",setTimeout(()=>{let t=this.ctx.querySelectorAll("protvista-sequence")[0];t&&(t.firstElementChild.firstElementChild.style.width="100%")},100));let i=this.ctx.querySelectorAll(".pvLineGraphSection")[0];if(i&&(i.style.paddingRight=this.ctx.scrollbarWidth+"px"),this.bindTrackData("track",void 0,this.ctx.scrollbarWidth),this.ctx.viewerData.displayVariants)if(this.ctx.viewerData.variants){const t={key:"variationOption",index:this.ctx.viewerData.tracks.length+1,label:"Variation"};this.addDynamicTrackSection(this.ctx.viewerData.variants,".pvVariantGraphRow",".pvVariantGraphSection",".pvVariantPlotSection",t)}else this.ctx.dataHelper.getPDBeApiDataByName("variation").then(t=>{const e={key:"variationOption",index:this.ctx.viewerData.tracks.length+1,label:"Variation"};this.addDynamicTrackSection(t,".pvVariantGraphRow",".pvVariantGraphSection",".pvVariantPlotSection",e)});if(this.ctx.viewerData.displayConservation)if(this.ctx.viewerData.sequenceConservation){const t={key:"scOption",index:this.ctx.viewerData.tracks.length,label:"Sequence conservation"};this.addDynamicTrackSection(this.ctx.viewerData.sequenceConservation,".pvConsHistoRow",".pvConservationHistoSection",".pvConservationPlotSection",t,!0)}else this.ctx.dataHelper.getPDBeApiDataByName("sequence_conservation").then(t=>{const e={key:"scOption",index:this.ctx.viewerData.tracks.length,label:"Sequence conservation"};this.addDynamicTrackSection(t,".pvConsHistoRow",".pvConservationHistoSection",".pvConservationPlotSection",e,!0)});this.ctx.subscribeEvents&&this.addEventSubscription()}addDynamicTrackSection(t,e,i,r,n,a){if(t&&Object.keys(t).length>0){this.ctx.querySelector(e).style.display="table";let s=this.ctx.querySelectorAll(i)[0];s&&(s.style.paddingRight=this.ctx.scrollbarWidth+"px",a&&(s.style.borderBottom="1px solid lightgrey"),s.firstElementChild.data=t);let o=this.ctx.querySelectorAll(r)[0];o&&(o.style.paddingRight=this.ctx.scrollbarWidth+"px",a&&(o.style.borderBottom="1px solid lightgrey"),o.firstElementChild.data=t),this.addHideOptions(n.key,n.index,n.label)}}getScrollbarWidth(){let t=this.ctx.querySelectorAll(".divWithScroll")[0],e=this.ctx.querySelectorAll(".divWithoutScroll")[0];this.ctx.scrollbarWidth=e.clientWidth-t.clientWidth,t.remove(),e.remove()}getTrackLayout(t){return t?"overlapping":"non-overlapping"}getTrackHeight(t,e){return t>1?60:44}showSubtracks(t){let e=this.ctx.querySelectorAll(".pvSubtracks_"+t)[0],i=this.ctx.querySelectorAll(".pvTracks_"+t)[0];i.classList.contains("expanded")?(e.style.display="none",i.querySelectorAll(".pvTrack")[0].style.display="block",i.classList.remove("expanded")):(i.querySelectorAll(".pvTrack")[0].style.display="none",e.style.display="block",-1==this.ctx.formattedSubTracks.indexOf(t)&&(this.bindTrackData("subtrack",t,this.ctx.scrollbarWidth),this.ctx.formattedSubTracks.push(t)),i.classList.add("expanded"))}hideSubtracks(t){this.ctx.querySelectorAll(".pvSubtracks_"+t)[0].style.display="none",this.ctx.querySelectorAll(".pvTracks_"+t)[0].style.display="table"}addHideOptions(t,e,i){let r=this.ctx.querySelector("."+t);r.innerHTML=`<tr>\n            <td style="width:10%;vertical-align:top;"><input type="checkbox" class="pvSectionChkBox" name="cb_${e}" style="margin:0" /></td>\n            <td style="padding-bottom:5px;">${i}</td>\n        </tr>`,r.style.display="table-row"}handleExtEvents(t){if(void 0!==t.eventData&&void 0!==t.eventData.residueNumber){let e={start:t.eventData.residueNumber,end:t.eventData.residueNumber,highlight:!0};this.resetZoom(e)}}bindTrackData(t,e,i){let r=".pvTrack";"subtrack"==t&&(r=".pvSubtrack_"+e);let n=this.ctx.querySelectorAll(r);n&&n.length>0&&n.forEach((r,n)=>{let a=this.ctx.viewerData.tracks[n],s=".pvTrackLabel_"+n;"subtrack"==t&&(s=".pvSubtrackLabel_"+e+"_"+n,a=this.ctx.viewerData.tracks[e].data[n]);let o=this.getLabel(a.labelType,a.label);"Secondary structure variation"===o&&(o+='<a href="https://github.com/PDBe-KB/pdbe-kb-manual/wiki/Secondary-structure-variance" target="_blank" style="border-bottom: none;margin-left:5px;box-shadow:none;" title="Documentation link">\n                <i class="icon icon-generic" data-icon="x"></i>\n              </a>'),this.ctx.querySelectorAll(s)[0].innerHTML=o;let l="",c=a.data;"subtrack"==t&&(c=[a],l="transform:translate(0px,-5px)"),r.data=c,"subtrack"==t&&this.ctx.viewerData.tracks[e].data.length>4?r.parentNode.style.paddingRight="0px":r.parentNode.style.paddingRight=i+"px","track"==t&&0==n&&(this.ctx.querySelectorAll(".pvTracks_0")[0].classList.add("expanded"),this.ctx.querySelectorAll(".pvTracks_0")[0].querySelectorAll(".pvTrack")[0].style.display="none",this.ctx.querySelectorAll(".pvSubtracks_0")[0].style.display="block",this.bindTrackData("subtrack",0,i),this.ctx.formattedSubTracks.push(n))})}getLabel(t,e){if("pdbIcons"!==t)return e;{let t={experiments:{class:"icon icon-generic",dataIcon:";"},complex:{class:"icon icon-conceptual",dataIcon:"y"},nucleicAcids:{class:"icon icon-conceptual",dataIcon:"d"},ligands:{class:"icon icon-conceptual",dataIcon:"b"},literature:{class:"icon icon-generic",dataIcon:"P"}},i=[];return i.push('<span style="display:inline-block;min-width:38px;"><strong><a class="pdbIconsId" href="'+e.url+'" target="_blank">'+e.id+'</a></strong></span><span class="pdbIconsWrapper">'),e.icons.forEach(e=>{let r="";e.type;let n='<span class="pdbIconslogo" style="background-color:'+e.background+'" title="'+e.tooltipContent+'" ><i class="'+t[e.type].class+'" data-icon="'+t[e.type].dataIcon+'" style="color: #fff;"></i></span>';void 0!==e.url&&""!=e.url&&(n='<a class="pdbIconslogoA" href="'+e.url+'" target="_blank">'+n+"</a>"),i.push(n)}),e.resolution&&i.push('<strong style="color:#555">'+e.resolution+"&Aring;</strong></span>"),i.join(" ")}}resetSection(t){this.ctx.querySelector(".pvResetSection_"+t).style.display="none",this.ctx.hiddenSubtracks[t].forEach(e=>{this.ctx.querySelector(`.pvSubtrackRow_${t}_${e}`).style.display="table"}),delete this.ctx.hiddenSubtracks[t]}hideSection(t){let e=this.ctx.viewerData.tracks.length,i=[];t<e?i.push(".pvTracks_"+t,".pvSubtracks_"+t):t==e?i.push(".pvConsHistoRow",".pvConservationPlotRow"):i.push(".pvVariantGraphRow",".pvVariantPlotRow");for(let t of i){let e=this.ctx.querySelector(t);e&&(e.style.display="none")}this.ctx.hiddenSections.push(t)}showSection(t){let e=this.ctx.viewerData.tracks.length;if(t<e){let e=this.ctx.querySelector(".pvTracks_"+t);if(e.style.display="table",e.classList.contains("expanded")){let e=this.ctx.querySelector(".pvSubtracks_"+t);e.style.display="block",void 0!==this.ctx.hiddenSubtracks[t]&&this.ctx.hiddenSubtracks[t].length==e.children.length&&this.resetSection(t)}}else if(t==e){let t=this.ctx.querySelector(".pvConsHistoRow");if(t&&(t.style.display="table"),t.classList.contains("expanded")){let t=this.ctx.querySelector(".pvConservationPlotRow");t&&(t.style.display="block")}}else{let t=this.ctx.querySelector(".pvVariantGraphRow");if(t&&(t.style.display="table"),t.classList.contains("expanded")){let t=this.ctx.querySelector(".pvVariantPlotRow");t&&(t.style.display="block")}}this.ctx.hiddenSections.splice(this.ctx.hiddenSections.indexOf(t),1)}hideSubTrack(t,e){void 0===this.ctx.hiddenSubtracks[t]?this.ctx.hiddenSubtracks[t]=[e]:this.ctx.hiddenSubtracks[t].push(e),this.ctx.querySelector(`.pvSubtrackRow_${t}_${e}`).style.display="none",this.ctx.querySelector(".pvResetSection_"+t).style.display="inline-block",this.ctx.hiddenSubtracks[t].length==this.ctx.viewerData.tracks[t].data.length&&this.hideSection(t)}resetZoom(t){let e=null,i=null,r=this.ctx.querySelectorAll(".pvTrack")[0];if(r){if(void 0===t)e=r.getAttribute("displaystart"),i=r.getAttribute("displayend");else if(void 0!==t.trackData){if(t.trackData.start&&t.trackData.end)e=t.trackData.start,i=t.trackData.end;else if(t.trackData.locations&&t.trackData.locations.length>0){e=t.trackData.locations[0].fragments[0].start;let r=t.trackData.locations.length-1,n=t.trackData.locations[r].fragments.length-1;i=t.trackData.locations[r].fragments[n].end}}else e=t.start,i=t.end;t&&null==t.start&&null==t.end||(null==e&&(e="1"),null==i&&(i=this.ctx.viewerData.length)),void 0!==t&&void 0!==t.highlight&&t.highlight?r.dispatchEvent(new CustomEvent("change",{detail:{highlightstart:e,highlightend:i},bubbles:!0,cancelable:!0})):(r.dispatchEvent(new CustomEvent("change",{detail:{displaystart:e,displayend:i},bubbles:!0,cancelable:!0})),r.dispatchEvent(new CustomEvent("change",{detail:{highlightstart:null,highlightend:null},bubbles:!0,cancelable:!0})))}}zoomTrack(t,e){if(""!=this.ctx.zoomedTrack){this.ctx.querySelector(".pvZoomIcon_"+this.ctx.zoomedTrack).classList.remove("active")}if(this.ctx.zoomedTrack!=e){this.ctx.querySelector(".pvZoomIcon_"+e).classList.add("active"),this.ctx.zoomedTrack=e,this.resetZoom(t)}else this.ctx.zoomedTrack="",this.resetZoom({start:1,end:null})}resetView(){if(this.ctx.querySelector(".settingsMenu").style.display="none",this.ctx.querySelector(".rangeMenu").style.display="none",""!=this.ctx.zoomedTrack){this.ctx.querySelector(".pvZoomIcon_"+this.ctx.zoomedTrack).classList.remove("active")}this.ctx.zoomedTrack="",this.resetZoom({start:1,end:null}),this.ctx.querySelectorAll(".expanded").forEach(t=>{t.classList.remove("expanded");let e=t.querySelector(".pvTrack");e&&(e.style.display="block")});let t=this.ctx.querySelector(".pvTracks_0");t.style.display="table",t.classList.contains("expanded")||t.classList.add("expanded"),t.querySelector(".pvTrack").style.display="none",this.ctx.querySelectorAll(".protvistaRowGroup").forEach((t,e)=>{t.style.display="none",void 0!==this.ctx.hiddenSubtracks[e]&&this.resetSection(e)}),this.ctx.querySelector(".pvSubtracks_0").style.display="block",this.ctx.querySelector(".pvResetSection_0").style.display="none";let e=this.ctx.querySelector(".pvVariantPlotRow");e&&(e.style.display="none");let i=this.ctx.querySelector(".pvConservationPlotRow");if(i&&(i.style.display="none"),this.ctx.hiddenSections.length>0){let t=this.ctx.viewerData.tracks.length;this.ctx.hiddenSections.forEach(e=>{if(e>0&&e<t){let t=this.ctx.querySelector(".pvTracks_"+e);t.style.display="table",t.classList.contains("expanded")&&t.classList.remove("expanded"),t.querySelector(".pvTrack").style.display="block"}else if(e>=t)if(e==t){let t=this.ctx.querySelector(".pvConsHistoRow");t&&(t.style.display="table"),t.classList.contains("expanded")&&t.classList.remove("expanded");let e=this.ctx.querySelector(".pvConservationPlotRow");e&&(e.style.display="none")}else{let t=this.ctx.querySelector(".pvVariantGraphRow");t&&(t.style.display="table"),t.classList.contains("expanded")&&t.classList.remove("expanded");let e=this.ctx.querySelector(".pvVariantPlotRow");e&&(e.style.display="none")}})}this.ctx.hiddenSections=[],this.ctx.hiddenSubtracks=Object.assign({},{})}openRangeMenu(){this.ctx.querySelector(".settingsMenu").style.display="none";let t=this.ctx.querySelector(".rangeMenu");if("none"==t.style.display){let e=this.ctx.querySelector(".pvRangeMenuStart"),i=this.ctx.querySelector(".pvRangeMenuEnd");if(0==e.value||0==i.value){let t=1,r=this.ctx.viewerData.length,n=this.ctx.querySelectorAll(".pvTrack")[0];n&&(t=n.getAttribute("displaystart"),r=n.getAttribute("displayend")),e.value=Math.round(t),i.value=Math.round(r)}t.style.display="block"}else t.style.display="none"}openCategorySettingsMenu(){this.ctx.querySelector(".rangeMenu").style.display="none";let t=this.ctx.querySelector(".settingsMenu");"none"==t.style.display?(t.querySelectorAll(".pvSectionChkBox").forEach((t,e)=>{this.ctx.hiddenSections.indexOf(e)>-1?t.checked=!0:t.checked=!1}),t.style.display="block"):t.style.display="none"}pvRangeMenuSubmit(){let t=this.ctx.querySelector(".pvRangeMenuStart").value,e=this.ctx.querySelector(".pvRangeMenuEnd").value;if(""!=t&&""!=e&&(t=parseFloat(t),e=parseFloat(e),e>=t)){e>this.ctx.viewerData.length&&(e=this.ctx.viewerData.length);let i={start:Math.round(t),end:Math.round(e)};this.ctx.querySelector(".pvRangeMenuHighlight").checked&&(i.highlight=!0),this.resetZoom(i),this.openRangeMenu()}}pvCategorySettingsMenuSubmit(){this.ctx.querySelectorAll(".pvSectionChkBox").forEach((t,e)=>{t.checked?-1==this.ctx.hiddenSections.indexOf(e)&&this.hideSection(e):this.ctx.hiddenSections.indexOf(e)>-1&&this.showSection(e)}),this.openCategorySettingsMenu()}showLabelTooltip(t){let e=t.currentTarget.lastElementChild;if(!e||"labelTooltipContent"!=e.className)return;let i=e.innerText,r=this.ctx.querySelector(".labelTooltipBox");r.innerHTML=i;let n=t.currentTarget.getBoundingClientRect();r.style.left=n.x+n.width+5+"px",r.style.top=n.y+10+"px",r.style.display="block"}hideLabelTooltip(){this.ctx.querySelector(".labelTooltipBox").style.display="none"}showVariantPlot(){let t=this.ctx.querySelector(".pvVariantPlotRow");"none"==t.style.display?(t.style.display="block",t.previousElementSibling.classList.add("expanded")):(t.style.display="none",t.previousElementSibling.classList.remove("expanded"))}showConservationPlot(){let t=this.ctx.querySelector(".pvConservationPlotRow");"none"==t.style.display?(t.style.display="block",t.previousElementSibling.classList.add("expanded")):(t.style.display="none",t.previousElementSibling.classList.remove("expanded"))}filterSc(t){this.ctx.querySelector(".pvConservationPlotSection").firstElementChild.setAttribute("sc-display-order",t)}getMSADownloadUrl(){return this.ctx._accession?"https://www.ebi.ac.uk/pdbe/static/alignments/"+this.ctx._accession+".sto.gz":""}addEventSubscription(){document.addEventListener("PDB.topologyViewer.click",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.topologyViewer.mouseover",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.topologyViewer.mouseout",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.litemol.click",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.litemol.mouseover",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.molstar.click",t=>{this.handleExtEvents(t)}),document.addEventListener("PDB.molstar.mouseover",t=>{this.handleExtEvents(t)})}removeEventSubscription(){this.ctx.subscribeEvents&&(document.removeEventListener("PDB.topologyViewer.click"),document.removeEventListener("PDB.topologyViewer.mouseover"),document.removeEventListener("PDB.topologyViewer.mouseout"),document.removeEventListener("PDB.litemol.click"),document.removeEventListener("PDB.litemol.mouseover"),document.removeEventListener("PDB.molstar.click"),document.removeEventListener("PDB.molstar.mouseover"))}};class sa extends HTMLElement{constructor(){super(),this.viewerData={displayNavigation:!0,displaySequence:!0,displayConservation:!1,displayVariants:!1,sequence:void 0,length:void 0,tracks:[],legends:{alignment:"right",data:{}}},this.layoutHelper=new aa(this)}set viewerdata(t){t&&(this.displayLoadingMessage(),this.viewerData=t,this.viewerData.displayNavigation=void 0===t.displayNavigation||t.displayNavigation,this.viewerData.displaySequence=void 0===t.displaySequence||t.displaySequence,void 0!==this.viewerData.sequenceConservation&&(this.viewerData.displayConservation=!0),void 0!==this.viewerData.variants&&(this.viewerData.displayVariants=!0),this._render())}async connectedCallback(){this._accession=this.getAttribute("accession"),this._entityId=this.getAttribute("entity-id"),this._entryId=this.getAttribute("entry-id"),this.customData=this.getAttribute("custom-data"),this.pageSection=this.getAttribute("page-section");let t=this.getAttribute("env");this.subscribeEvents="false"!==this.getAttribute("subscribe-events"),this.showLegends="false"!==this.getAttribute("legends"),this.hiddenSubtracks={},this.hiddenSections=[],this.scrollbarWidth=0,this.formattedSubTracks=[],this.zoomedTrack="",this.variantFilterAttr=JSON.stringify(Fn),this.displayLoadingMessage(),this.dataHelper=new na(t,this._accession,this._entryId,this._entityId,this.pageSection),void 0!==this.customData&&null!==this.customData||(this.viewerData=await this.dataHelper.processMutlplePDBeApiData(),this.viewerData.displayConservation=!this.pageSection||"2"!=this.pageSection,this.viewerData.displayVariants=!this.pageSection||"2"!=this.pageSection,this._render())}_render(){if(!this.viewerData.length||0==this.viewerData.tracks.length)return void this.displayErrorMessage();this.showLegends||delete this.viewerData.legends;Object(b.render)((()=>b.html`
        <div class="protvista-pdb">
            <span class="labelTooltipBox" style="display:none"></span>
            <protvista-manager attributes="length displaystart displayend highlightstart highlightend activefilters filters">
                
                <!-- Navigation section -->
                ${this.viewerData.displayNavigation?b.html`${Wn(this)}`:""}
                
                <!-- Sequence section -->
                ${this.viewerData.displaySequence?b.html`${Zn(this)}`:""}
                
                <!-- Tracks section -->
                ${Kn(this)}
                
                <!-- Sequence conservation section -->
                ${this.viewerData.displayConservation?b.html`${Qn(this)}`:""}
                
                <!-- Variations section -->
                ${this.viewerData.displayVariants?b.html`${ea(this)}`:""}
                
                <!-- Legends section -->
                ${this.viewerData.legends?b.html`${ra(this)}`:""}

            </protvista-manager>
        </div>

        <!-- div to measure scrollbar width for padding -->
        <div class="divWithScroll">
            <div style="height: 60px;width:80%"></div>
        </div>
        <div class="divWithoutScroll">&nbsp;</div>`)(),this),this.layoutHelper.postProcessLayout()}displayLoadingMessage(){Object(b.render)(b.html`<div class="protvista-pdb" style="text-align:center;">Loading Protvista...</div>`,this)}displayErrorMessage(){Object(b.render)("",this)}disconnectedCallback(){this.layoutHelper.removeEventSubscription()}}var oa=sa;const la=function(t,e){customElements.get(t)||customElements.define(t,e)},ca=function(){la("protvista-manager",a),la("protvista-sequence",v),la("protvista-filter",Li),la("protvista-pdb-navigation",Ni),la("protvista-pdb-track",mr),la("protvista-pdb-sc-histogram",_r),la("protvista-pdb-seq-consevation",xr),la("protvista-pdb-variation-graph",wr),la("protvista-pdb-variation",Nn),la("protvista-tooltip",zn),la("protvista-pdb",oa)};window.customElements?ca():document.addEventListener("WebComponentsReady",(function(){ca()}))}]);
//# sourceMappingURL=protvista-pdb-3.3.1.js.map