!function(ae,le,e){"use strict";var ce=function(n,r,o){var i;return function(){if(i){if(!o)return;clearTimeout(i)}var e=this,t=arguments;i=setTimeout(function(){i=null,n.apply(e,t)},r)}},ue=function(e,t,n,r){e.addEventListener(t,n,!!r)},se=function(e,t,n,r){e.removeEventListener(t,n,!!r)},fe=function(e){e.preventDefault(),e.stopPropagation()},pe=function(e,t,n){for(var r=n?t.parentNode:t;r;){if(r===e)return!0;r=r.parentNode}return!1},de=function(e){var t=e.nodeName;return"IMG"==t||"PICTURE"==t||"SVG"==t||"VIDEO"==t||"AUDIO"==t||"IFRAME"==t||"MAP"==t||"OBJECT"==t||"EMBED"==t},he=function(e){var t=ae.getSelection();return 0<t.rangeCount?t.getRangeAt(0):null},Ae=function(e,t){if(t){var n=ae.getSelection();n.removeAllRanges(),n.addRange(t)}},ge=function(e){return!!ae.getSelection().isCollapsed},ve=function(){var e=ae.getSelection();if(!e.isCollapsed)try{e.collapseToEnd()}catch(e){}},me=function(e,t){var n=ae.getSelection();if(pe(e,n.anchorNode)&&pe(e,n.focusNode))return!0;if(!t)return!1;var r=le.createRange();return r.selectNodeContents(e),r.collapse(!1),n.removeAllRanges(),n.addRange(r),!0},t=function(e,t){var f,n=t.toolbar,r=t.buttons,u=t.selectionbuttons,l=t.suggester,c=t.interceptenter,o=!!t.hijackmenu,p="string"==typeof e?le.querySelector(e):e,i=p.querySelector("textarea"),s={},d="top"==n,a="bottom"==n,h="demand"==n,A=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},g=function(e,t){e.classList&&e.classList.remove(t)},v=p.querySelector("[contenteditable=true]");if(!v){(v=le.createElement("div")).setAttribute("contentEditable","true");var m=i.placeholder;m&&v.setAttribute("data-placeholder",m),p.insertBefore(v,p.firstChild)}var E=null,b=function(){E&&clearTimeout(E),E=null,A(p,"focus"),h&&A(p,"focused")},w=function(){E||le.activeElement==v||(E=setTimeout(function(){E=null,g(p,"focus")},50))};ue(v,"focus",b),ue(v,"blur",w),i&&i.form&&ue(i.form,"reset",w);var C=function(e,o){var i=le.createElement("input");i.placeholder="www.example.com",o&&(i.value=o.href),i.autofocus=!0,o&&ue(i,"input",function(e){var t=i.value.trim();t&&(o.href=t)}),ue(i,"keydown",function(e){if("Enter"==("key"in e?e.key:13==(e.which||e.keyCode)?"Enter":"")){var t=i.value.trim();if(o);else if(t){var n=t;if(/^[a-z0-9]+:\/\//.test(t)||(n="http://"+t),f.getSelectedHTML())f.insertLink(n);else{var r=function(e){return e.replace(/[&<>"]/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]||e})};f.insertHTML('<a href="'+r(n)+'">'+r(t)+"</a>")}}f.closePopup().collapseSelection(),v.focus()}}),A(e,"hyperlink"),e.appendChild(i),ae.setTimeout(function(){i.focus(),b()},1)},B=function(e,n){var t=function(e,t,n){var r,o,i,a,l,c,u,s;switch(c=n*(1-t),u=n*(1-(l=6*e-(a=Math.floor(6*e)))*t),s=n*(1-(1-l)*t),a%6){case 0:r=n,o=s,i=c;break;case 1:r=u,o=n,i=c;break;case 2:r=c,o=n,i=s;break;case 3:r=c,o=u,i=n;break;case 4:r=s,o=c,i=n;break;case 5:r=n,o=c,i=u}var f=Math.floor(255*r).toString(16),p=Math.floor(255*o).toString(16),d=Math.floor(255*i).toString(16);return"#"+(f.length<2?"0":"")+f+(p.length<2?"0":"")+p+(d.length<2?"0":"")+d},r=le.createElement("table");r.style.borderCollapse="collapse";for(var o=1;o<15;++o){for(var i=le.createElement("tr"),a=0;a<25;++a){var l;if(24==a){var c=Math.floor(255/13*(14-o)).toString(16),u=(c.length<2?"0":"")+c;l="#"+u+u+u}else{l=t(a/24,o<=8?o/8:1,8<o?(16-o)/8:1)}var s=le.createElement("td");s.style.backgroundColor=l,s.title=l,ue(s,"click",function(e){var t=this.title;n?f.forecolor(t).closePopup().collapseSelection():f.highlight(t).closePopup().collapseSelection(),fe(e)}),i.appendChild(s)}r.appendChild(i)}A(e,"palette"),e.appendChild(r)},k=function(t,l){if(67108864<t.size)l();else{var n=le.createElement("img");n.onload=function(){if(2==n.width&&3==n.height)return(e=new FileReader).onload=function(e){l(t.type,e.target.result)},e.onerror=function(e){l()},void e.readAsDataURL(t);var e,s=function(a){var e=new FileReader;e.onload=function(e){if(!a||1==a||8<a)return l(t.type,e.target.result);var i=new Image;i.onload=function(){var e=i.naturalWidth||i.width,t=i.naturalHeight||i.height,n=le.createElement("canvas"),r=n.getContext("2d");switch(n.width=4<a?t:e,n.height=4<a?e:t,a){case 2:r.transform(-1,0,0,1,e,0);break;case 3:r.transform(-1,0,0,-1,e,t);break;case 4:r.transform(1,0,0,-1,0,t);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,t,0);break;case 7:r.transform(0,-1,-1,0,t,e);break;case 8:r.transform(0,-1,1,0,0,e)}r.drawImage(i,0,0,e,t);var o=n.toDataURL("image/jpeg",.99);l("image/jpeg",o)},i.src=e.target.result},e.onerror=function(e){l()},e.readAsDataURL(t)};if(!ae.DataView)return s();(e=new FileReader).onload=function(e){var t=e.target.result,n=new DataView(t);if(65496!=n.getUint16(0,!1))return s();for(var r=n.byteLength,o=2;o<r;){if(n.getUint16(o+2,!1)<=8)return s();var i=n.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=n.getUint32(o+=2,!1))return s();var a=18761==n.getUint16(o+=6,!1);o+=n.getUint32(o+4,a);var l=n.getUint16(o,a);o+=2;for(var c=0;c<l;++c)if(274==n.getUint16(o+12*c,a)){var u=n.getUint16(o+12*c+8,a);return s(u)}}else{if(65280!=(65280&i))break;o+=n.getUint16(o,!1)}}return s()},e.onerror=function(e){l()},e.readAsArrayBuffer(t)},n.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k="}};function S(r,o){for(var i=[],a=0,e=0;e<r.length;++e)!function(n){k(r[n],function(e,t){for(i[n]=function(){t&&o(e,t)};a in i;)i[a](),a++;a==r.length&&(i=null)})}(e)}var y,L=function(e,t,n){for(var r=p,o=r.offsetParent;r;){if("static"!=getComputedStyle(r).position)break;t+=r.offsetLeft,n+=r.offsetTop,r=(o=r).offsetParent}o.appendChild(e);var i=o.getBoundingClientRect(),a=le.documentElement,l=Math.min(ae.innerWidth,Math.max(a.offsetWidth,a.scrollWidth)),c=ae.innerHeight,u=e.offsetWidth,s=e.offsetHeight;i.left+t<1?t=1-i.left:i.left+t+u>l-1&&(t=Math.max(1-i.left,l-1-i.left-u)),i.top+n<1?n=1-i.top:i.top+n+s>c-1&&(n=Math.max(1-i.top,c-1-i.top-s)),e.style.left=parseInt(t)+"px",e.style.top=parseInt(n)+"px"},Q=null,R=function(e,t,n,r){var o=f.activePopup();for(o&&Q===t?(g(o,"animate-down"),g(o,"animate-up")):(o=f.openPopup(),A(o,"wysiwyg-popup"),A(o,e?"animate-down":"animate-up"),Q=t);o.firstChild;)o.removeChild(o.firstChild);return n(o,r),o},M=function(e,t,n,r){var o=R(!!d,t,n,r),i=p.getBoundingClientRect(),a=e.getBoundingClientRect(),l=a.left-i.left+parseInt(e.offsetWidth/2)-parseInt(o.offsetWidth/2),c=a.top-i.top;d?c+=e.offsetHeight:c-=o.offsetHeight,L(o,l,c)},T=function(e,t){var n=p.getBoundingClientRect(),r=v.getBoundingClientRect(),o=t.left+parseInt(t.width/2)-parseInt(e.offsetWidth/2)+r.left-n.left,i=t.top+t.height+r.top-n.top;L(e,o,i)},H=function(e,t,n,r){var o=R(!0,t,n,r);T(o,e)},P=null,D=null,N=function(o,i,e,c){e.forEach(function(a){if(a instanceof HTMLElement)return o.appendChild(a),ue(a,"focus",b),void ue(a,"blur",w);var l=le.createElement("button");if(A(l,"btn"),"icon"in a){var e=le.implementation.createHTMLDocument("");e.body.innerHTML=a.icon;for(var t=e.body.firstChild;null!==t;t=t.nextSibling)l.appendChild(t)}if("attr"in a)for(var n in a.attr)l.setAttribute(n,a.attr[n]);ue(l,"focus",b),ue(l,"blur",w);var r=null;"click"in a?r=function(){a.click(f,l)}:"popup"in a?r=function(){var e=function(e){a.popup(f,e,l)};i?H(i,e.toString(),e):M(l,e.toString(),e)}:"browse"in a||"dataurl"in a?r=function(){f.closePopup().collapseSelection();var o=le.createElement("input");o.type="file",o.multiple=!0,o.style.display="none",ue(o,"change",function(e){var t="dataurl"in a;if(e.target.files)if("browse"in a)for(var n=i.target.files,r=0;r<n.length;++r)a.browse(f,o,n[r],l);else S(i.target.files,function(e,t){a.dataurl(f,e,t,l)});else t=!0;t&&o.parentNode.removeChild(o),fe(e)}),p.appendChild(o);var i=le.createEvent("MouseEvents");i.initEvent("click",!0,!1),o.dispatchEvent(i)}:"action"in a&&(r=function(){switch(a.action){case"link":i?H(i,"link",C,D):M(l,"link",C,D);break;case"bold":f.bold().closePopup().collapseSelection();break;case"italic":f.italic().closePopup().collapseSelection();break;case"underline":f.underline().closePopup().collapseSelection();break;case"strikethrough":f.strikethrough().closePopup().collapseSelection();break;case"colortext":i?H(i,"colortext",B,!0):M(l,"colortext",B,!0);break;case"colorfill":i?H(i,"colorfill",B,!1):M(l,"colorfill",B,!1);break;case"subscript":f.subscript().closePopup().collapseSelection();break;case"superscript":f.superscript().closePopup().collapseSelection();break;case"orderedlist":f.orderedList().closePopup().collapseSelection();break;case"unorderedlist":f.unorderedList().closePopup().collapseSelection();break;case"clearformat":f.removeFormat().closePopup().collapseSelection()}}),l.onclick=function(e){r&&r(),fe(e)},o.appendChild(l),"hotkey"in a&&r&&c&&(c[a.hotkey.toLowerCase()]=r)})},I=null,x=1,U=null,O=function(e){e&&f.expandSelection(I.length,0).insertHTML(e),U=I=null,x+=1,f.closePopup()},F=ce(function(){if(I){var t=x;l(I,function(e){P&&t==x&&(U=null,e?H(P,"suggestion",function(n){e.forEach(function(t){var e=le.createElement("div");A(e,"suggestion"),e.innerHTML=t.label,ue(e,"click",function(e){O(t.insert),fe(e)}),n.appendChild(e),null===U&&(U=t.insert)})}):O())})||O()}},100,!0),W=function(e,n,t,r){if(P=e?n||P:null,D=null,n)if(e&&null!==I){var o=f.activePopup();o&&(g(o,"animate-down"),g(o,"animate-up"),T(o,n))}else{for(var i=0;i<t.length;++i){var a=t[i],l=a.closest||function(e){for(var t=this;t;){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;if(n&&n.call(t,e))return t;t=t.parentElement}return null};if(D=l.call(a,"a"))break}var c=!0;r||(u?e?c=!1:t.forEach(function(e){de(e)&&(c=!1)}):c=!1),c?H(n,"selection",function(e){var t=le.createElement("div");A(t,"toolbar"),e.appendChild(t),N(t,n,u)}):O()}else O()},X=function(){b()},j=function(){O(),w()},z=null,_=null;if(i){!v.innerHTML&&i.value&&(v.innerHTML=i.value);var q=v.innerHTML;if(z=function(){var e=v.innerHTML;e.match(/^<br[/ ]*>$/i)&&(e=v.innerHTML=""),e!=q&&(i.value=e,q=e)},ue(v,"focus",function(){var e=le.createEvent("Event");e.initEvent("focus",!1,!1),i.dispatchEvent(e)}),ue(v,"blur",function(){z();var e=le.createEvent("Event");e.initEvent("blur",!1,!1),i.dispatchEvent(e)}),_=ce(z,250,!0),ue(v,"input",_),ue(v,"propertychange",_),ue(v,"textInput",_),ue(v,"paste",_),ue(v,"cut",_),ue(v,"drop",_),ae.MutationObserver)new MutationObserver(_).observe(v,{attributes:!0,childList:!0,characterData:!0,subtree:!0});var K=i.form;K&&ue(K,"reset",function(){v.innerHTML="",_(),y(!0),g(p,"focused")})}var V=null,Y=null;Y=ce(function(e,t,n){var r=ge(),o=function(e){var t=ae.getSelection();if(!t.rangeCount)return[];for(var n=[],r=0;r<t.rangeCount;++r)for(var o=(c=t.getRangeAt(r)).startContainer,i=c.endContainer;o;){if(o!=e){var a=!1;if(t.containsNode)a=t.containsNode(o,!0);else{var l=le.createRange();for(l.selectNodeContents(o),r=0;r<t.rangeCount;++r){var c;if(0<=(c=t.getRangeAt(r)).compareBoundaryPoints(c.END_TO_START,l)&&c.compareBoundaryPoints(c.START_TO_END,l)<=0){a=!0;break}}}a&&n.push(o)}o=function(e,t){if(e.firstChild)return e.firstChild;for(;e;){if(e==t)return null;if(e.nextSibling)return e.nextSibling;e=e.parentNode}return null}(o,o==i?i:e)}return 0==n.length&&pe(e,t.focusNode)&&t.focusNode!=e&&n.push(t.focusNode),n}(v),i=null===e||null===t?null:{left:e,top:t,width:0,height:0},a=function(){var e=ae.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).cloneRange();if((o=t.getBoundingClientRect())&&o.left&&o.top&&o.right&&o.bottom)return{left:parseInt(o.left),top:parseInt(o.top),width:parseInt(o.right-o.left),height:parseInt(o.bottom-o.top)};for(var n=t.getClientRects?t.getClientRects():[],r=0;r<n.length;++r){var o;if((o=n[r]).left&&o.top&&o.right&&o.bottom)return{left:parseInt(o.left),top:parseInt(o.top),width:parseInt(o.right-o.left),height:parseInt(o.bottom-o.top)}}return!1}();if(a&&(i=a),i){var l=v.getBoundingClientRect();i.left-=parseInt(l.left),i.top-=parseInt(l.top),i.left<0&&(i.left=0),i.top<0&&(i.top=0),i.width>v.offsetWidth&&(i.width=v.offsetWidth),i.height>v.offsetHeight&&(i.height=v.offsetHeight)}else if(o.length)for(var c=0;c<o.length;++c){var u=o[c];if(u.nodeType==Node.ELEMENT_NODE){i={left:u.offsetLeft,top:u.offsetTop,width:u.offsetWidth,height:u.offsetHeight};break}}W(r,i,o,n)},1);var G=null,Z=function(e){var t=e.target||e.srcElement;t.nodeType==Node.TEXT_NODE&&(t=t.parentNode),pe(G,t)||J()},J=function(){G&&(G.parentNode.removeChild(G),se(ae,"mousedown",Z,!(G=null)),j())};function $(e){if("key"in e){var t=e.key;switch(t){case"Spacebar":return" ";case"Left":return"ArrowLeft";case"Up":return"ArrowUp";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Esc":return"Escape"}return t}switch(e.which||e.keyCode){case 8:return"Backspace";case 13:return"Enter";case 27:return"Escape";case 33:return"PageUp";case 34:return"PageDown";case 35:return"End";case 36:return"Home";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown"}return String.fromCharCode(e.which||e.keyCode||e.charCode)}ue(v,"keydown",function(e){var t=$(e),n=e.shiftKey||!1,r=e.altKey||!1,o=e.ctrlKey||!1,i=e.metaKey||!1;if(c&&"Enter"==t&&!n&&!r&&!o&&!i&&(f.sync(),c()))return f.closePopup(),void fe(e);if(1==t.length&&!n&&!r&&o&&!i){var a=t.toLowerCase();if(s[a])return s[a](),void fe(e)}!l||function(e){switch(e){case"Backspace":if(I&&(I=I.slice(0,-1)),!I)return O(),!0;break;case"Enter":if(U)return O(U),!1;case"Escape":case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":if(I)return O(),!0}return F(),!0}(t)?V&&(V=he()):fe(e)}),ue(v,"keypress",function(e){var t,n=$(e);if(!l||(1==(t=n).length&&(I||(I=""),I+=t),F(),1)){if(V&&(V=he()),Y&&Y(null,null,!1),_)switch(n){case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":break;default:_()}}else fe(e)}),ue(v,"keyup",function(e){V&&(V=he()),Y&&Y(null,null,!1)});var ee=function(e,t){var n=null,r=null;e.clientX&&e.clientY?(n=e.clientX,r=e.clientY):e.pageX&&e.pageY&&(n=e.pageX-ae.pageXOffset,r=e.pageY-ae.pageYOffset),e.which&&3==e.which?t=!0:e.button&&2==e.button&&(t=!0),se(ae,"mouseup",ee),V&&(V=he()),!o&&t||Y&&Y(n,r,t)},te=null;ue(v,"mousedown",function(e){se(ae,"mouseup",ee),ue(ae,"mouseup",ee),te=e.target}),ue(v,"mouseup",function(e){var t=e.target;if(t&&t.nodeType==Node.ELEMENT_NODE&&t===te&&de(t)&&pe(v,t,!0)){var n=ae.getSelection(),r=le.createRange();r.setStartBefore(t),r.setEndAfter(t),n.removeAllRanges(),n.addRange(r)}ee(e),_&&_()}),ue(v,"dblclick",function(e){ee(e)}),ue(v,"selectionchange",function(e){ee(e)}),o&&ue(v,"contextmenu",function(e){ee(e,!0),fe(e)});var ne=function(e,t,n){if(Ae(0,V),v.focus(),!me(v,n))return!1;try{return!(le.queryCommandSupported&&!le.queryCommandSupported(e))&&le.execCommand(e,!1,t)}catch(e){}return!1};function re(e){if(!e)return!1;var t=[];if(e.items)for(var n=e.items,r=0;r<n.length;++r){var o=n[r];if(o.type.match(/^image\//)){var i=o.getAsFile();t.push(i)}}else if(e.files){var a=e.files;for(r=0;r<a.length;++r)t.push(a[r])}return!!t.length&&(S(t,function(e,t){ne("insertImage",t)}),!0)}if(ue(v,"paste",function(e){re(e.clipboardData)&&fe(e)}),ue(v,"drop",function(e){re(e.dataTransfer)&&fe(e)}),y=function(e){_&&_(),e?(ve(),V=null):V&&(V=he())},f={sync:function(){return z&&z(),this},getHTML:function(){return v.innerHTML},setHTML:function(e){return v.innerHTML=e||"",y(!0),this},getSelectedHTML:function(){return Ae(0,V),me(v)?function(e){if(ge())return null;var t=ae.getSelection();if(t.rangeCount){for(var n=le.createElement("div"),r=t.rangeCount,o=0;o<r;++o){var i=t.getRangeAt(o).cloneContents();n.appendChild(i)}return n.innerHTML}return null}():null},collapseSelection:function(){return ve(),V=null,this},expandSelection:function(e,t){return Ae(0,V),me(v)&&(function(e,t,n){var r=ae.getSelection();if(r.modify){for(var o=0;o<t;++o)r.modify("extend","backward","character");for(o=0;o<n;++o)r.modify("extend","forward","character")}else{var i=r.getRangeAt(0);i.setStart(i.startContainer,i.startOffset-t),i.setEnd(i.endContainer,i.endOffset+n),r.removeAllRanges(),r.addRange(i)}}(0,e,t),V=he()),this},openPopup:function(){return V||(V=he()),function(){if(G)return G;ue(ae,"mousedown",Z,!0),G=le.createElement("DIV");var e=v.parentNode,t=v.nextSibling;return t?e.insertBefore(G,t):e.appendChild(G),X(),G}()},activePopup:function(){return G},closePopup:function(){return J(),this},removeFormat:function(){return ne("removeFormat"),ne("unlink"),y(),this},bold:function(){return ne("bold"),y(),this},italic:function(){return ne("italic"),y(),this},underline:function(){return ne("underline"),y(),this},strikethrough:function(){return ne("strikeThrough"),y(),this},forecolor:function(e){return ne("foreColor",e),y(),this},highlight:function(e){return ne("hiliteColor",e)||ne("backColor",e),y(),this},fontName:function(e){return ne("fontName",e),y(),this},fontSize:function(e){return ne("fontSize",e),y(),this},subscript:function(){return ne("subscript"),y(),this},superscript:function(){return ne("superscript"),y(),this},insertLink:function(e){return ne("createLink",e),y(!0),this},insertImage:function(e){return ne("insertImage",e,!0),y(!0),this},insertHTML:function(e){return ne("insertHTML",e,!0)||(Ae(0,V),me(v,!0),function(e,t){var n=ae.getSelection();if(n.getRangeAt&&n.rangeCount){var r=n.getRangeAt(0),o=le.createElement("div");o.innerHTML=t;for(var i,a,l=le.createDocumentFragment();i=o.firstChild;)a=l.appendChild(i);pe(e,r.commonAncestorContainer)?(r.deleteContents(),r.insertNode(l)):e.appendChild(l),a&&((r=r.cloneRange()).setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r))}}(v,e)),y(!0),this},orderedList:function(){return ne("insertOrderedList"),y(),this},unorderedList:function(){return ne("insertUnorderedList"),y(),this}},r){var oe=le.createElement("div");if(A(oe,"toolbar"),d)A(oe,"toolbar-top"),p.insertBefore(oe,p.firstChild);else if(a)A(oe,"toolbar-bottom"),p.appendChild(oe);else{var ie=le.createElement("div");A(ie,"toolbar-auto"),p.appendChild(ie),ie.appendChild(oe)}N(oe,null,r,s)}return f};"undefined"!=typeof module&&void 0!==module.exports?module.exports=t:ae.wysiwyg=t}(window,document);
!function(e){"loading"!=document.readyState?e(window,document):document.addEventListener("DOMContentLoaded",(function(t){e(window,document)}))}((function(e,t){"use strict";var n={plural:function(e){return 1==e?"one":"other"},digits:null,"year-one":"{#} year ago","year-other":"{#} years ago","year+one":"in {#} year","year+other":"in {#} years","month-one":"{#} month ago","month-other":"{#} months ago","month+one":"in {#} month","month+other":"in {#} months","week-one":"{#} week ago","week-other":"{#} weeks ago","week+one":"in {#} week","week+other":"in {#} weeks","day-one":"{#} day ago","day-other":"{#} days ago","day+one":"in {#} day","day+other":"in {#} days","hour-one":"{#} hour ago","hour-other":"{#} hours ago","hour+one":"in {#} hour","hour+other":"in {#} hours","minute-one":"{#} minute ago","minute-other":"{#} minutes ago","minute+one":"in {#} minute","minute+other":"in {#} minutes","second-one":"{#} second ago","second-other":"{#} seconds ago","second+one":"in {#} second","second+other":"in {#} seconds"},i={image:"Insert image",attach:"Attach files",smileys:"Smilies",link:"Insert link",bold:"Bold",italic:"Italic",underline:"Underline",striketrough:"Strikethrough",textcolor:"Text color",backcolor:"Background color",clear:"Clear format"},a={submit:"Submit",placeholder:"Write message",videochat:"Video chat",groupchat:"Group conversation",groupjoin:"Invite user",groupleave:"Leave conversation",clear:"Delete conversation",enlarge:"Enlarge",close:"Close",description:"Description"},o=e.init||{},r=o.i18n||{},l=o.language||"",c=o.synchronizer||"",u=o.events||[],s=new Date,f=t.documentElement,h=t.body,d=e.navigator;function p(){for(var e=1;e<arguments.length;++e)for(var t in arguments[e])arguments[e].hasOwnProperty(t)&&(arguments[0][t]=arguments[e][t]);return arguments[0]}var v=p(n,r.datetime||{}),m=p(i,r.wysiwyg||{}),g=p(a,r.chat||{}),w=[];function y(e){if(null!==w){e&&w.push(e);var n=t.createElement("script");n.type="text/javascript",n.src="/static/player.tg.js",n.async=!0,n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,i())}:n.onload=i,t.head.appendChild(n)}else e();function i(){null!==w&&(w.forEach((function(e){e()})),w=null)}}function b(){if(e.performance){if(performance.now)return performance.now();if(performance.webkitNow)return performance.webkitNow();if(performance.mozNow)return performance.mozNow();if(performance.msNow)return performance.msNow()}return(new Date).getTime()}function x(t,n,i){var a=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(t){e.setTimeout((function(){t(b())}),1e3/60)};function o(e){return e<.5?function(e){return Math.pow(e,2)}(2*e)/2:function(e){return 1-Math.abs(Math.pow(e-1,2))}(2*e-1)/2+.5}var r=b();a((function e(l){var c=(l-r)/t;if(c>=1)i();else{var u=o(c);n(u),a(e)}}))}var k=0;function M(){return k+++";"+(new Date).getTime().toString(36)+";"+b().toString(36)+";"+Math.random().toString(36).substring(2)}var C={};function E(t,n){var i=null;if(e.WeakMap)C.has(t)&&(i=C.get(t));else{if(!("_id"in t))return null;i=C[t._id]}return i&&n in i?i[n]:null}function z(t,n,i){if(e.WeakMap)if(C.has(t))C.get(t)[n]=i;else{var a={};a[n]=i,C.set(t,a)}else"_id"in t||(t._id=M()),t._id in C||(C[t._id]={}),C[t._id][n]=i}function T(e,t,n){var i;return function(){if(i){if(!n)return;clearTimeout(i)}var a=this,o=arguments;i=setTimeout((function(){i=null,e.apply(a,o)}),t)}}function H(e,t,n,i){(Array.isArray(t)?t:[t]).forEach((function(t){e.addEventListener(t,n,!!i)}))}function S(e,t,n,i){(Array.isArray(t)?t:[t]).forEach((function(t){e.removeEventListener(t,n,!!i)}))}function A(e,n){var i;"function"==typeof Event?i=new Event(n,{bubbles:!1,cancelable:!0}):(i=t.createEvent("Event")).initEvent(n,!1,!0),e.dispatchEvent(i)}function B(e){e.stopPropagation(),e.preventDefault()}function L(e,t,n){var i=n?e.querySelector(n):e;i&&(i.classList?i.classList.add(t):i.setAttribute("class",t))}function I(e,t){return e.classList.contains(t)}function P(e,t){e.classList.remove(t)}function O(e,t,n){for(var i=n?t.parentNode:t;i;){if(i===e)return!0;i=i.parentNode}return!1}function D(e,t){return e.hasAttribute(t)}function N(e,t){return e.getAttribute(t)}function V(e,t){var n=e.getAttribute(t);return n?JSON.parse(n):null}function R(e,t,n){e.setAttribute(t,n)}function W(e,t){e.removeAttribute(t)}function q(e,t){(Array.isArray(t)?t:[t]).forEach((function(t){t&&e.appendChild(t)}))}function U(e,n,i){var a=t.createElement(e);if(n)for(var o in n)n.hasOwnProperty(o)&&R(a,o,n[o]);return i&&("string"==typeof i?a.innerHTML=i:q(a,i)),a}function j(e){return t.createTextNode(e)}function X(e){(Array.isArray(e)?e:[e]).forEach((function(e){var t=e.parentNode;t&&t.removeChild(e)}))}function Y(e,t){for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];e.style[n]=i,i||e.style.removeProperty(n)}}function F(e,t,n){if(n&&e.matches(t))return e;if("closest"in e)return e.closest(t);var i=e;do{if(i.matches(t))return i;i=i.parentNode}while(null!==i&&i.nodeType===Node.ELEMENT_NODE);return null}function J(e,t){var n=[];e.matches(t)&&n.unshift(e);for(var i=e.querySelectorAll(t),a=0;a<i.length;++a)n.push(i[a]);return n}function G(e,t){for(var n=[],i=0;i<e.children.length;++i){var a=e.children[i];t&&!a.matches(t)||n.push(a)}return n}function _(e,t){for(var n=e.nextElementSibling;null!==n;){if(!t||n.matches(t))return n;n=n.nextElementSibling}return null}function $(e,t){for(var n=e.previousElementSibling;null!==n;){if(!t||n.matches(t))return n;n=n.previousElementSibling}return null}function Q(e,t){for(var n=[],i=e.firstChild;null!==i;i=i.nextSibling)t&&!i.matches(t)||n.push(i);return X(n),n}function Z(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function K(){var t=e.innerWidth,n=e.innerHeight;return"ontouchstart"in e&&(t<=650&&n<=900||t<=900&&n<=650)}function ee(e){return e&&"rtl"==(e.dir||"").toLowerCase()}e.WeakMap&&(C=new WeakMap),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector);var te=[];function ne(t,n){var i,a="",o=e.URLSearchParams?e.URLSearchParams:null,r=o&&"a=1"===new o({a:1}).toString(),l=o&&"+"===new o("s=%2B").get("s"),c=!o||((i=new o).append("s"," &"),"s=+%26"===i.toString());if(o&&r&&l&&c){a=new o(t).toString()}else{if(t instanceof FormData)return null;for(var u in t)t.hasOwnProperty(u)&&(a+=(""==a?"":"&")+encodeURIComponent(u)+"="+encodeURIComponent(t[u]))}return(n||"")+"/"+(""!=a?"?"+a:"")}function ie(n){var i=null,a=e.URL||e.webkitURL;if("function"==typeof a){var o=new a(n);if(!o)return null;i=(o.pathname||"/")+o.search}else{var r=t.createElement("a");r.href=n,i=("/"!==r.pathname.charAt(0)?"/":"")+r.pathname+r.search}return i.match(/^\/language\/[0-9A-Za-z]{25}$/i)&&(i="/"),i}function ae(e,o,r,u,s,f,h){var d={};if("object"==typeof r)for(var w in r)r.hasOwnProperty(w)&&(d[w]=r[w]);"language"in d?l=d.language:l&&(d.language=l),c&&!("synchronizer"in d)&&(d.synchronizer=c);var y,b=e?"POST":"GET",x="/";if(o instanceof FormData)y=o,"string"==typeof r&&(x=r);else if(o){for(var w in(y=new FormData(o)).has&&y.delete&&J(o,"input[data-fileupload],textarea[data-fileupload]").forEach((function(e){var t=N(e,"name");if(t&&y.has(t)){var n=e.value;if(n&&!(n.length<1048576)){y.delete(t);var i=new Blob([n],{type:"text/html"});y.append(t,i,"document.html")}}})),"function"==typeof r&&r(y),d)if(d.hasOwnProperty(w)){(y.has?y.has(w):0!=J(o,"[name='"+w+"']").length)||y.append(w,d[w])}if(!e)(k=ne(y))&&k.length<4096?(x=k,y=void 0):b="POST"}else if(e||"string"!=typeof r){var k,M=!1;if(!e)(k=ne(d)).length<4096&&(x=k,M=!0);if(!M){for(var w in y=new FormData,d)d.hasOwnProperty(w)&&y.append(w,d[w]);b="POST"}}else x=r;var C=new XMLHttpRequest;return C.open(b,x,!0),C.responseType="application/json"==h?"json":"text",C.setRequestHeader("Accept",h||"text/html,*/*;q=0.9"),C.onload=function(){if(200==C.status)if(u)if(h)u(C.response);else{var e=null;try{var o=new DOMParser;o&&(e=o.parseFromString(C.response,"text/html"))}catch(E){}e||((e=t.implementation.createHTMLDocument("")).documentElement.innerHTML=C.response),J(e.head,"script:not([src])").forEach((function(e){var t=e.textContent;if(t){var o=new Function(t+";return init;")();if(o){o.language&&(l=o.language),o.synchronizer&&(c=o.synchronizer);var r=o.i18n||{};r.datetime&&(v=p(n,r.datetime)),r.wysiwyg&&(m=p(i,r.wysiwyg)),r.chat&&(g=p(a,r.chat))}}}));var r=null;J(e.head,"link[rel=canonical]").forEach((function(e){if(!r){var t=N(e,"href");t&&(r=ie(t))}}));var f=e.body,d=J(f,"header"),w=J(f,"main"),y=J(f,".content aside"),b=J(f,"footer"),x=J(f,".nav-back"),k=J(f,".nav-next"),M=function(e){if(0==e.length)return null;var t=G(e[0]);return 0==t.length?null:t};u({document:e,rtl:ee(e.documentElement),title:e.title||null,url:r||null,body:f,header:M(d),main:M(w),aside:M(y),footer:M(b),back:0!=x.length?x.shift():null,next:0!=k.length?k.shift():null})}else;else s&&s()},C.onerror=function(e){s&&s()},e||(C.timeout=3e4),C.ontimeout=function(e){s&&s()},C.withCredentials=!0,C.upload&&f&&(C.upload.onprogress=function(e){f(e.loaded,e.total)}),C.send(y),function(){C.abort()}}function oe(){var e=null;return function(t,n,i,a,o,r,l){return e&&e(),e=ae(t,n,i,(function(t){e=null,a&&a(t)}),(function(){e=null,o&&o()}),r,l),function(){e&&e(),e=null}}}H(e,["scroll","resize","orientationchange"],(function(){te.forEach((function(e){e()}))}));var re=null,le=null,ce=!1;var ue=[];function se(e,t){ue.push([e,t])}function fe(e,t){ue.forEach((function(n){var i=n[0];J(e,i).forEach((function(e){var a="init:"+i;E(e,a)||(z(e,a,!0),n[1](e,t))}))}))}var he=e.innerWidth-Math.min(f.offsetWidth,e.innerWidth);he&&f.style.setProperty("--scrollbar",he+"px");var de=0,pe=[];function ve(){(de+=1)>1||(L(f,"lock"),f.offsetWidth,pe.forEach((function(e){e()})))}function me(){0!=de&&0==(de-=1)&&(P(f,"lock"),Y(h,{paddingLeft:null,paddingRight:null}))}function ge(e,t,n,i){var a=Array.isArray(n)?n:[n];"prepend"!=t&&"after"!=t||a.reverse(),a.forEach((function(n){switch(t){case"before":e.parentNode.insertBefore(n,e);break;case"prepend":e.insertBefore(n,e.firstChild);break;case"append":e.appendChild(n);break;case"after":e.parentNode.insertBefore(n,e.nextSibling)}fe(n,!0),i&&(L(n,"fade-in"),setTimeout((function(){P(n,"fade-in")}),1e3))}))}function we(t,n){var i=t.getBoundingClientRect(),a=f.clientWidth||e.innerWidth,o=(f.clientHeight||e.innerHeight)*(n||1),r=i.top<=o&&i.top+i.height>=0,l=i.left<=a&&i.left+i.width>=0;return r&&l}se("input#login,input#aside",(function(e){H(e,"change",(function(t){e.checked?ve():me()}))}));var ye=T((function(){J(f,"[data-unveil]").forEach((function(e){be(e)}))}),50);function be(e){if(!F(e,".window")){var t=F(e,"[data-scroll]");if(we(t||e,1.2)){if(t){var n=e.offsetTop-t.scrollTop-(e.offsetParent===t.offsetParent?t.offsetTop:0),i=e.offsetHeight,a=t.offsetHeight,o=1*a/3;if(n+i+o<0)return;if(n>a+o)return}if(!E(e,"unveil")){z(e,"unveil",!0);var r=V(e,"data-unveil");r&&ae(!1,null,r,(function(n){var i=null;if(t&&!e.previousElementSibling){i=t.scrollTop;var a=getComputedStyle(e);i-=e.offsetHeight+parseInt(a.marginTop)+parseInt(a.marginBottom)}var o=n.header||n.main;o&&ge(e,"before",o,!0),null!==i&&(o.forEach((function(e){var t=getComputedStyle(e);i+=e.offsetHeight+parseInt(t.marginTop)+parseInt(t.marginBottom)})),t.scrollTop=Math.max(i,0)),X(e),ye()}))}}}}te.push(ye),se("[data-scroll]",(function(e){G(e,".active").forEach((function(t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.top-n.top-Math.max((n.height-i.height)/2,0);e.scrollTop=a})),H(e,"scroll",ye)})),se("[data-unveil]",(function(e){be(e)}));var xe,ke,Me=null;function Ce(t){if(ke&&(clearTimeout(ke),ke=null),!0===t||!1===t){if(!Me)return;return!1===t?(X(Me),void(Me=null)):(Y(Me,{transform:"translate3d(0%,0,0)",transition:"none",opacity:1}),Me.offsetWidth,void(ke=setTimeout((function(){Y(Me,{transition:"all 400ms",opacity:0}),Me.offsetWidth,ke=setTimeout((function(){X(Me),Me=null}),400)}),200)))}function n(){xe+=(1-xe)/11*Math.random(),Me.offsetWidth,Y(Me,{transform:"translate3d("+-100*(1-xe)+"%,0,0)",transition:"all 350ms"})}Me||(Y(Me=U("div",{class:"nanoscope"}),{transform:"translate3d(-100%,0,0)",opacity:1}),q(h,Me)),xe=0,n(),ke=e.setInterval(n,200)}var Ee=oe(),ze=null;function Te(e,t,n){ze&&ze(),Ce();var i=Ee(!1,null,e,(function(e){Ce(!0),t&&t(e)}),(function(e){Ce(!1),n&&n()}));return function(){i(),Ce(!1)}}var He={},Se="",Ae=null,Be=[];function Le(e){var t=!1;if(J(f,"input#login:checked,input#aside:checked").reverse().forEach((function(e){e.checked=null,t=!0,me()})),t&&e)return[!0];var n=[];return Be.forEach((function(i){t&&e||(n.push(i.modal),i.close(),t=!0)})),Be=[],n}function Ie(n,i,a,o,r,l){var c=!!Ae,u=c?Ae.modal.scrollTop:e.pageYOffset,s=Le();function d(e){J(e,"video,audio").forEach((function(e){try{e.pause(),e.currentTime=0}catch(t){}}))}var p=G(h,":not(.nanoscope):not(.window):not(.notification)"),v=[],m=null;p.forEach((function(e){if(v.push(e),c&&e===Ae.modal)(m=Q(Ae.overlay,":not(.nav-close)")).forEach((function(e){d(e)}));else if(!c||"obsolete"==l){if(c&&e===Ae.modal)return;if(-1!=s.indexOf(e))return;X(e),d(e)}})),Se in He||(He[Se]={});var g=He[Se];if(g.url||(g.url=ie(e.location.href)),g.rtl||(g.rtl=ee(f)),g.title||(g.title=t.title),g.elements=v,g.scroll=u,c&&"open"!=l&&(g.overlay=m),c&&"obsolete"==l&&(Ae&&Ae.close(!0),Ae=null),i){var w="object"==typeof i?i:null,y=a||(w?ne(w):"/"),b=r||"";n in He||(He[n]={});var x=He[n];x.param||(x.param=w),x.url||(x.url=y),x.rtl||(x.rtl=o),x.title||(x.title=b),x.prev||(x.prev=Se),b&&(t.title=b);var k={key:n,param:w};e.history.pushState(k,b,y)}Se=n}function Pe(e,t,n){var i=null;if(J(f,"input#login").forEach((function(e){i=e})),i){var a=U("div",{class:e},t),o=U("div",{class:"modal"},a);H(o,"click",(function(e){O(a,e.target)||c()}));var r=null;H(o,"touchstart",(function(e){1===e.targetTouches.length&&(r=e.targetTouches[0].clientY)})),H(o,"touchmove",(function(e){if(1===e.targetTouches.length){var t=e.targetTouches[0].clientY-r;0===o.scrollTop&&t>0&&e.preventDefault(),o.scrollHeight-o.scrollTop<=o.clientHeight&&t<0&&e.preventDefault()}})),ge(i,"before",o),ve(),o.offsetWidth,L(o,"open");var l=!1;return z(o,"close",(function(){c()})),H(o,["scroll","resize","orientationchange"],ye),{modal:o,overlay:a,close:c}}function c(e){l||(l=!0,n&&n(e),me(),P(o,"open"),setTimeout((function(){o&&(X(o),o=null)}),600))}}function Oe(e){Ae=Pe("overlay",null,(function(t){if(e&&e(),!t){for(var n={},i=Se;i in He&&(n=He[i],i==Se||"overlay"in He[i]);i=He[i].prev);var a=n.param||!0;Ie(M(),a,n.url,n.rtl,n.title,"close")}Ae=null}));var t=U("button"),n=U("div",{class:"nav-close"},t);H(t,"click",(function(e){B(e),this.blur(),Ae.close()})),q(Ae.overlay,n)}function De(e){for(var t=[],n=e.body.firstChild;null!==n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&t.unshift(n);t.forEach((function(e){ge(h,"prepend",e,!1)})),e.rtl?R(f,"dir","rtl"):W(f,"dir")}function Ne(t){Te(t,(function(n){Ie(M(),t,n.url,n.rtl,n.title,"obsolete"),De(n),e.scroll(0,0)}))}"state"in e.history&&(Se=(e.history.state||{}).key||""),H(e,"popstate",(function(n){var i=n.state,a=null===i?"":i.key;if(a in He){var o=He[a];Ie(a,null,o.url,o.rtl,o.title,null),o.rtl?R(f,"dir","rtl"):W(f,"dir"),t.title=o.title,Ae&&!("overlay"in o)&&(Ae&&Ae.close(!0),Ae=null),o.elements.slice().reverse().forEach((function(e){h.insertBefore(e,h.firstChild)})),"overlay"in o?(Ae||Oe(),q(Ae.overlay,o.overlay),Ae.modal.scrollTop=o.scroll):e.scroll(0,o.scroll)}else{Te(i&&"param"in i?i.param:(e.location.pathname||"/")+e.location.search,(function(t){Ie(a,null,t.url,t.rtl,t.title,null),De(t),e.scroll(0,0)}))}})),se("[data-load]",(function(e){var t=V(e,"data-load");t&&H(e,"click",(function(e){B(e),this.blur(),Ne(t)}))}));var Ve=null;function Re(e,t){if(Ae||!t){var n=null;Ae||(Oe((function(){Ve&&Ve(),Ve=null})),n=U("div",{class:"unveil"},"<hr>"),q(Ae.overlay,n)),Ve=Te(e,(function(t){if(!t.header&&!t.main)return Ae.close(),void(Ae=null);n&&X(n),Ie(M(),e,t.url,t.rtl,t.title,n?"open":null);var i=Ae.overlay;if(t.header&&(ge(i,"append",U("div",{class:"header"},t.header),!1),L(i,"wide")),t.main&&t.aside){var a=U("div",{class:"main"},t.main),o=U("div",{class:"aside"},t.aside);ge(i,"append",U("div",{class:"content"},[a,o]),!1),!t.header&&t.aside&&L(i,"wide")}else if(t.main){ge(i,"append",a=U("div",{class:"main"},t.main),!1)}t.back&&ge(i,"append",t.back,!1),t.next&&ge(i,"append",t.next,!1),Ae.modal.scrollTop=0,setTimeout((function(){Ae.modal.focus()}))}),(function(){Ae&&(Ae.close(),Ae=null)}))}else Ne(e)}function We(e){var t=null;return J(f,"input#login+.modal .overlay .footer label.button[for=login]").forEach((function(n){var i=U("button",{class:"button"},j(n.textContent));H(i,"click",(function(t){B(t),this.blur(),e.close()})),t=U("div",{class:"footer"},i),q(e.overlay,t)})),t}function qe(e,t){var n=U("div",{class:"unveil"},"<hr>"),i=Pe("overlay dialog",n,(function(){var e=Be.indexOf(i);-1!=e&&Be.splice(e,1),i=null,ze=null}));Be.push(i);var a=U("button"),o=U("div",{class:"nav-close"},a);q(i.modal,o);var r=We(i);Te(e,(function(e){if(i)if(e.header||e.main){if(e.main&&1==e.main.length&&!e.header&&!e.aside){var a=e.main.slice().shift();J(a,"form > .alert-success").forEach((function(e){P(e,"alert-success"),L(i.overlay,"success")})),J(a,"form > .alert-danger").forEach((function(e){P(e,"alert-danger"),L(i.overlay,"danger")}))}e.header&&L(i.overlay,"wide");var o=e.header||e.main;if(ge(n,"before",o,!1),X(n),r){var l=null,c=o.filter((function(e){return e.matches("form")}));1==c.length&&J(c.shift(),"button[type=submit]").forEach((function(e){l=e})),l&&(l.parentNode.insertBefore(r,l),q(r,l))}t&&t(i)}else i.close()}),(function(){i&&i.close()})),ze=i.close}function Ue(e,t){var n=Pe("overlay "+t,e,(function(){var e=Be.indexOf(n);-1!=e&&Be.splice(e,1)}));Be.push(n);var i=U("button"),a=U("div",{class:"nav-close"},i);return q(n.modal,a),"input"!=t&&We(n),n.close}function je(e,t,n,i){var a=N(e,"method"),o=N(e,"enctype")||"",r="POST"==a.toUpperCase(),l=null,c=null;function u(e){l?(X(l),l=null):Ce(e)}r&&"multipart/form-data"==o.toLowerCase()?(c=U("progress",{max:"1.0",value:"0.0"}),l=U("div",{class:"cover"},c),q(e,l)):Ce(),ae(r,e,t,(function(t){u(!0),n&&n(t),A(e,"reset")}),(function(){u(),i&&i()}),(function(e,t){c&&R(c,"value",e/t)}))}se("[data-post]",(function(e){var t=V(e,"data-post");t&&H(e,"click",(function(e){B(e),this.blur(),Re(t)}))})),se("[data-album]",(function(e){var t=V(e,"data-album");t&&H(e,"click",(function(e){B(e),this.blur(),Re(t,!0)}))})),se("[data-dialog]",(function(e){var t=V(e,"data-dialog");t&&H(e,"click",(function(e){B(e),this.blur(),qe(t)}))})),se("[data-alert]",(function(e){var t=N(e,"data-alert");H(e,"click",(function(e){B(e),this.blur(),Ue(t,"danger")}))})),e.setInterval((function(){var e=new Date;J(f,"[data-datetime]").forEach((function(t){var n=N(t,"datetime"),i=N(t,"data-datetime");if(n){var a=E(t,"datetime"),o=e.getTime()-(a||s).getTime(),r=new Date(n),l=r.getTime(),c=60*r.getTimezoneOffset()*1e3,u=parseInt(i),f=function(e,t){var n=e.getTime()<t.getTime(),i=parseInt(Math.abs(e.getTime()-t.getTime())/1e3),a=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),o=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),r=parseInt(Math.abs(a-o)/864e5);function l(e,t){var i=parseInt(t),a=e+(n&&0!=i?"+":"-")+i;return a in v?v[a]:null}function c(e,t){var i=parseInt(t),a=v.plural(i),o=e+(n&&0!=i?"+":"-")+a;if(o in v){var r=v.digits?i.toString().replace(/[0-9]/g,(function(e){return v.digits[+e]})):i;return v[o].replace("{#}",r)}return null}function u(e,t){var n=l(e,t);return n||(c(e,t)||null)}if(i<60&&(s=l("second",0)))return s;if(i<3600)return u("minute",Math.max((i+20)/60,1));if(i<43200)return u("hour",Math.max((i+1200)/3600,1));if(e.getUTCDate()==t.getUTCDate()&&i<86400)return u("hour",Math.max((i+1200)/3600,1));if(r<6){var s;if(s=l("day",Math.max(r,1)))return s;var f=null;switch(t.getUTCDay()){case 0:f="sunday";break;case 1:f="monday";break;case 2:f="tuesday";break;case 3:f="wednesday";break;case 4:f="thursday";break;case 5:f="friday";break;case 6:f="saturday"}var h=f+(n?"+1":"-1");return h in v?v[h]:c("day",Math.max(r,1))||null}return r<14||e.getUTCMonth()==t.getUTCMonth()&&r<28?u("week",Math.max(r/7,1)):r<360?u("month",Math.max(r/30,1)):u("year",Math.max(r/365,1))}(new Date(l+u+o-c),new Date(l-c));f&&t.textContent!=f&&(t.textContent=f)}}))}),3e4),se("[data-datetime]",(function(e,t){t&&z(e,"datetime",new Date)}));var Xe=!1,Ye=new Image;function Fe(e,t,n,i,a){if(Xe&&!i&&!a)return e;var o="https://image-processing.gloria.tv"+ie(e);return i&&(o+="?crop="+parseInt(i.x)+"x"+parseInt(i.y)+":"+parseInt(i.x+i.w)+"x"+parseInt(i.y+i.h)),a&&(o+=(i?"&":"?")+"size="+parseInt(a.w)+"x"+parseInt(a.h)),o}Ye.onload=function(){Xe=Ye.width>0&&Ye.height>0},Ye.src="data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",se("[data-scale]",(function(t){var n=V(t,"data-scale"),i=N(t,"src"),a=parseInt(N(t,"width")),o=parseInt(N(t,"height"));if(!(n&&"svg"==n.type||n&&"webp"==n.type&&n.animation&&Xe)){var r=t.parentNode,l=r.offsetWidth,c=r.offsetHeight,u=a/o,s=l/c;if(l&&c){var f=parseInt(Math.min(e.devicePixelRatio||1,1.5)*l),h=[64,128,256,512,768,1024,1536,2048,3072,4096].filter((function(e){return e>=Math.min(f,4096)}))[0],d=parseInt(Math.round(h/s)),p={w:h,h:d},v=null;if(u<.97*s||u>1.03*s){var m=t.style.marginTop,g=t.style.marginBottom,w=t.style.marginLeft,y=t.style.marginRight;if(m||g||u<s)v={x:0,y:parseInt(Math.round(a*Math.abs(m.replace("%","")/100))),w:a,h:a/s};else if(w||y||u>s){v={x:parseInt(Math.round(a*Math.abs(w.replace("%","")/100)*s/u)),y:0,w:o*s,h:o}}}R(t,"src",Fe(i,0,0,v,p)),R(t,"width",h),R(t,"height",d),Y(t,{width:null,height:null,marginTop:null,marginBottom:null,marginLeft:null,marginRight:null})}}})),H(t,"keydown",(function(e){var n=!1,i=t.activeElement;i&&(i.matches("input")||i.matches("textarea")||F(i,"form"))&&(n=!0);var a=J(f,".dropdown.open");if(0!=a.length)if("Escape"==e.key)a.forEach((function(t){B(e),P(t,"open")}));else if(!n&&("ArrowDown"==e.key||"ArrowUp"==e.key)){B(e);var o=J(f,".dropdown :focus");if(0==o.length)return;var r=F(o[0],"li",!0);if(r)"ArrowDown"==e.key?r=_(r):"ArrowUp"==e.key&&(r=$(r));else{var l=J(a[0],"li");0!=l.length&&(r=l[0])}if(!r)return;var c=J(r,"a");0!=c.length&&c[0].focus()}"Escape"==e.key&&(0!=Le(!0).length&&B(e));var u=J(f,".book");if(0!=u.length&&!n){var s=E(u[0],"book");s&&("ArrowLeft"==e.key?(B(e),s.back()):"ArrowRight"==e.key&&(B(e),s.next()))}})),H(t,["mousedown","touchstart"],(function(e){J(f,".dropdown.open").forEach((function(t){O(t,e.target)||P(t,"open")}))})),se(".dropdown",(function(t){L(t,"lock"),function(t){H(t,"click",(function(){if(I(t,"open"))P(t,"open");else{var n=t.querySelector("ul");if(n&&(Y(n,{display:"none",marginLeft:null,marginTop:null}),n.offsetHeight,Y(n,{display:null}),n.offsetHeight),L(t,"open"),n&&n.offsetParent){var i=n.offsetParent.getBoundingClientRect(),a=i.left,o=i.top,r=F(t,".scrollbox,[data-scroll]"),l=f.clientWidth||e.innerWidth,c=f.clientHeight||e.innerHeight;if(r){var u=r.getBoundingClientRect();a-=u.left,o-=u.top,l=u.width-(he||0),c=u.height}var s=n.offsetWidth,h=n.offsetHeight,d=a+n.offsetLeft-s/2,p=o+n.offsetTop,v=d+s;(d<1||v>l-1)&&0!=e.getComputedStyle(n).transform.match(/-?\d+\.?\d*/g)[4]&&Y(n,{marginLeft:(d<1?1-d:Math.max(1-d,l-1-v))+"px"});var m=p+h;m>c-1&&Y(n,{marginTop:Math.max(1-p,c-1-m)+"px"})}}}),!0)}(t)}));var Je=null;function Ge(t,n){var i=null,a=null,o=null;function r(){if(i){var e=i;i=null,a&&a(),a=null,o&&o(),o=null,P(e,"open"),setTimeout((function(){X(e)}),1e3),Je==r&&(Je=null)}}function l(l,s){a&&a(),a=null,o&&o(),o=null;a=ae(!1,null,n,(function(n){a=null,function(n,a,o){Je&&Je(),Je=r;for(var l=F(t,"h6")||F(t,"button")||t,s=l;s&&!I(s,"modal");s=s.parentElement)"hidden"==e.getComputedStyle(s).overflow&&(l=s);var d=(l.offsetParent||h).getBoundingClientRect(),p=t.getBoundingClientRect(),v=p.left-d.left+p.width/2;H(i=U("div",{class:"popup",style:"left:"+v+"px;top:"+(p.top-d.top+p.height)+"px"},n),"mousemove",c),H(i,"mouseleave",u),l.parentNode.insertBefore(i,l.nextSibling),J(i,"[data-popup]").forEach((function(e){W(e,"data-popup")})),fe(i,!0);var m=i.offsetWidth,g=i.offsetHeight,w=f.clientWidth||e.innerWidth,y=f.clientHeight||e.innerHeight;d.left+v+m/2>=w-5&&(v=w-5-(d.left+m/2),i.style.left=v+"px"),d.left+v<=m/2+5&&(v=m/2+5-d.left,i.style.left=v+"px"),p.top>g+5&&p.top+p.height+g>y-5&&(i.style.top="",i.style.bottom=d.bottom-p.bottom+p.height+"px",i.style.transformOrigin="bottom left"),i.offsetWidth,L(i,"open")}(n.main)}),(function(){a=null,Je=null})),Je&&Je(),Je=a}function c(e){if(o&&o(),o=null,!i&&!F(t,"button:focus")){var n=setTimeout((function(){l(e.clientX,e.clientY)}),200);a&&a(),a=function(){clearTimeout(n)},Je&&Je(),Je=a}}function u(e){a&&a(),a=null;var t=setTimeout(r,100);o&&o(),o=function(){clearTimeout(t)}}H(t,"mousemove",c),H(t,["mouseleave","click"],u)}function _e(e,n){var i=F(e,"form");if(i){var a=0!=J(e,"div[contenteditable=true]").length,o="chat"==n?"bottom":"attachment"==n&&a?"demand":"top";""!=n&&"image"!=n||L(e,"document");var r=[],l=[],c=J(i,"button[type=submit][hidden]");if(1==c.length){var u=c.shift();W(u,"hidden"),r.push(u)}if("image"==n||"attachment"==n||"chat"==n){var s={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/></svg>',dataurl:function(e,t,n,i){t.match(/^image/i)&&e.insertHTML(' <img src="'+n+'"> <br><br> ')},attr:{title:m.image}};r.push(s)}var f=null;if(("attachment"==n||"chat"==n)&&i.matches("[enctype='multipart/form-data']")){var h=null,d=1,p=[];s={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg>',browse:function(e,t,n,i){t.name="attachment-"+d++,p.push(t),i.style.position="relative",h?h.textContent=(parseInt(h.textContent)+1).toString():(Y(h=U("div",void 0,j("1")),{position:"absolute",top:"0",right:"0",fontSize:"0.6em",padding:"1px 2px",color:"white",backgroundColor:"#fa3e3e",borderRadius:"2px"}),q(i,h))},attr:{title:m.attach}};r.push(s),f=function(){h&&X(h),h=null,p.forEach((function(e){X(e)})),p=[]}}var v={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></svg>',popup:function(t,n,i){var a=e.offsetWidth;Y(n,{display:"inline-block",maxWidth:parseInt(8*a/9)+"px",padding:"0.5rem",textAlign:"center",whiteSpace:"normal"}),n.unselectable=!0;[{codepoint:128522,name:"JPj4pZvWByW"},{codepoint:128521,name:"VCWadelM6jq"},{codepoint:128519,name:"BKYKJ8YtHdW"},{codepoint:128556,name:"p2kWS8CDmyY"},{codepoint:128514,name:"RG8oD1EnNhO"},{codepoint:129322,name:"RkP2r4BhinC"},{codepoint:128525,name:"U6wMzZTa4OC"},{codepoint:128526,name:"sUOCyocXoIY"},{codepoint:129303,name:"PcHDtljKi6a"},{codepoint:129325,name:"LAXtXbza5MC"},{codepoint:128536,name:"0Ow2MgfZmJu"},{codepoint:129395,name:"gsJwYdDWJLW"},{codepoint:129396,name:"qLfXw172ymO"},{codepoint:129297,name:"gDxs782W21C"},{codepoint:129393,name:"kPf0DgyQPoG"},{codepoint:128564,name:"P6eDPidxgEK"},{codepoint:129296,name:"GeUYPk4c4GC"},{codepoint:128562,name:"q4en969Lanu"},{codepoint:128561,name:"A3W6bhbthXe"},{codepoint:129402,name:"qZmBCeAzDym"},{codepoint:128557,name:"0SlR1jmGcLG"},{codepoint:129323,name:"EescpewWXnq"},{codepoint:129300,name:"sMw1HECGH3q"},{codepoint:129317,name:"Q1yKmYGohuI"},{codepoint:128555,name:"Z9dJpXvHLPu"},{codepoint:128548,name:"I7QJRg4LAo0"},{codepoint:128545,name:"rCzRX4q2uWo"},{codepoint:128567,name:"BWziDJVwbcC"},{codepoint:129326,name:"YJ3ziriNVLO"},{codepoint:129298,name:"U7inCkIuyZo"},{codepoint:129301,name:"6CB1Z3Eoiz8"},{codepoint:129397,name:"0BlAPAaydZ6"},{codepoint:129398,name:"2XWBXb4gM4a"}].forEach((function(e,i){0!=i&&q(n,j(" "));var a="/emoji/"+e.name+"?unicode12",o=String.fromCodePoint?String.fromCodePoint(e.codepoint):"",r=U("img",{src:a,class:"emoji",width:64,height:64,alt:o,unselectable:!0});H(r,"click",(function(){var e=' <img class="emoji" src="'+Z(a)+'" width="64" height="64" alt="'+o+'"> ';t.insertHTML(e)})),q(n,r)}))},attr:{title:m.smileys}};r.push(v);var g={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',action:"link",attr:{title:m.link}};r.push(g),l.push(g);var w={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"/></svg>',action:"bold",hotkey:"b",attr:{title:m.bold}};"chat"!=n&&r.push(w),l.push(w);var y={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"/></svg>',action:"italic",hotkey:"i",attr:{title:m.italic}};"chat"!=n&&r.push(y),l.push(y);var b={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/></svg>',action:"underline",hotkey:"u",attr:{title:m.underline}};"chat"!=n&&r.push(b),l.push(b);var x={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 2.21.34.66.22 1.23.54 1.69.94.47.4.83.88 1.08 1.43s.38 1.15.38 1.81h-3.01c0-.31-.05-.59-.15-.85-.09-.27-.24-.49-.44-.68-.2-.19-.45-.33-.75-.44-.3-.1-.66-.16-1.06-.16-.39 0-.74.04-1.03.13s-.53.21-.72.36c-.19.16-.34.34-.44.55-.1.21-.15.43-.15.66 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.05-.08-.11-.17-.15-.25zM21 12v-2H3v2h9.62c.18.07.4.14.55.2.37.17.66.34.87.51s.35.36.43.57c.07.2.11.43.11.69 0 .23-.05.45-.14.66-.09.2-.23.38-.42.53-.19.15-.42.26-.71.35-.29.08-.63.13-1.01.13-.43 0-.83-.04-1.18-.13s-.66-.23-.91-.42c-.25-.19-.45-.44-.59-.75s-.25-.76-.25-1.21H6.4c0 .55.08 1.13.24 1.58s.37.85.65 1.21c.28.35.6.66.98.92.37.26.78.48 1.22.65.44.17.9.3 1.38.39.48.08.96.13 1.44.13.8 0 1.53-.09 2.18-.28s1.21-.45 1.67-.79c.46-.34.82-.77 1.07-1.27s.38-1.07.38-1.71c0-.6-.1-1.14-.31-1.61-.05-.11-.11-.23-.17-.33H21V12z"/></svg>',action:"strikethrough",hotkey:"s",attr:{title:m.striketrough}};"chat"!=n&&r.push(x),l.push(x);var k={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-opacity=".36" d="M0 20h24v4H0v-4z"/><path d="M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"/></svg>',action:"colortext",attr:{title:m.textcolor}};"chat"!=n&&r.push(k),l.push(k);var M={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z"/><path fill-opacity=".36" d="M0 20h24v4H0v-4z"/></svg>',action:"colorfill",attr:{title:m.backcolor}};"chat"!=n&&r.push(M),l.push(M);var C={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z"/></svg>',action:"clearformat",attr:{title:m.clear}};"chat"!=n&&r.push(C);var E=oe(),z=null,T=null;"chat"==n&&(z=function(){return A(i,"submit"),t.activeElement&&O(e,t.activeElement)&&(T=t.activeElement).blur(),!0});var S=wysiwyg(e,{toolbar:o,buttons:r,selectionbuttons:l,suggester:function(e,t){if("@"!=e[0])return!1;if(e.length<=2)return!0;var n={suggestion:e.substring(1),users:""};return E(!1,void 0,n,(function(n){var i=n.main||[];if(0!=i.length){for(var a=[],o=0;o<5&&o<i.length;++o){var r=i[o],l=N(r,"data-id");if(l){var c=J(r,"cite");if(0!=c.length){var u=J(c[0],"svg");0!=u.length&&X(u);var s=c[0].textContent;if(s){var f=s,h=new RegExp("^("+e.substring(1).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")(.*)$","i");h.test(f)&&(f=f.replace(h,"$1<b>$2</b>")),f="<cite>"+f+(0!=u.length?u[0].outerHTML:"")+"</cite>";var d=J(r,"figure>img,figure>svg");0!=d.length&&(f='<span class="icon">'+d[0].outerHTML+"</span>"+f),a.push({label:f,insert:'&nbsp;<a href="/user/'+Z(l)+'">@'+Z(s)+"</a>&nbsp; "})}}}}t(a)}else t(null)})),!0},interceptenter:z,hijackmenu:!1});return fe(e,!0),H(i,"reset",(function(){S.setHTML(""),T?T.focus():"chat"!=n&&t.activeElement&&O(e,t.activeElement)&&t.activeElement.blur(),f&&f()})),""!=n&&"image"!=n||0==J(e,"textarea[required]").length||J(e,"textarea").forEach((function(e){e.setCustomValidity&&H(e,"blur",(function(t){var n=!0;try{var i=new DOMParser;if(i){var a=i.parseFromString(e.value,"text/html");n=0!=(a&&a.body.textContent||"").replace(/\s+/g,"").length}}catch(t){}e.setCustomValidity(n?"":String.fromCharCode(160))}))})),S}}function $e(e,t,n){var i=J(f,".notification");0!=i.length?i=i.shift():(i=U("div",{class:"notification"}),q(h,i));var a=U("div",null,e);"success"==t?L(a,"success"):"danger"==t&&L(a,"danger");var o=U("span",{class:"close"});q(a,o);for(var r,l=0,c=i.firstChild;null!==c;c=c.nextSibling)E(c,"timeout")||(l+=1,r=c);l>=3&&A(r,"click"),ge(i,"prepend",a,!0);var u=null;function s(){clearTimeout(u),a&&(L(a,"fade-out"),setTimeout((function(){a&&(X(a),a=null)}),1e3))}H(a,"click",s),J(a,"a").forEach((function(e){H(e,"click",s)})),H(o,"click",(function(e){B(e),s()})),n&&(u=setTimeout(s,5e3),z(a,"timeout",!0),H(a,"mouseover",(function(){u&&(clearTimeout(u),u=null)})),H(a,["mouseout","mouseleave"],(function(e){e.target==a&&(u||(u=setTimeout(s,5e3)))})))}function Qe(e,t){return e?e.filter((function(e){if(t&&e.matches("data")){var n=V(e,"value");return n&&t(n),!1}return e.matches(".alert-success")?(P(e,"alert-success"),$e(e,"success",!0),!1):!e.matches(".alert-danger")||(P(e,"alert-danger"),Ue(e,"danger"),!1)})):[]}function Ze(e,t,n,i){var a=[],o=!1;(n||[]).forEach((function(t){if(t.matches("data")){var n=V(t,"value");return n&&n.chat&&(e.chat=n.chat),void(n&&n.predecessor&&(e.predecessor=n.predecessor))}if(!o){var i=V(t,"data-texting");if(i){if(-1!=e.textings.indexOf(i.id))return void(o=!0);e.textings.push(i.id)}a.unshift(t)}}));var r=e.scroll.scrollTop;if(t){ge(t,"before",a,!0);var l=getComputedStyle(t);r-=t.offsetHeight+parseInt(l.marginTop)+parseInt(l.marginBottom)}else ge(e.list,"append",a,!0);a.forEach((function(e){var t=getComputedStyle(e);r+=e.offsetHeight+parseInt(t.marginTop)+parseInt(t.marginBottom)})),e.scroll.scrollTop=Math.max(r,0)}te.push((function(){Je&&(Je(),Je=null)})),se("[data-popup]",(function(e){var t=V(e,"data-popup");t&&Ge(e,t)})),se("[data-description]",(function(e){setTimeout((function(){_e(e,"")}))})),se("[data-document]",(function(e){setTimeout((function(){_e(e,"image")}))})),se("[data-posting]",(function(e){setTimeout((function(){_e(e,"attachment")}))}));var Ke={};function et(n,i,a,o,r,l,c,u,s){if(K())Ne(n?{chat:n}:{chat:"",user:a});else{var d=i?"g:"+i:a?"u:"+a:n?"c:"+n:null;if(d){if(d in Ke)return!(he=Ke[d]).chat&&n&&(he.chat=n),r&&L(he.title,"unread"),Ze(he,null,c),void(u&&(he.predecessor=u));var p,v,m,w=U("button",{class:"muted",title:g.videochat},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.526 8.149a1 1 0 00-.973-.044L17 9.382V8c0-1.103-.897-2-2-2H6c-1.103 0-2 .897-2 2v8c0 1.104.897 2 2 2h9c1.103 0 2-.896 2-2v-1.382l2.553 1.276a.992.992 0 00.973-.043c.294-.183.474-.504.474-.851V9c0-.347-.18-.668-.474-.851z"/></svg>');i?(v=U("button",{class:"muted",title:g.groupjoin},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M8.002 16.006c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.794 4-4 4zm0-6a2 2 0 10.001 4.001 2 2 0 00-.001-4.001zM16.002 24.006h-16v-1c0-3.533 3.289-6 8-6s8 2.467 8 6v1zm-13.841-2h11.684c-.599-1.808-2.834-3-5.842-3s-5.244 1.192-5.842 3zM22.002 7.006h-3v-3h-2v3h-3v2h3v3h2v-3h3z"/></svg>'),m=U("button",{class:"muted",title:g.groupleave},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18 22H7c-1.103 0-2-.897-2-2v-3h2v3h11V4H7v3H5V4c0-1.102.897-2 2-2h11c1.103 0 2 .898 2 2v16c0 1.103-.897 2-2 2z"/><path d="M11.707 7.292l-1.414 1.416L12.59 11H4v2h8.582l-2.29 2.294 1.416 1.412 4.706-4.715z"/></svg>')):p=U("button",{class:"muted",title:g.groupchat},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM20.001 22h-4v-3a2 2 0 014 0v3zM12.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM14.001 22h-4v-3a2 2 0 014 0v3zM6.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM8.001 22h-4v-3a2 2 0 014 0v3zM21.376 11.781l-9.375-7.5-9.376 7.5-1.249-1.562 10.625-8.5 10.624 8.5z"/></svg>');var y=U("button",{class:"muted",title:g.enlarge},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16 12V9a1 1 0 00-1-1H5a1 1 0 00-1 1v3h2v-2h3v6.92c.328.047.66.08 1 .08s.672-.033 1-.08V10h3v2h2zM11 20.949c-.33.03-.663.051-1 .051s-.67-.021-1-.051V22H7v2h6v-2h-2v-1.051z"/><path d="M22.707 22.293l-5.442-5.441A9.956 9.956 0 0020 10c0-5.514-4.486-10-10-10S0 4.486 0 10c0 5.515 4.486 10 10 10a9.937 9.937 0 005.752-1.833l5.541 5.54 1.414-1.414zM2 10c0-4.411 3.589-8 8-8s8 3.589 8 8-3.589 8-8 8-8-3.589-8-8z"/></svg>'),b=U("button",{class:"muted",title:g.clear},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 20h20v2H2zM6.292 18.707c.182.181.432.293.708.293h6c.276 0 .526-.112.708-.293L21 11.414c.78-.779.78-2.048 0-2.828L15.414 3a2.001 2.001 0 00-2.828 0L3 12.586c-.78.78-.78 2.049 0 2.828l3.292 3.293zM10 8.414L15.586 14l-3 3H7.414l-3-3L10 8.414z"/></svg>'),x=U("button",{class:"muted",title:g.close},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.749 4.707l-1.415-1.414-7.292 7.293-7.293-7.293-1.415 1.414L10.627 12l-7.293 7.293 1.415 1.414 7.293-7.293 7.292 7.293 1.415-1.414L13.456 12z"/></svg>'),k=U("h6",{class:"col-spare"},o),M=U("div",{class:"title cols"},[k,w,p,v,m,y,b,x]);r&&L(M,"unread");var C,D=null,N=null,R=null,W=null;if(s){var q=U("span",{class:"contenteditable","data-placeholder":g.placeholder});H(W=U("button",{class:"wysiwyg"},[q]),"click",(function(e){B(e),this.blur(),Ue(s,"danger")}))}else{var G,_,$=U("input",{type:"hidden",name:"chat",value:n||""}),Q=U("input",{type:"hidden",name:"chatwindow",value:""}),Z=U("input",{type:"hidden",name:"request",value:"texting"});i&&(G=U("input",{type:"hidden",name:"name",value:i})),a&&(_=U("input",{type:"hidden",name:"user",value:a}));q=U("div",{contenteditable:!0,"data-placeholder":g.placeholder});R=U("textarea",{name:"texting-text",cols:100,rows:1,required:!0,spellcheck:!1,"data-fileupload":""}),N=U("div",{class:"wysiwyg"},[q,R]);var ee=U("button",{type:"submit",hidden:!0},g.submit);D=U("form",{method:"POST",action:"/",acceptCharset:"UTF-8",enctype:"multipart/form-data"},[$,Q,Z,G,_,N,ee])}c||(C=U("a",{class:"unveil"},"<hr>"));var te=U("div",{class:"history"},C),ne=U("div",{class:"scrollbox"},te),ie=U("div",{class:"window"},[M,ne,D,W]);ge(h,"append",ie,!1);var oe=null;N&&(oe=_e(N,"chat"));var ue=f.clientHeight||e.innerHeight,se=ie.offsetHeight,fe=ne.offsetHeight;se>ue&&Y(ne,{maxHeight:parseInt(ue-(se-fe))+"px"}),Ke[d]={chat:n,user:a,name:i,textings:c||[],predecessor:u,win:ie,title:M,scroll:ne,list:te};var he=Ke[d];if(ve(),l&&we(),w&&H(w,"click",(function(e){ft(!0,(function(){return new Promise((function(e,t){ae(!0,null,he.chat?{chat:he.chat,request:"record"}:{chat:"",user:a,request:"record"},(function(n){var i=!1;Qe(n.main,(function(t){e(t),i=!0})),i||t()}),(function(){t()}))}))}))})),p&&H(p,"click",(function(e){B(e),this.blur();var t=null,n=U("input",{type:"text",size:"100",required:"required"}),i=U("label",void 0,[j(g.description),n]),o=U("button",{type:"button",class:"button submit"},g.submit),r=U("legend",void 0,g.groupchat),l=U("fieldset",void 0,[r,i,o]),c=U("form",{method:"GET",action:"/"},[l]);H(c,"submit",(function(e){B(e);var i=n.value.trim();i&&(et(null,i,a,i),t())})),H(o,"click",(function(e){B(e),this.blur(),A(c,"submit")})),t=Ue(c,"input")})),v&&H(v,"click",(function(e){B(e),this.blur(),he.chat&&qe({chat:he.chat,request:"join"})})),m&&H(m,"click",(function(e){B(e),this.blur(),he.chat&&qe({chat:he.chat,request:"leave"},(function(e){J(e.overlay,"form").forEach((function(e){H(e,"submit",me)}))}))})),H(b,"click",(function(e){B(e),this.blur(),he.chat&&qe({chat:he.chat,request:"clear"},(function(e){J(e.overlay,"form").forEach((function(e){H(e,"submit",me)}))}))})),H(y,"click",(function(e){B(e),this.blur(),me(),Ne(n?{chat:n}:{chat:"",user:a})})),H(x,"click",(function(e){B(e),this.blur(),we(),me()})),R){var de=!1;H(R,"focus",(function(){de||we(),de=!1})),H(R,"blur",(function(){var e=t.activeElement;de=N&&e&&O(N,e)}))}if(N&&H(N,["click","input","change"],we),H(ne,"wheel",we),D&&H(D,"submit",(function(e){if(B(e),oe){var n=t.implementation.createHTMLDocument("");if(n.body.innerHTML=oe.getHTML(),0==(n.body.textContent||"").replace(/[\r\n ]/g,"").length&&0==J(n.body,"a,figure,img,svg,picture,video,audio,iframe").length)return}var i={window:""};he.predecessor&&(i.predecessor=he.predecessor),je(D,i,(function(e){if(e.main){var t=Qe(e.main);0!=t.length&&(Ze(he,null,t),lt())}}))})),C)ye(C,i?{chat:"",name:i,window:""}:a?{chat:"",user:a,window:""}:{chat:n,window:""});else c&&(Ze(he,null,c),lt());var pe=T((function(){J(ne,"[data-unveil]").forEach((function(e){var t=e.offsetTop-ne.scrollTop,n=e.offsetHeight,i=ne.offsetHeight,a=1*i/3;if(!(t+n+a<0||t>i+a||E(e,"unveil"))){z(e,"unveil",!0);var o=V(e,"data-unveil");o&&(o.window="",ye(e,o))}}))}),50);H(ne,"scroll",pe),H(M,"mousedown",(function(t){if(t.preventDefault(),O(M,t.target)&&!F(t.target,"button",!0)){z(ie,"moved",!0);var n=ie.getBoundingClientRect(),i=t.clientX-n.left,a=t.clientY-n.top,o=null;H(f,["mousemove","touchmove"],r),H(f,["mouseup","touchend"],(function e(t){S(f,["mousemove","touchmove"],r),S(f,["mouseup","touchend"],e)}))}function r(t){o||(o=setTimeout((function(){o=null;var n=f.clientWidth||e.innerWidth,r=f.clientHeight||e.innerHeight,l=ie.offsetWidth,c=ie.offsetHeight,u=n-l-Math.min(Math.max(parseInt(t.clientX-i),0),n-l),s=r-c-Math.min(Math.max(parseInt(t.clientY-a),0),r-c);Y(ie,{right:u+"px",bottom:s+"px"})}),50))}}))}}function ve(){var e=J(f,".window").filter((function(e){return!E(e,"moved")})),t=10;e.forEach((function(e){Y(e,{right:t+"px",bottom:"10px"}),t+=e.offsetWidth+10}))}function me(){X(he.win),delete Ke[d],lt(),ve()}function we(){if(e.clearInterval(le),ce&&(t.title=re),I(M,"unread")){P(M,"unread");var n=he.chat?{chat:he.chat}:{chat:"",user:a};(function(t){if(!it||it.readyState!=e.WebSocket.OPEN)return!1;var n=JSON.stringify(t);return it.send(n),!0})(n)||ae(!1,null,n)}}function ye(e,t){ae(!1,null,t,(function(t){t.main&&(Ze(he,e,t.main),lt()),X(e)}),(function(){X(e)}))}}se("[data-chat]",(function(e){var t=V(e,"data-chat");t&&H(e,"click",(function(e){B(e),this.blur(),Le(),et(t.chat,t.name,t.user,t.caption,!1,!0,null,null,t.blocked)}))}));var tt={};function nt(n){function i(e){var n=t.implementation.createHTMLDocument("");return n.body.innerHTML=e,n.body.firstChild}n&&Array.isArray(n)&&n.reverse().forEach((function(n){if("type"in n)if("record"==n.type)ft(!1,n);else if("chat"==n.type){var a=null,o={};n.users.slice(1).forEach((function(e){a||(a=e.id),o[e.id]=e.name}));var r=[];if(n.textings.forEach((function(a){var l;a.user in o&&n.unread&&(l="("+n.unread+") "+o[a.user],re||(re=t.title),ce=!1,e.clearInterval(le),le=e.setInterval((function(){t.title=ce?re:l,ce=!ce}),2e3));var c=i(a.html);r.push(c)})),n.unveil){var l=i(n.unveil);r.push(l)}et(n.id,n.name,a,n.caption,!!n.unread,!1,r,n.predecessor)}else if("notification"==n.type){if(n.id in tt)return;tt[n.id]=!0,$e(l=i(n.html))}}))}var it=null,at=null,ot=null;function rt(e){var n={synchronizer:c};e&&(n.quiesced=e);var i=ne(n,("http:"==location.protocol?"ws://":"wss://")+location.hostname+(location.port?":"+location.port:"")),a=new WebSocket(i,"html");a&&(H(a,"open",(function(e){it=a,H(t,"visibilitychange",ut),lt(!0)})),H(a,"message",(function(e){nt(JSON.parse(e.data))})),H(a,"close",(function(e){it=null,ot=null;var t=!1;switch(e.code){case 1012:case 1013:t=!0}t&&null===at&&setTimeout((function(){rt()}),1e3)})),H(a,"error",(function(e){it=null,ot=null,S(t,"visibilitychange",ut)})))}function lt(t){if(!it||it.readyState!=e.WebSocket.OPEN)return!1;var n=[];for(var i in Ke)if(Ke.hasOwnProperty(i)){var a=Ke[i];a.chat&&a.predecessor&&n.push({type:"predecessor",query:{chat:a.chat,predecessor:a.predecessor}})}if(!t||0!=n.length){var o=JSON.stringify(n);ot!==o&&(ot=o,it.send(o))}}var ct=null;function ut(){if(clearTimeout(ct),ct=null,"hidden"==t.visibilityState)it&&(ct=e.setTimeout((function(){it&&(it.close(1e3,"quiesce"),it=null,ot=null,at=new Date)}),6e4));else if(null!==at){var n=(new Date).getTime()-at.getTime();at=null,rt(n)}}function st(e,t,n,i,a,o,r){var l=!1,c=null,u=null,s=null,f={},h=null,p=null,v=null,m=null,g=null,w={},b="Browser does not supported real time video";if(d.mediaDevices&&d.mediaDevices.getUserMedia){y((function(){if(!l){try{c=new mediasoup.Device}catch(z){return void r(b)}t?e().then((function(e){var i=E(e);g&&t().then((function(){g&&x().then((function(e){u=e,g?(n(e),i(e)):C()})).catch((function(e){M()}))})).catch((function(){M()}))})).catch((function(e){r()})):x().then((function(t){u=t,l?C():(n(t),e().then(E).catch((function(e){C(),r()})))})).catch((function(e){r(e)}));var y=!1}function x(){var e={video:{width:{min:320,ideal:768,max:1280},height:{min:180,ideal:432,max:720}},audio:{}},t=d.mediaDevices.getSupportedConstraints();return t.aspectRatio&&(e.video.aspectRatio=16/9),t.frameRate&&(e.video.frameRate={max:30}),t.facingMode&&(e.video.facingMode="user"),t.channelCount&&(e.audio.channelCount=2),t.echoCancellation&&(e.audio.echoCancellation=!0),t.autoGainControl&&(e.audio.autoGainControl=!0),t.noiseSuppression&&(e.audio.noiseSuppression=!0),new Promise((function(t,n){d.mediaDevices.getUserMedia(e).then((function(e){0==e.getVideoTracks().length&&0==e.getAudioTracks().length?n():t(e)})).catch((function(e){n(e.message)}))}))}function C(){u&&(u.getTracks().forEach((function(e){e.stop()})),u=null)}function E(e){function t(e){var t=[];0!=e.getVideoTracks().length&&t.push("video"),0!=e.getAudioTracks().length&&t.push("audio"),k("transport",{record:1==t.length?t[0]:t}).then((function(t){var n={id:t.transport,iceParameters:t["ice-parameters"],iceCandidates:t["ice-candidates"],dtlsParameters:t["dtls-parameters"]};(h=c.createSendTransport(n)).on("connect",(function(e,t,i){k("connect",{transport:n.id,"dtls-parameters":e.dtlsParameters}).then((function(e){e.error?i():t()}))})),h.on("produce",(function(e,t,i){k("produce",{transport:n.id,kind:e.kind,"rtp-parameters":e.rtpParameters}).then((function(e){e.error?i():t({id:e.producer})}))})),h.on("connectionstatechange",(function(e){switch(e){case"new":case"connecting":case"connected":case"disconnected":default:break;case"closed":case"failed":M()}})),0!=e.getVideoTracks().length&&h.produce({track:e.getVideoTracks()[0]}).then((function(e){p=e})),0!=e.getAudioTracks().length&&h.produce({track:e.getAudioTracks()[0]}).then((function(e){v=e}))}))}var n=[],l=!1,d=[],b={};function x(e,t,o,r,u){function s(){n.forEach((function(e){var t=e.producer,n=e.peer,o=e.user,r=e.params;k("consume",{transport:m.id,producer:t,"rtp-capabilities":c.rtpCapabilities}).then((function(e){m.consume({producerId:t,id:e.consumer,kind:e.kind,rtpParameters:e["rtp-parameters"],type:e.type,producerPaused:e["producer-paused"]}).then((function(e){e.on("trackended",(function(){n in b&&(delete b[n][t],0==Object.keys(b[n]).length&&delete b[n]),n in b||n in f||(f[n]=!0,a(n,o,r))}));var l=function(){k("resume",{consumer:e.id}).then((function(t){e.resume(),n in b?b[n].addTrack(e.track):(b[n]=new MediaStream([e.track]),i(b[n],n,o,r))}))};"connected"!==m.connectionState?d.push(l):l()}))}))})),n=[]}e&&n.push({producer:e,kind:t,peer:o,user:r,params:u}),c.loaded&&0!=n.length&&(m?s():l||(l=!0,k("transport").then((function(e){var t={id:e.transport,iceParameters:e["ice-parameters"],iceCandidates:e["ice-candidates"],dtlsParameters:e["dtls-parameters"]};(m=c.createRecvTransport(t)).on("connect",(function(e,n,i){k("connect",{transport:t.id,"dtls-parameters":e.dtlsParameters}).then((function(e){e.error?i():n()}))})),m.on("connectionstatechange",(function(e){if("connected"===e){for(var t in d)d.hasOwnProperty(t)&&d[t]();d=[]}else"closed"!==e&&"failed"!==e&&"disconnected"!==e||M()})),s()}))))}return H(g=new WebSocket(e),"open",(function(e){})),H(g,"close",(function(e){h&&h.close(),h=null,p=null,v=null,m&&m.close(),m=null,c=null,g=null,C(),r()})),H(g,"error",(function(e){g=null})),H(g,"message",(function(e){var n=JSON.parse(e.data);if(n.transaction){var i=w[n.transaction];if(!i)return;i.resolve(n)}else if(c)switch(n.request){case"setup":if(s=n.peer,n.user,!c.loaded){var r=n["rtp-capabilities"];r.headerExtensions=r.headerExtensions.filter((function(e){return"urn:3gpp:video-orientation"!==e.uri})),c.load({routerRtpCapabilities:r}).then((function(){u?t(u):y=!0,x()}))}break;case"hangup":n.peer in f||(f[n.peer]=!0,a(n.peer,n.user,n.params));break;case"associate":x(n.producer,n.kind,n.peer,n.user,n.params);break;case"dissociate":n.peer in b&&(delete b[n.peer][n.producer],0==Object.keys(b[n.peer]).length&&delete b[n.peer]),n.peer in b||n.peer in f||(f[n.peer]=!0,a(n.peer,n.user,n.params));break;case"stats":if(n.peers){var l={},h={};for(var d in n.peers)if(n.peers.hasOwnProperty(d)){var m=n.peers[d];d==s||"video"in m&&p&&m.video.producer==p.id||"audio"in m&&v&&m.audio.producer==v.id?l=m:h[d]=m}o(l,h)}}})),function(e){y&&t(e)}}}));var x=0;return M}function k(e,t){var n={request:e};for(var i in t||{})t.hasOwnProperty(i)&&(n[i]=t[i]);x+=1,n.transaction=x;var a=JSON.stringify(n);return g.send(a),new Promise((function(e,t){w[n.transaction]={resolve:e,reject:t,payload:n}}))}function M(){l=!0,g&&(h?k("disconnect",{transport:h.id}).then((function(e){e.error,g.close()})):g.close())}r(b)}function ft(t,n){var i=null;function a(){var t=e.AudioContext||e.webkitAudioContext||e.mozAudioContext;if(t){var n=new t,a=n.createOscillator(),r=n.createOscillator();a.frequency.value=400,r.frequency.value=450;var l=n.createGain();l.gain.value=0;var c=n.createBiquadFilter();c.type="lowpass",c.frequency.value=8e3,a.connect(l),r.connect(l),l.connect(c),c.connect(n.destination),a.start(0),r.start(0);for(var u=n.sampleRate,s=3*u,f=n.createBuffer(1,s,u),h=f.getChannelData(0),d=0;d<s;++d)(d/u>0&&d/u<.4||d/u>.6&&d/u<1)&&(h[d]=.75);var p=n.createBufferSource();p.buffer=f,p.loop=!0,p.connect(l.gain),p.start(0),o(),i=function(){a.stop(0),r.stop(0),p.stop(0)}}}function o(){i&&(i(),i=null)}var r=n,l=null,c={},u=!1,s=null,f=null,h=null;function d(){s&&s(),s=null,f=null,h=null}function p(){l||(l=Pe("meeting",null,(function(){d()})));var e=l.overlay,n=e.clientWidth||e.offsetWidth,i=e.clientHeight||e.offsetHeight,a=null,o=null,r=!1,p=0;for(var v in c)c.hasOwnProperty(v)&&(p+=1);2==p&&"cam"in c&&(p=1,r=!0);for(var m=1;m<=p;++m){var g=Math.min(n/m,i/p*m/9*16);(!a||o<g)&&(a=m,o=g)}var w=[],y=[];for(var b in c)if(c.hasOwnProperty(b)){var x=c[b];if(r&&"cam"==b)y.push(x.video);else{var k=U("figure",{style:"width:"+parseInt(o/n*100)+"%;"},x.video);if("cam"==b)y.push(k);else{if("name"in x.params){var M=U("div",{class:"bottomleft shaded"});M.textContent=x.params.name,q(k,M)}w.push(k)}}}for(;e.firstChild;)e.removeChild(e.firstChild);var C=w.concat(y);for(var E in C)C.hasOwnProperty(E)&&q(e,C[E]);var z=t||u?null:U("button",{class:"answer muted"}),T=U("button",{class:"hangup muted"}),S=U("div",{class:u?"keypad":"keypad dialup"},[z,T]);q(e,S),z&&!u&&H(z,"click",(function(e){B(e),u=!0,z&&X(z),P(S,"dialup"),f&&f(),f=null,h=null})),H(T,"click",(function(e){B(e),h?h():s&&s(),s=null,f=null,h=null}))}function v(e,t,n,i,a){var o=U("video",{playsinline:!0,autoplay:!0});o.srcObject=e,t&&(o.muted=!0,o.style.transform="scaleX(-1)"),c[n]={video:o,user:i,params:a||{}},p();var r=o.play();void 0!==r&&r.then((function(){})).catch((function(e){t||(o.muted=!0,o.play().then((function(){})).catch((function(e){})))}))}var m=null;function g(e){if(e!==m){null!==m&&m in c&&P(c[m].video,"speaking");var t=0;for(var n in c)c.hasOwnProperty(n)&&(t+=1);t>=3&&e in c&&L(c[e].video,"speaking"),m=e}}s=st((function(){return new Promise((function(e,t){function n(){var t=("http:"==location.protocol?"ws://":"wss://")+r.host+(r.port?":"+r.port:"")+(r.path||"/")+r.upload+"/"+r.user.id+"?name="+encodeURIComponent(r.user.name);e(t)}"function"==typeof r?r().then((function(e){a(),r=e,n()})).catch(t):n()}))}),t?null:function(){return new Promise((function(e,t){u?e():(f=e,h=t)}))},(function(e){for(var n in t||o(),c)c.hasOwnProperty(n)&&c[n].video.muted&&(c[n].video.muted=!1);v(e,!0,"cam")}),(function(e,n,i,l){if(t&&(o(),u=!0),t||a(),!t&&!u&&i&&r.user.id==i)return d();v(e,!1,n,i,l)}),(function(e,n,i){return e in c&&delete c[e],t||u||!n||r.user.id!=n?0==Object.keys(c).filter((function(e){return e&&"cam"!=e})).length?d():void p():d()}),(function(e,t){if(e.audio&&null!==e.audio.volume)g("cam");else for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];"audio"in i&&null!==i.audio.volume&&g(n)}}),(function(e){o(),l&&l.close(),e&&Ue(Z(e),"danger")}))}function ht(e,t,n){function i(t){var i=Qe(t.main,(function(t){t.predecessor&&z(e,"predecessor",t.predecessor)}));0!=i.length&&ge(e,n,i,!0)}H(e,"submit",(function(n){B(n);var a=E(e,"predecessor"),o=p({},t,a?{predecessor:a}:{});je(e,o,i)}))}function dt(t,n){if(!n)return null;var i=e.MediaSource;if(!i)return null;var a=i.isTypeSupported;if("function"!=typeof a)return null;for(var o=['video/mp4; codecs="avc1.42c01e,mp4a.40.5"','video/mp4; codecs="avc1.4d401f,mp4a.40.5"'],r=0;r<o.length;++r)if(!a(o[r]))return null;var l=e.Hls;if(!l||!l.isSupported())return null;var c=null;if("flat"in[]&&p2pml&&p2pml.hlsjs&&p2pml.hlsjs.Engine.isSupported()){var u={segments:{forwardSegmentCount:50,maxHistorySegments:50,swarmId:n},loader:{trackerAnnounce:["wss://p2p-tracker.gloria.tv:10443"],cachedSegmentExpiration:6048e5,cachedSegmentsCount:100,requiredSegmentsPriority:1,simultaneousHttpDownloads:3,httpFailedSegmentTimeout:1e3,httpDownloadInitialTimeout:12e4,httpDownloadInitialTimeoutPerSegment:500,httpUseRanges:!0,httpDownloadProbabilitySkipIfNoPeers:!0,httpDownloadMaxPriority:20,httpDownloadProbability:0,httpDownloadProbabilityInterval:1e3,simultaneousP2PDownloads:7,p2pDownloadMaxPriority:20,rtcConfig:{iceServers:[{urls:"stun:stun.l.google.com:19302"}]}}},s=new p2pml.hlsjs.Engine(u);c=new l({liveSyncDurationCount:7,loader:s.createLoaderClass()}),p2pml.hlsjs.initHlsJsPlayer(c),s.on("peer_connect",(function(e){})),s.on("peer_close",(function(e){})),s.on("segment_loaded",(function(e,t){}))}else c=new l;return c.loadSource(n),c.attachMedia(t),c}se("[data-record]",(function(e){var t=V(e,"data-record");H(e,"click",(function(e){B(e),this.blur(),ft(!0,t)})),setTimeout((function(){O(f,e)&&X(e)}),6e5)})),se("[data-submit]",(function(t){function n(n){if(F(t,".overlay.dialog")&&n.main&&1==n.main.length&&!n.header&&!n.aside&&0==Qe(n.main).length)return void Le();Ie(M(),!0,n.url,n.rtl,n.title,"obsolete"),De(n),e.scroll(0,0)}function i(){t.submit()}H(t,"submit",(function(e){B(e),je(t,(function(e){var n=E(t,"blobs");n&&(n.forEach((function(t){e.append(t.name,t.blob,t.filename)})),z(t,"blobs",null))}),n,i)}))})),se("[data-above]",(function(e){ht(e,V(e,"data-above"),"before")})),se("[data-below]",(function(e){ht(e,V(e,"data-below"),"after")})),se("[data-like]",(function(e){var t=V(e,"data-like");H(e,"click",(function(n){B(n),this.blur(),ae(!0,null,p({},t),(function(t){var n=Qe(t.main);if(0!=n.length){var i=n.shift().querySelector("[data-like]");if(i){var a=u(e,!1),o=u(i,!1);if(a.length&&o.length){var r=a[0].parentNode;X(a),o.reverse().forEach((function(e){r.insertBefore(e,r.firstChild)})),fe(r,!0)}var l=u(e,!0),c=u(i,!0);if(l.length&&c.length){r=l[0].parentNode;X(l),c.reverse().forEach((function(e){r.insertBefore(e,r.firstChild)})),fe(r,!0)}}}function u(e,t){var n=G(F(e,".dropdown"),t?"ul":":not(ul)");return G(n.shift())}}))}))})),se("[data-sort]",(function(e){var t=V(e,"data-sort");H(e,"click",(function(n){B(n),this.blur(),function(e,t){var n=F(e,"ol,ul"),i=F(e,"li");if(n&&i){switch(t.request){case"move-top":n.insertBefore(i,n.firstChild);break;case"move-up":n.insertBefore(i,i.previousElementSibling);break;case"move-down":i.nextElementSibling&&n.insertBefore(i,i.nextElementSibling.nextElementSibling);break;case"move-bottom":n.appendChild(i);break;case"delete":X(i);break;default:return}ae(!0,null,t)}}(e,t)}))})),se("input[type=file]",(function(t){!function t(n,i,a,o){i&&!a&&W(a=n.cloneNode(),"required");var r=F(n,".placeholder");function l(e){if(0!=e.length){for(var t=r.firstChild;null!==t;){var n=t;if(t=t.nextSibling,n.nodeType==Node.ELEMENT_NODE){if(n.matches("input[type=file]"))continue;if(i&&n.matches(".file"))continue}X(n)}var a;return e.forEach((function(e){var t=U("span",{class:"file"},(e.type.match(/^image/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.414 1.001H5c-1.103 0-2 .897-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.587l-4.586-4.586zM5 21.001v-18h10v4h4l.001 14H5z"/><path d="M12 16.002l-2-2-3 4h10l-3-6z"/><circle cx="10" cy="11.002" r="2"/></svg>':e.type.match(/^video/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13 12.007H8v6h5v-2.25l3 2.25v-6l-3 2.25z"/><path d="M16.414 1.004H5c-1.103 0-2 .898-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.59l-4.586-4.586zM5 21.004v-18h10v4h4l.001 14H5z"/></svg>':e.type.match(/^audio/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.414 1.003H5c-1.103 0-2 .897-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.589l-4.586-4.586zM5 21.003v-18h10v4h4l.001 14H5z"/><path d="M11 13.05a2.5 2.5 0 102 2.45v-5.112l2.632.877.633-1.898L11 7.612v5.438z"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.414 2H6c-1.103 0-2 .898-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6.586L15.414 2zm2.587 18H6V4h8v4h4l.001 12z"/></svg>')+e.name);J(t,"svg").forEach((function(e){L(e,"icon")})),q(r,j(" ")),q(r,t),a=t})),a}}var c=F(n,"label");function u(e){Y(c,{backgroundImage:"url("+e+")",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"})}var s=!1;if(H(n,"change",(function(e){if(!s&&e.target.files){var o=e.target.files;if(!r){var f=U("div",{class:"label upload"});c.parentNode.insertBefore(f,c),q(f,c),L(r=c,"placeholder"),P(r,"upload")}if(i){R(n,"hidden",""),r.parentNode.insertBefore(n,r);var h=a.cloneNode();q(r,h),t(h,i,a,!0)}for(var d=[],p=0;p<o.length;++p){var v=o[p];d.push({type:v.type,name:v.name})}for(l(d),p=0;p<o.length;++p)if(0!=(v=o[p]).size&&!(v.size>16777216)&&v.type.match(/^image/i)){var m=new FileReader;m.onloadend=function(e){u(e.target.result)},m.readAsDataURL(v);break}}})),!o){var f=F(n,".upload");f&&r&&J(f,"[data-capture]").forEach((function(t){if(d.mediaDevices&&d.mediaDevices.getUserMedia){var a=null;H(t,"click",(function(o){d.mediaDevices.getUserMedia({video:{width:{min:640,ideal:3840,max:7680},height:{min:320,ideal:2160,max:4320}},audio:!1}).then((function(o){var r=U("video",{class:"open"}),c=U("canvas",{}),f=null,h=Pe("lightbox",[r,c],(function(){var e=Be.indexOf(h);-1!=e&&Be.splice(e,1),clearTimeout(f),o.getTracks().forEach((function(e){e.stop()}))}));Be.push(h),Y(h.overlay,{width:320/240*100+"vh",height:"75vw"}),r.srcObject=o,H(r,"loadedmetadata",(function(e){r.play()})),H(r,"playing",(function(o){var d=r.videoWidth,p=r.videoHeight;Y(h.overlay,{width:d/p*100+"vh",height:p/d*100+"vw"}),f=e.setTimeout((function(){var e=c.getContext("2d");c.width=d,c.height=p,e.drawImage(r,0,0,d,p);var o=F(n,"form");o&&(c.toBlob((function(e){var t=N(n,"name"),a=E(o,"blobs");a||(a=[]),i||(a=a.filter((function(e){return e.name!=t}))),a.push({name:t,blob:e,filename:"snapshot.jpeg"}),z(o,"blobs",a)}),"image/jpeg",.95),a&&!i&&X(a),a=l([{type:"image/jpeg",name:t.textContent}]),u(c.toDataURL("image/jpeg",.95)),s=!0,A(n,"change"),s=!1,W(n,"required"),h.close())}),1e3)}))})).catch((function(e){Ue(Z(e.message),"danger")}))}))}else X(t)}))}}(t,D(t,"multiple"))})),se("[data-validate]",(function(e){if(e.setCustomValidity){var t=F(e,"form");if(t){var n=V(e,"data-validate"),i=N(e,"name");if(i){var a=oe(),o=T((function(){if(e.value){var o=p({},n||{});for(var r in o)o.hasOwnProperty(r)&&J(t,"[name="+r+"]").forEach((function(e){e.value&&(o[r]=e.value)}));o[i]=e.value,a(!0,void 0,o,(function(t){var n="";t.main&&t.main.forEach((function(e){e.matches(".alert-danger")&&(n=e.textContent)})),e.setCustomValidity(n)}))}}),300,!0);H(e,"input",o)}}}})),se("[data-repeatpassword]",(function(e){var t=$(e,"input[type=password]");t&&H(t,"change",(function(){var n=t.value.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");R(e,"pattern",n)}))})),se("[data-upload]",(function(e){var t=F(e,"form");if(t){var n=J(t,"input[name=upload-file]"),i=J(t,"input[name=upload-link]"),a=J(t,"input[name=upload-title]"),o=J(t,"textarea[name=upload-text]"),r=J(t,"button[data-livestream]"),l=[];n.forEach((function(t){var n=F(t,".upload");l.push(n),H(t,"change",(function(t){var n=e.parentNode;if(n){var o=[e].concat(i,a,r,n);1==r.length&&o.push(r[0].parentNode),X(o)}}))})),i.forEach((function(t){H(t,"input",(function(n){var i=e.parentNode;if(i){var c=F(t,".cols");c&&c.parentNode.insertBefore(t,c),t.focus(),R(t,"required","required"),o.forEach((function(e){W(e,"required")}));var u=[e].concat(l,a,r,i);1==r.length&&u.push(r[0].parentNode),X(u)}}))})),a.forEach((function(e){H(e,"input",(function(e){c()}))})),H(e,"click",(function(e){B(e),c()})),r.forEach((function(n){H(n,"click",(function(n){B(n);var o=e.parentNode;if(o){var c=[e].concat(l,i,a,r,o);1==r.length&&c.push(r[0].parentNode),X(c);var u=!1;J(t,"button[type=submit]").forEach((function(e){H(e,"click",(function(e){B(e),t.checkValidity&&t.checkValidity()&&(u||(u=!0,J(t,"input[type=hidden][name=upload]").forEach((function(e){R(e,"value","live")})),function(e,t){var n=null,i=null;function a(){n&&n(),n=null,i&&i()}n=st((function(){return new Promise((function(e,n){t().then((function(t){var n=("http:"==location.protocol?"ws://":"wss://")+t.host+(t.port?":"+t.port:"")+(t.path||"/")+t.upload;e(n)})).catch(n)}))}),null,(function(t){if(0!=t.getVideoTracks().length&&0!=t.getAudioTracks().length){Y(e,{display:"none"});var n=U("video",{playsinline:!0,autoplay:!0}),o=U("button",{class:"stop muted"}),r=U("div",{class:"keypad"},o),l=U("div",{class:"camera"},[n,r]);e.parentNode.insertBefore(l,e),n.srcObject=t,n.muted=!0,n.style.transform="scaleX(-1)",n.play(),H(o,"click",(function(e){B(e),a()})),i=function(){i=null,X(r),n.srcObject=null}}else a()}),(function(e,t,n,i){}),(function(e,t,n){}),(function(e,t){}),(function(e){a(),e&&Ue(Z(e),"danger")}))}(t,(function(){return new Promise((function(e,n){je(t,null,(function(t){var i=!1;Qe(t.main,(function(t){e(t),i=!0})),i||n()}),(function(){n()}))}))}))))}))}))}}))}))}function c(){var t=e.parentNode;if(t){a.forEach((function(e){var t=F(e,".cols");t&&t.parentNode.insertBefore(e,t),e.focus()})),o.forEach((function(e){R(e,"data-fileupload","")}));var n=[e].concat(l,i,r,t);1==r.length&&n.push(r[0].parentNode),X(n)}}})),se("[data-signup]",(function(e){var t=F(e,"form");if(t){var n=J(t,"input[name=user-namegiven],input[name=user-nameadditional],input[name=user-namefamily]"),i=J(t,"input[name=user-organization]"),a=J(t,"input[name=user-gender][value=neuter]");n.forEach((function(e){e&&H(e,"input",(function(e){i&&(X(i),n=null,i=null,a=null)}))})),i.forEach((function(e){e&&H(e,"input",(function(e){if(n&&a){var t=n[0].parentNode;X(n.concat(t)),a.forEach((function(e){var t=F(e,"label");t&&W(t,"hidden")})),n=null,i=null,a=null}}))}))}})),se("[data-autocomplete]",(function(e){var t=V(e,"data-autocomplete"),n=N(e,"name"),i=F(e,"form");n&&i&&function(e,t,n,i,a){if(!K()||!a){R(t,"autocomplete","off");var o=t.offsetWidth,r=null,l=oe(),c=T((function(){if(o=Math.max(o,t.offsetWidth),t.value){var c=p({},n);c[i]=t.value,l(!1,void 0,c,(function(n){if(n.main||n.aside){if(r)Q(r);else{r=U("div",{class:"autocomplete"});var i=e.getBoundingClientRect(),l=t.getBoundingClientRect();Y(r,{top:l.top-i.top+t.offsetHeight+1+"px",left:l.left-i.left+"px",maxWidth:o+"px"}),H(r,"click",(function(){u()}),!0),H(f,["mouseup","touchend"],s),q(e,r)}if(a){var c=[];n.main&&(c=n.main.slice(0,5).map((function(e){return L(e,"suggestion"),e})));var h=[];if(n.aside&&(h=n.aside.slice(0,3).map((function(e){return L(e,"suggestion"),e}))),0!=h.length){L(r,"cols");var d=U("div",{class:"col-spare"},c),p=U("div",{class:"col-thumb"},h);ge(r,"append",[d,p],!1)}else P(r,"cols"),ge(r,"append",c,!1)}else c=[],n.main&&(c=n.main.slice(0,5).map((function(e){return L(e,"suggestion"),H(e,"click",(function(n){B(n),this.blur();var i=null;J(e,".richtext").forEach((function(e){i||(i=e.textContent)})),i||(i=e.textContent),t.value=i;var a=N(e,"data-id"),o=F(t,"label");if(a&&o){var r=J(o,"input[type=hidden]");1==r.length&&(r.shift().value=a)}u()})),e}))),ge(r,"append",c,!1)}else u()}))}else u()}),300,!0);H(t,"input",c)}function u(){r&&(S(f,["mouseup","touchend"],s),X(r),r=null)}function s(e){r&&(O(t,e.target)||O(r,e.target)||u())}}(i,e,t,n,!1)})),se("[data-search]",(function(e){var t=V(e,"data-search"),n=N(e,"name"),i=F(e,".modal"),a=i?i.querySelector(".main"):f.querySelector("main");if(n&&a){var o=oe(),r=null,l=T((function(){c(e.value)}),300,!0);H(e,"input",l),H(e,"keydown",(function(t){"Escape"==t.key&&(c(),e.value="")}))}function c(i){if(!i||i.length<3){if(null===r)return;return Q(a),q(a,r),void(r=null)}var l=p({},t);l[n]=i,o(!1,void 0,l,(function(i){null===r?r=Q(a):Q(a),i.main?(ge(a,"append",i.main,!1),J(a,"[data-filter]").forEach((function(i){i.matches("input[type=checkbox]")?H(i,"change",(function(n){var a=!!i.checked;"all-languages"!=i.name&&"all-users"!=i.name||(a=!a),a?t[i.name]="":delete t[i.name],c(e.value)})):H(i,"click",(function(t){B(t),this.blur();var a=V(i,"data-filter");n in a&&(e.value=a[n]),c(e.value)}))}))):c()}))}})),se("[data-lightbox]",(function(e){var t=V(e,"data-lightbox");if(t){var n=!1;H(e,"click",(function(e){B(e),this.blur();var i=Array.isArray(t);!function(e,t){var n=[];t.forEach((function(e,t){var i=e.url?U("img",{src:Fe(e.url,e.width,e.height),width:e.width,height:e.height,alt:""}):U("div",{style:"width:"+("audio"==e.type?"80%":"100%")},e.html);0!=t&&J(i,"video,audio").forEach((function(e){W(e,"autoplay")})),n.push(i)}));var i=Pe("lightbox",n,(function(){var e=Be.indexOf(i);-1!=e&&Be.splice(e,1)}));function a(e){var a=i.overlay.querySelector(".open");a&&(P(a,"open"),J(a,"video,audio").forEach((function(e){e.pause()})));var o=n.indexOf(a);-1==o&&(o=0),-1==e?o=0!=o?o-1:n.length-1:1==e&&(o=o+1<n.length?o+1:0);var r=n[o];L(r,"open"),J(r,"video,audio").forEach((function(e){e.play()}));var l=t[o],c="text"==l.type?2*l.width:l.width||512,u=l.height||128;Y(i.overlay,{width:c/u*100+"vh",height:u/c*100+"vw"})}Be.push(i);var o=U("button"),r=U("div",{class:"nav-close"},o);if(q(i.modal,r),t.length>1){var l=U("button"),c=U("div",{class:"nav-back"},l);H(l,"click",(function(e){B(e),this.blur(),a(-1)}));var u=U("button"),s=U("div",{class:"nav-next"},u);H(u,"click",(function(e){B(e),this.blur(),a(1)})),q(i.modal,[c,s])}H(i.overlay,"click",(function(e){B(e),this.blur();var o=-1;n.forEach((function(t,n){O(t,e.target)&&(o=n)})),-1==o||1==t.length?i.close():"url"in t[o]&&a(1)})),a(0)}(0,i?t:[t]),i||!t.notify||n||(ae(!1,null,t.notify),n=!0)}))}})),se("[data-video]",(function(t){var n=V(t,"data-video");if(n){var i=D(t,"autoplay");setTimeout((function(){!function(t,n,i,a,o,r){var l=U("div",{style:"display:none"},'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="plyr-airplay" viewBox="0 0 18 18"><path d="M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"/><path d="M4 17h10l-5-6z"/></symbol><symbol id="plyr-captions-off" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol><symbol id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol><symbol id="plyr-download" viewBox="0 0 18 18"><path d="M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"/></symbol><symbol id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol><symbol id="plyr-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol><symbol id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol><symbol id="plyr-logo-vimeo" viewBox="0 0 18 18"><path d="M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"/></symbol><symbol id="plyr-logo-youtube" viewBox="0 0 18 18"><path d="M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"/></symbol><symbol id="plyr-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol><symbol id="plyr-pause" viewBox="0 0 18 18"><path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/></symbol><symbol id="plyr-pip" viewBox="0 0 18 18"><path d="M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"/><path d="M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"/></symbol><symbol id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/></symbol><symbol id="plyr-restart" viewBox="0 0 18 18"><path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"/></symbol><symbol id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol><symbol id="plyr-settings" viewBox="0 0 18 18"><path d="M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"/></symbol><symbol id="plyr-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"/><path d="M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol></svg>');t.parentNode.insertBefore(l,t);var c=null;a&&(c=function(e){for(var t=a.frames,i=1;i*i<t;)i++;var o=parseInt((t+i-1)/i),r=parseInt(a.width/i),l=parseInt(a.height/o);r*i==a.width&&a.height;for(var c=[],u=0;u<t;++u){var s=r*(u%i),f=l*parseInt(u/i),h=u*n/Math.max(t,1)/1e3,d=(u+1)*n/Math.max(t,1)/1e3;c.push({startTime:h,endTime:d,text:Fe(a.url,a.width,a.height),x:s,y:f,w:r,h:l})}e([{frames:c,width:a.width,height:a.height,urlPrefix:""}])});var u=[],s=null;J(t,"source").forEach((function(e){var t=N(e,"type")||"",n=N(e,"src"),i=V(e,"data-quality")||{};t.match(/^application\/x-mpegURL$/i)?s||(s=n):i&&(u.push([e,i.height]),i.width)})),u.sort((function(e,t){return e[1]-t[1]}));for(var h=[4320,2880,2160,1440,1080,720,576,480,360,240],d=0;d<u.length;++d){for(var p=0,v=0;v<h.length&&(p=v,!(u[d][1]>=h[v]));++v);R(u[d][0],"size",h[p]),h.splice(p)}y((function(){if(O(f,t)){var n=new Plyr(t,{autoplay:i,volume:1,iconUrl:"",controls:["play-large","play","progress","current-time","volume","settings","captions","pip","airplay","fullscreen"],settings:["quality"],blankVideo:null,keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},storage:{enabled:!1,key:"plyr"},duration:null,previewThumbnails:c?{enabled:!0,src:c}:{enabled:!1}}),a=dt(t,s);a&&n.on("languagechange",(function(){setTimeout((function(){a.subtitleTrack=n.currentTrack}),50)})),n.once("ready",(function(){if(O(f,t)){if(i){var a=/^#(\d+)$/.exec(e.location.hash||"");a&&(n.currentTime=parseInt(a[1])),n.play()}}else n.stop()}));var o=!1;n.on("play",(function(){a&&a.startLoad(),r&&!o&&(ae(!1,null,r),o=!0)})),n.on("pause",(function(){a&&a.stopLoad()})),n.on("qualitychange",(function(e){}))}}))}(t,n.duration,i,n.thumbnails,n.logo,n.notify)}))}}));var pt=null,vt=null;function mt(e){if(vt!==e&&(vt=e,pt&&pt(),pt=null,e)){var t=V(e,"data-teaser");if(0==de){var n=null,i=null;if(t.video){var a=t.video,o=[],r=null;if(a.files.forEach((function(e){var t=e.url;if("object"==typeof t&&(l&&!("language"in t)&&(t.language=l),c&&!("synchronizer"in t)&&(t.synchronizer=c),t=ne(t)),e.mediatype.match(/^application\/x-mpegURL$/i))r=t;else{var n=U("source",{type:e.mediatype,src:t});o.push(n)}})),0!=o.length||r){var u=J(e,"figure");u.sort((function(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return i.width*i.height-n.width*n.height}));var s=u.shift(),f=J(s,"img").shift(),h=J(s,"a").pop(),d=J(s,".play").pop(),p=J(s,".topleft").pop(),v=p?p.innerHTML:null,m=U("video",{width:a.width,height:a.height,poster:f.src},o);m.muted=!0,m.loop=!0,m.playsinline=!0,m.disablePictureInPicture=!0,m.controlsList&&(m.controlsList.add("nodownload"),m.controlsList.add("nofullscreen"),m.controlsList.add("noremoteplayback")),H(m,"contextmenu",(function(){return!1})),Y(m,{marginTop:f.style.marginTop||"",marginRight:f.style.marginRight||"",marginBottom:f.style.marginBottom||"",marginLeft:f.style.marginLeft||""}),d?d.parentNode.insertBefore(m,d.nextSibling):h.parentNode.insertBefore(m,h),H(m,"playing",(function(e){var t=s.getBoundingClientRect(),n=t.width/t.height,i=a.width/a.height;Y(m,i<n?{marginTop:"-"+50*(1/i-1/n)+"%",marginRight:null,marginBottom:"-"+50*(1/i-1/n)+"%",marginLeft:null}:{width:i/n*100+"%",marginTop:null,marginRight:"-"+50*(i/n-1)+"%",marginBottom:null,marginLeft:"-"+50*(i/n-1)+"%"})}));var g=[],w=null,b=null,x=null,k=function(){b&&X(b),p&&(p.innerHTML=v),w=null,b=null,x=null};if(H(m,"timeupdate",(function(e){if(!1!==k){var t=g.filter((function(e){return e.start<=m.currentTime&&m.currentTime<=e.end}));if(p&&(m.duration||m.currentTime>0)){var n=m.duration?Math.ceil(m.duration)-m.currentTime:m.currentTime,i=parseInt(n/3600),a=parseInt(n/60)%60,o=parseInt(n)%60;p.textContent=(0!=i?(i<10?"0"+i:i)+":":"")+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)}if(0==t.length)return b&&X(b),w=null,b=null,void(x=null);var r=t[0];w!==r&&(w=r,b||(x=U("div"),b=U("div",{class:"subtitle"},x),h.parentNode.insertBefore(b,h)),x.textContent=r.text.join("\n"))}})),a.tracks&&0!=a.tracks.length){ae(!1,null,a.tracks[0].url,(function(e){!1!==k&&e.split(/\r?\n\r?\n/).forEach((function(e){var t=null;e.split(/\r?\n/).forEach((function(e){if(null===t){var n=e.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2})\.([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2})\.([0-9]{2,3})/);if(!n)return;t={start:60*Number(n[1]||0)*60+60*Number(n[2])+Number(n[3])+Number("0."+n[4]),end:60*Number(n[6]||0)*60+60*Number(n[7])+Number(n[8])+Number("0."+n[9]),text:[]}}else 0!=e.trim().length&&t.text.push(e.trim())})),null!==t&&g.push(t)}))}),null,null,"text/vtt")}var M=function(){try{m.play()}catch(e){n&&n(),n=null}},C=null;n=function(){k&&k(),k=!1,C&&C.stopLoad(),X(m)},r?y((function(){n&&((C=dt(m,r))&&H(m,"play",(function(e){C.startLoad()})),M())})):M()}}else{var T=J(e,"blockquote[cite]>a[href]");0!=T.length&&(i=function(){var e=!1,t=new Image,n=console;if(Object.defineProperty(t,"id",{get:function(){e=!0}}),n.log("%cH",t),!e){var i=T.shift().parentNode,a=U("iframe",{width:0,height:0,src:i.getAttribute("cite"),sandbox:"",style:"display:none"});if("allow"in a&&"featurePolicy"in a){var o=a.featurePolicy.features();-1!=o.indexOf("autoplay")&&(a.allow=o.reduce((function(e,t){return e+t+" 'none';"}),""),q(i,a),setTimeout((function(){X(a)}),1e3))}}})}var A=setTimeout((function(){E(e,"teaser")||(z(e,"teaser",!0),ae(!1,void 0,t.notify),i&&i(),i=null)}),6e3),B=J(e,"a[href],button,label");pt=function(){n&&n(),n=null,clearTimeout(A),B.forEach((function(e){S(e,"click",pt)}));var e=pe.indexOf(pt);-1!=e&&delete pe[e]},B.forEach((function(e){H(e,"click",pt)})),pe.push(pt)}}}var gt=T((function(t){var n=null,i=[],a=(f.clientHeight||e.innerHeight)/2;J(f,"[data-teaser]").forEach((function(e){if(we(e)){var t=J(e,"h1,h2,h3"),o=(0!=t.length?t.shift():e).getBoundingClientRect(),r=o.bottom<a?a-o.bottom:o.top>a?o.top-a:0;!n&&o.top>=0&&(n=e),i.push([e,r])}})),n?mt(n):0!=i.length?(i.sort((function(e,t){return e[1]-t[1]})),mt(i.shift()[0])):mt()}),200,!0);function wt(t,n,i){var a=f.matches("html[dir=rtl]"),o=U("button"),r=U("div",{class:"nav-back lock"},o),l=U("button"),c=U("div",{class:"nav-next lock"},l),u=F(t,".overlay");u||(u=F(t,".frame")),u&&(J(u,".nav-back,.nav-next").forEach((function(e){X(e)})),q(u,[r,c]));var s=!1;function d(){i&&!s&&(ae(!1,null,i),s=!0)}function p(e,t){var i=t;a&&(t%2==0?i+=1:i-=1),e.innerHTML=i<n.length?n[i].html:"",q(e,U("var",null,j(i+1)))}var v=0,m=!1;function g(e){m=!0;var n=J(t,"div.page");if(4==n.length){var i=n[0],o=n[1];q(t,i),q(t,o),e?(p(i,v-2),p(o,v-1),v-=2):(p(i,v+2),p(o,v+3),v+=2);var l=parseInt(t.offsetWidth/2),u=parseInt(t.offsetHeight);Y(i,{clip:"rect(0,0,"+u+"px,0)"}),Y(o,{clip:"rect(0,0,"+u+"px,0)"}),Y(r,{zIndex:3}),Y(c,{zIndex:3}),x(400,(a?!e:e)?function(e){var t=parseInt(Math.round(e*(2*l)-l));t=Math.min(t,l);var n=parseInt(Math.round((1-e)*l));n=Math.max(n,0),Y(i,{left:0,right:"auto",clip:"rect(0,"+(l-n)+"px,"+u+"px,0)",zIndex:1}),Y(o,{left:t+"px",right:"auto",clip:"rect(0,"+l+"px,"+u+"px,"+n+"px)",zIndex:2})}:function(e){var t=parseInt(Math.round(2*l*(1-e)));t=Math.max(t,0);var n=parseInt(Math.round(e*l));n=Math.min(n,l);var a=t-l;Y(i,{left:t+"px",right:"auto",clip:"rect(0,"+n+"px,"+u+"px,0)",zIndex:2}),Y(o,{left:l+"px",right:"auto",clip:"rect(0,"+l+"px,"+u+"px,"+a+"px)",zIndex:1})},(function(){Y(i,{left:null,right:null,clip:null,zIndex:null}),Y(o,{left:null,right:null,clip:null,zIndex:null}),Y(r,{zIndex:null}),Y(c,{zIndex:null}),m=!1}))}}function w(){(a?v+3<=n.length:0!=v)?W(o,"disabled"):R(o,"disabled","disabled"),(a?0!=v:v+3<=n.length)?W(l,"disabled"):R(l,"disabled","disabled")}function y(){m||v<2||(g(!0),w(),d())}function b(){m||v+3>n.length||(g(!1),w(),d())}w(),H(o,"click",(function(e){B(e),this.blur(),y()})),H(l,"click",(function(e){B(e),this.blur(),b()})),z(t,"book",{back:y,next:b});var k=null;function M(t){t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]);if(k.idle&&Math.abs(t.pageX-k.x)>10&&(e.getSelection().toString()?k=null:k.idle(t)),k){var n=0;t.clientX||t.clientY?n=t.clientX:(t.pageX||t.pageY)&&(n=t.pageX-h.scrollLeft-f.scrollLeft);var i=n>k.pointerStartX?-1:1;k.dir=i}}function C(e){k&&(k.dir==(a?1:-1)?y():k.dir==(a?-1:1)&&b(),w()),S(f,["mousemove","touchmove"],M),S(f,["mouseup","touchend"],C),P(t,"drag"),k=null}H(t,["touchstart","mousedown"],(function(e){e.originalEvent&&e.originalEvent.touches&&(e=e.originalEvent.touches[0]),B(e),e.button&&2==e.button||(k={idle:function(e){k.idle=!1,L(t,"drag")},x:parseInt(e.pageX,10),dir:0,pointerStartX:parseInt(e.pageX,10),pointerStartY:parseInt(e.pageY,10)},H(f,["mousemove","touchmove"],M),H(f,["mouseup","touchend"],C))})),J(t,"div.page").forEach((function(t,i){H(t,"click",(function(t){B(t),this.blur();var a=v+i%2;a>=n.length&&(a-=1),function(t){var i=[];n.forEach((function(e){var t=U("div");Y(t,{width:"85vw",height:85/e.width*e.height+"vw"}),i.push(t)}));var a=Pe("pages",i,(function(){var e=Be.indexOf(a);-1!=e&&Be.splice(e,1)}));if(a){if(Be.push(a),H(a.overlay,"click",(function(e){B(e),this.blur(),a.close()})),0!=t&&t<i.length){var o=i[t].offsetTop;o&&a.modal.scroll(0,o-e.innerHeight/20)}var r=T((function(){var e=[];i.forEach((function(t){we(t)&&e.push(t)})),J(a.overlay,"iframe").forEach((function(t){var n=F(t,"div");-1==e.indexOf(n)&&X(t)})),e.forEach((function(e){if(!e.querySelector("iframe")){var t=i.indexOf(e);if(-1!=t){e.innerHTML=n[t].iframe;var a=e.offsetWidth/n[t].width;Y(e.querySelector("iframe"),{transform:"scale("+a+")",transformOrigin:"0 0"})}}}))}),50);H(a.modal,["scroll","resize","orientationchange"],r),r()}}(a),d()}))}))}te.push(gt),se("[data-book]",(function(e){var t=V(e,"data-book");t&&t.pages&&setTimeout((function(){wt(e,t.pages,t.notify)}))})),se("details,.details",(function(e){H(e,"click",(function(t){if(!D(e,"open")){var n=J(e,".toggle");if(0!=n.length){var i=!1;if(n.forEach((function(e){O(e,t.target)&&(i=!0)})),!i)return}B(t),this.blur();var a=e.offsetHeight;R(e,"open","open");var o=e.offsetHeight;if(a!=o)Y(e,{height:a+"px",overflow:"hidden"}),x(2*a>=o?150:5*a>=o?300:450,(function(t){Y(e,{height:(o-a)*t+a+"px"})}),(function(){Y(e,{height:null,overflow:null})}))}}))})),se("[data-social]",(function(e){var t=V(e,"data-social"),n=[{name:"Facebook",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M9.375 12.96v8.185h3.977V13h2.718l.657-3.395h-3.344V7.117c0-.344.183-.804.738-.804h1.938V2.854h-3.614c-1.246 0-3.082 1.536-3.082 3.168v3.489h-2.09v3.437zm0 0"/></svg>',url:"https://www.facebook.com/sharer.php?u=[url]&t=[title]"},{name:"Twitter",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21.145 6.328c-.676.297-1.395.5-2.157.594a3.765 3.765 0 001.649-2.078 7.498 7.498 0 01-2.38.91 3.758 3.758 0 00-2.741-1.184 3.751 3.751 0 00-3.653 4.606 10.64 10.64 0 01-7.73-3.918 3.747 3.747 0 001.16 5.008 3.72 3.72 0 01-1.7-.47v.048a3.759 3.759 0 003.009 3.68 3.84 3.84 0 01-1.695.063 3.759 3.759 0 003.507 2.604 7.522 7.522 0 01-4.66 1.606c-.3 0-.602-.016-.895-.05a10.624 10.624 0 005.75 1.683c6.903 0 10.676-5.715 10.676-10.672 0-.164-.004-.324-.012-.488a7.625 7.625 0 001.872-1.942"/></svg>',url:"https://twitter.com/intent/tweet?text=[title]&url=[url]&counturl=[url]&hashtags="},{name:"Reddit",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M6.57 13.355a1.357 1.357 0 102.716.005 1.357 1.357 0 00-2.716-.005zm8.145 0a1.357 1.357 0 102.714.005 1.357 1.357 0 00-2.714-.005zm.066 2.903a.802.802 0 011.13.133.807.807 0 01-.134 1.132c-.972.766-2.457 1.262-3.777 1.262-1.32 0-2.805-.496-3.777-1.262a.803.803 0 01-.133-1.132.802.802 0 011.129-.133c.562.441 1.672.918 2.781.918 1.11 0 2.219-.477 2.781-.918zm8.078-5.613c0-1.5-1.218-2.715-2.714-2.715-1.024 0-1.91.562-2.372 1.394-1.398-.761-3.097-1.254-4.949-1.37l1.621-3.638 3.098.895a2.04 2.04 0 001.922 1.36c1.125 0 2.035-.91 2.035-2.036 0-1.125-.91-2.035-2.035-2.035-.774 0-1.45.434-1.793 1.07l-3.453-.996a.805.805 0 00-.961.446l-2.2 4.94c-1.808.13-3.464.618-4.828 1.364a2.716 2.716 0 00-5.09 1.316c0 1.11.669 2.063 1.622 2.485a5.08 5.08 0 00-.262 1.59C2.5 18.46 6.754 21.5 12 21.5s9.5-3.04 9.5-6.785c0-.547-.09-1.082-.262-1.59a2.713 2.713 0 001.621-2.48zm-3.394-6.872a.764.764 0 11-.004 1.528.764.764 0 01.004-1.528zM2.5 10.645c0-.75.61-1.36 1.355-1.36.543 0 1.012.32 1.227.777-.707.54-1.297 1.16-1.73 1.84-.5-.199-.852-.691-.852-1.257zM12 19.89c-4.355 0-7.89-2.32-7.89-5.176 0-2.86 3.535-5.176 7.89-5.176 4.355 0 7.89 2.316 7.89 5.176 0 2.855-3.535 5.176-7.89 5.176zm8.648-7.989c-.433-.68-1.023-1.3-1.73-1.84a1.356 1.356 0 111.73 1.84zm0 0"/><path d="M9.285 13.355a1.357 1.357 0 11-2.714.005 1.357 1.357 0 012.714-.005zm0 0M14.781 16.258c-.562.441-1.672.918-2.781.918-1.11 0-2.219-.477-2.781-.918a.802.802 0 00-1.13.133.803.803 0 00.134 1.132c.972.766 2.457 1.262 3.777 1.262 1.32 0 2.805-.496 3.777-1.262a.807.807 0 00.133-1.132.802.802 0 00-1.129-.133zm0 0M17.43 13.355a1.357 1.357 0 11-2.716.005 1.357 1.357 0 012.716-.005zm0 0"/><path d="M22.86 10.645c0-1.5-1.22-2.715-2.715-2.715-1.024 0-1.91.562-2.372 1.394-1.398-.761-3.097-1.254-4.949-1.37l1.621-3.638 3.098.895a2.04 2.04 0 001.922 1.36c1.125 0 2.035-.91 2.035-2.036 0-1.125-.91-2.035-2.035-2.035-.774 0-1.45.434-1.793 1.07l-3.453-.996a.805.805 0 00-.961.446l-2.2 4.94c-1.808.13-3.464.618-4.828 1.364a2.715 2.715 0 00-5.085 1.317c0 1.109.664 2.062 1.617 2.484a5.08 5.08 0 00-.262 1.59C2.5 18.46 6.754 21.5 12 21.5s9.5-3.04 9.5-6.785c0-.547-.09-1.082-.262-1.59a2.713 2.713 0 001.621-2.48zm-3.395-6.872a.764.764 0 11-.004 1.528.764.764 0 01.004-1.528zM2.5 10.645c0-.75.61-1.36 1.355-1.36.543 0 1.012.32 1.227.777-.707.54-1.297 1.16-1.73 1.84-.5-.199-.852-.691-.852-1.257zM12 19.89c-4.355 0-7.89-2.32-7.89-5.176 0-2.86 3.535-5.176 7.89-5.176 4.355 0 7.89 2.316 7.89 5.176 0 2.855-3.535 5.176-7.89 5.176zm8.648-7.989c-.433-.68-1.023-1.3-1.73-1.84a1.356 1.356 0 111.73 1.84zm0 0"/></svg>',url:"https://www.reddit.com/submit?url=[url]&title=[title]"},{name:"VK",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21.047 16.203a1.494 1.494 0 00-.063-.117c-.32-.57-.925-1.273-1.82-2.106l-.027-.027-.008-.012h-.012c-.406-.386-.664-.644-.773-.777-.196-.254-.239-.512-.133-.773.078-.196.363-.61.86-1.246.257-.336.464-.606.616-.81 1.098-1.46 1.575-2.394 1.43-2.8l-.058-.094c-.036-.058-.137-.109-.293-.16a1.523 1.523 0 00-.61-.023l-2.742.02a.398.398 0 00-.191.003l-.125.032-.047.023-.04.027a.413.413 0 00-.105.102.756.756 0 00-.093.168 15.26 15.26 0 01-1.02 2.14c-.234.395-.45.735-.645 1.024-.199.289-.363.5-.496.637a3.194 3.194 0 01-.363.328c-.105.082-.187.117-.246.105a1.604 1.604 0 01-.16-.039.583.583 0 01-.215-.23 1.04 1.04 0 01-.11-.371 4.277 4.277 0 01-.035-.387c-.003-.11 0-.262.004-.457.008-.195.012-.332.012-.403 0-.238.004-.5.016-.785.008-.28.015-.504.023-.672.004-.164.008-.335.008-.523a2.39 2.39 0 00-.031-.43 1.641 1.641 0 00-.102-.304.517.517 0 00-.195-.23 1.054 1.054 0 00-.32-.13 6.573 6.573 0 00-1.286-.125c-1.18-.011-1.937.067-2.273.23-.133.071-.254.165-.363.286-.114.14-.13.215-.047.23.379.055.648.192.808.407l.059.117c.043.082.086.226.133.437.043.207.07.442.086.696.03.46.03.859 0 1.187-.035.332-.063.59-.09.774a1.55 1.55 0 01-.133.445 1.51 1.51 0 01-.113.21.257.257 0 01-.047.048.718.718 0 01-.258.047c-.09 0-.195-.043-.32-.133a2.245 2.245 0 01-.399-.367 5.222 5.222 0 01-.46-.653c-.172-.277-.348-.61-.532-.988l-.152-.277c-.098-.176-.227-.438-.395-.778a15.984 15.984 0 01-.437-.984.63.63 0 00-.227-.305l-.047-.027a.836.836 0 00-.152-.082 1.4 1.4 0 00-.219-.063l-2.61.02c-.265 0-.448.062-.542.183l-.04.055a.386.386 0 00-.027.156c0 .07.02.157.06.258a32.996 32.996 0 002.41 4.598c.327.508.663.984 1.007 1.437.344.45.57.739.68.867.113.126.199.22.261.286l.239.226c.152.153.379.336.672.547.296.215.62.422.98.629.36.207.777.375 1.254.504.473.133.937.183 1.387.156h1.097c.223-.015.391-.086.504-.207l.04-.047a.942.942 0 00.105-.438 3.11 3.11 0 01.058-.738c.047-.218.102-.386.164-.496a1.3 1.3 0 01.204-.28.819.819 0 01.164-.138c.03-.015.054-.027.074-.035.152-.05.332 0 .539.149.207.148.398.332.582.554.18.22.394.465.652.735.254.273.473.476.664.61l.192.112c.125.079.293.149.492.211.203.063.383.078.535.047l2.438-.035c.242 0 .43-.039.562-.121.133-.078.211-.164.238-.262a.815.815 0 00.004-.324 1.578 1.578 0 00-.066-.254zm0 0"/></svg>',url:"https://vk.com/share.php?url=[url]"},{name:"Weibo",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M17.113 12.074c-.297-.09-.504-.152-.347-.554.34-.868.375-1.618.007-2.153-.691-1.004-2.578-.953-4.742-.027 0-.004-.68.3-.508-.246.336-1.09.282-2.004-.234-2.531-1.176-1.196-4.297.042-6.976 2.773-2.004 2.039-3.168 4.203-3.168 6.074 0 3.578 4.507 5.973 8.917 5.973 5.782 0 9.633-3.637 9.633-6.352 0-1.64-1.36-2.57-2.582-2.957zm-7.039 7.703c-3.52.352-6.558-1.25-6.785-3.574-.23-2.32 2.438-4.488 5.961-4.84 3.52-.351 6.559 1.25 6.785 3.575.227 2.324-2.437 4.492-5.96 4.84zm0 0M22.86 9.16a6.55 6.55 0 00-6.547-6.543.764.764 0 100 1.527 5.017 5.017 0 015.015 5.02c0 .422.344.762.766.762.422 0 .765-.34.765-.762V9.16zm0 0"/><path d="M19.82 9.047a4.367 4.367 0 00-3.394-3.395.762.762 0 00-.903.594.762.762 0 00.594.902 2.835 2.835 0 012.207 2.207.764.764 0 001.496-.308zm0 0M8.27 13.64c-1.418.286-2.375 1.473-2.137 2.657.238 1.18 1.578 1.906 2.996 1.621 1.418-.285 2.375-1.473 2.137-2.656-.239-1.18-1.579-1.907-2.996-1.621zm0 0"/></svg>',url:"https://service.weibo.com/share/share.php?url=[url]"},{name:"LinkedIn",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M6.996 4.938c0 1.082-.797 1.957-2.105 1.957-1.239 0-2.036-.875-2.036-1.957 0-1.106.825-1.954 2.086-1.954 1.258 0 2.032.848 2.055 1.954m-4.035 3.5h3.91v12.578h-3.91zm6.25 4.011c0-1.566-.055-2.879-.106-4.011H12.5l.18 1.75h.078c.515-.825 1.773-2.032 3.883-2.032 2.574 0 4.5 1.723 4.5 5.426v7.434h-3.907v-6.97c0-1.62-.566-2.73-1.98-2.73-1.082 0-1.723.746-2.008 1.47-.101.253-.129.616-.129.976v7.254h-3.91v-8.567zm0 0"/></svg>',url:"https://www.linkedin.com/shareArticle?mini=true&title=[title]&url=[url]"},{name:"Tumblr",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.14 10.86v4.18c0 1.058-.011 1.67.102 1.972.11.3.39.61.695.789.407.242.868.363 1.387.363.926 0 1.473-.121 2.387-.723v2.75c-.777.368-1.461.582-2.094.73a9.228 9.228 0 01-2.055.224 5.603 5.603 0 01-1.972-.317 4.823 4.823 0 01-1.64-.902c-.458-.395-.77-.809-.946-1.25-.176-.438-.262-1.078-.262-1.914v-6.41H6.29v-2.59c.715-.235 1.52-.57 2.031-1.004.512-.438.922-.961 1.235-1.57.308-.61.523-1.387.64-2.333h2.946V7.43h4.57v3.425zm0 0"/></svg>',url:"https://www.tumblr.com/share/link?url=[url]&title=[title]"},{name:"Pinterest",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18.984 2.46C17.332.876 15.047 0 12.547 0 8.73 0 6.383 1.566 5.086 2.879 3.484 4.496 2.57 6.645 2.57 8.773c0 2.668 1.118 4.72 2.989 5.485.125.05.25.074.375.074.394 0 .707-.258.816-.672.063-.238.207-.824.273-1.078.137-.504.024-.746-.273-1.094-.54-.64-.793-1.398-.793-2.383 0-2.93 2.18-6.039 6.223-6.039 3.203 0 5.195 1.82 5.195 4.754 0 1.852-.398 3.567-1.125 4.828-.5.875-1.387 1.922-2.742 1.922-.59 0-1.117-.242-1.45-.664-.316-.398-.417-.91-.292-1.445.144-.606.34-1.238.527-1.848.344-1.113.668-2.164.668-3.004 0-1.437-.883-2.402-2.195-2.402-1.668 0-2.977 1.695-2.977 3.86 0 1.062.281 1.859.41 2.163-.21.891-1.46 6.188-1.699 7.188-.137.582-.96 5.187.406 5.555 1.535.414 2.907-4.075 3.047-4.578.113-.415.508-1.973.754-2.93.738.71 1.934 1.195 3.094 1.195 2.191 0 4.16-.984 5.547-2.773 1.343-1.735 2.082-4.157 2.082-6.813 0-2.074-.89-4.12-2.446-5.613zm0 0"/></svg>',url:"https://pinterest.com/pin/create/bookmarklet/?is_video=false&url=[url]&media=&description=[title]"}].map((function(e){var n=U("a",{href:e.url.replace(/\[url\]/g,encodeURIComponent(t.url)).replace(/\[title\]/g,encodeURIComponent(t.text)),target:"_blank"},e.icon+e.name);return J(n,"svg").forEach((function(e){L(e,"icon")})),U("li",void 0,n)})),i=U("ul",void 0,n);e.parentNode.insertBefore(i,e.nextSibling)})),se("nav>ul>li.unread>a",(function(e){H(e,"click",(function(){var t=F(e,"li");P(t,"unread"),J(t,"small").forEach((function(e){X(e)}))}))})),se("[data-embed]",(function(e){var t=N(e,"data-embed");if(t){var n=F(e,"form"),i=e.querySelector("input[type=checkbox]"),a=n.querySelector("textarea");i&&a&&(H(i,"change",(function(){var e=a.value;a.value=t,t=e})),H(a,"click",(function(){this.blur(),this.focus(),this.select()})))}})),se("[data-translate]",(function(e){var t=V(e,"data-translate"),n=null;H(e,"click",(function(i){if(B(i),this.blur(),null===n){n=[];var a,o,r,l=F(e,"section[id^=post-]"),u=F(e,"section[id^=share-]"),s=F(e,"section[id^=posting-]"),f=F(e,"section[id^=texting-]");if("post"in t)if(l){var h;J(l,"blockquote").forEach((function(e){h=h||e})),h&&(r=$(h,"div.richtext")),J(h||l,"h2").forEach((function(e){var t=J(e,"a");a=a||(0!=t.length?t[0]:e)})),J(h||l,"h2~div.richtext").forEach((function(e){o=o||e})),!r&&a&&(r=$(a,"div.richtext"))}else{if(!(m=F(e,"div")))return;var d=$(m,"article");if(d)J(d,"h1").forEach((function(e){var t=J(e,"a");a=a||(0!=t.length?t[0]:e)})),J(d,"h1~div.articletext").forEach((function(e){o=o||e}));else{var p=$(m,"h2,h3");if(p){var v=J(p,"a");a=0!=v.length?v[0]:p,o=_(p,"div.richtext")}}}else if("share"in t){if(u)J(u,"div.richtext").forEach((function(e){o=o||e}));else if(l){if(!(m=F(e,"div")))return;o=_(m,"div.richtext")}}else if("posting"in t){if(s)J(s,"div.richtext").forEach((function(e){o=o||e}));else if(l){var m;if(!(m=F(e,"div")))return;o=_(m,"div.richtext")}}else"texting"in t&&f&&J(f,"div.richtext").forEach((function(e){o=o||e}));var g=new FormData,w={},y=function(e){var t;return J(e,"details>summary+*,.details>.summary+*").forEach((function(e){t=e})),(t||e).innerHTML};if(a&&a.textContent&&(g.append("title",y(a)),w.title=a),o&&o.textContent&&(g.append("text",y(o)),w.text=o),r&&r.textContent&&(g.append("comment",y(r)),w.comment=r),0!=w.length){for(var b in w)w.hasOwnProperty(b)&&Y(w[b],{color:"#888"});var k=t;Array.isArray(k.target)&&(k.target=k.target.join(",")),c&&!("synchronizer"in k)&&(k.synchronizer=c),ae(!0,g,ne(k,"/translate"),(function(e){Object.keys(w).forEach((function(t){var i=w[t];t in e&&e[t]?(n.push({element:i,detached:Q(i)}),i.innerHTML=e[t],x(1e3,(function(e){function t(e,t,n,i){var a=(1-n)*e+n*t;return i?a:Math.round(a)}Y(i,{color:"rgb("+t(170,0,e)+","+t(170,0,e)+","+t(170,0,e)+")",backgroundColor:"rgba(0,0,0,"+t(.05,0,e,!0)+")"})}),(function(){Y(i,{color:null,backgroundColor:null})}))):Y(i,{color:null})}))}),null,null,"application/json")}}else for(var M=0;M<n.length;++M){var C=n[M].element,E=n[M].detached;n[M].detached=Q(C),q(C,E)}}))})),"chrome"in e&&!("wakeLock"in d)&&se("use",(function(e,t){t&&e.parentNode.replaceChild(e.cloneNode(),e)})),("ActiveXObject"in e||(d.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(d.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537)&&se("svg",(function(e){var t=e.querySelector("use");if(t){var n=U("img",{src:"/icon/"+t.getAttribute("xlink:href").replace(/.*#/,""),width:"24",height:"24",class:e.getAttribute("class")});e.parentNode.replaceChild(n,e)}})),fe(f),nt(u),c&&"WebSocket"in e&&2===e.WebSocket.CLOSING&&rt(),y()}));
