lorgg-v2-components 0.0.140 → 0.0.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -872,7 +872,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
872
872
|
content: "" !important;
|
|
873
873
|
display: none !important;
|
|
874
874
|
}`,Qee=function(e){Lee(e,"."+Qh+Uee+k2+`
|
|
875
|
-
.`+Lh+Dee+k2)},Lee=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},ok=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Oee=function(){function e(t,n){this.context=t,this._options=n,this._cache={}}return e.prototype.addImage=function(t){var n=Promise.resolve();return this.has(t)||(Jf(t)||Hee(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),n},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return rn(this,void 0,void 0,function(){var n,r,a,i,s=this;return zt(this,function(o){switch(o.label){case 0:return n=ok.isSameOrigin(t),r=!Xf(t)&&this._options.useCORS===!0&&Vt.SUPPORT_CORS_IMAGES&&!n,a=!Xf(t)&&!n&&!Jf(t)&&typeof this._options.proxy=="string"&&Vt.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!Xf(t)&&!Jf(t)&&!a&&!r?[2]:(i=t,a?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,c){var u=new Image;u.onload=function(){return l(u)},u.onerror=c,(Ree(i)||r)&&(u.crossOrigin="anonymous"),u.src=i,u.complete===!0&&setTimeout(function(){return l(u)},500),s._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var a=t.substring(0,256);return new Promise(function(i,s){var o=Vt.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(o==="text")i(l.response);else{var d=new FileReader;d.addEventListener("load",function(){return i(d.result)},!1),d.addEventListener("error",function(f){return s(f)},!1),d.readAsDataURL(l.response)}else s("Failed to proxy resource "+a+" with status code "+l.status)},l.onerror=s;var c=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+c+"url="+encodeURIComponent(t)+"&responseType="+o),o!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=o),n._options.imageTimeout){var u=n._options.imageTimeout;l.timeout=u,l.ontimeout=function(){return s("Timed out ("+u+"ms) proxying "+a)}}l.send()})},e}(),Mee=/^data:image\/svg\+xml/i,Nee=/^data:image\/.*;base64,/i,Pee=/^data:image\/.*/i,Hee=function(e){return Vt.SUPPORT_SVG_DRAWING||!Vee(e)},Xf=function(e){return Pee.test(e)},Ree=function(e){return Nee.test(e)},Jf=function(e){return e.substr(0,4)==="blob"},Vee=function(e){return e.substr(-3).toLowerCase()==="svg"||Mee.test(e)},q=function(){function e(t,n){this.type=0,this.x=t,this.y=n}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),us=function(e,t,n){return new q(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Ec=function(){function e(t,n,r,a){this.type=1,this.start=t,this.startControl=n,this.endControl=r,this.end=a}return e.prototype.subdivide=function(t,n){var r=us(this.start,this.startControl,t),a=us(this.startControl,this.endControl,t),i=us(this.endControl,this.end,t),s=us(r,a,t),o=us(a,i,t),l=us(s,o,t);return n?new e(this.start,r,s,l):new e(l,o,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Hn=function(e){return e.type===1},Kee=function(){function e(t){var n=t.styles,r=t.bounds,a=PA(n.borderTopLeftRadius,r.width,r.height),i=a[0],s=a[1],o=PA(n.borderTopRightRadius,r.width,r.height),l=o[0],c=o[1],u=PA(n.borderBottomRightRadius,r.width,r.height),d=u[0],f=u[1],p=PA(n.borderBottomLeftRadius,r.width,r.height),h=p[0],m=p[1],B=[];B.push((i+l)/r.width),B.push((h+d)/r.width),B.push((s+m)/r.height),B.push((c+f)/r.height);var g=Math.max.apply(Math,B);g>1&&(i/=g,s/=g,l/=g,c/=g,d/=g,f/=g,h/=g,m/=g);var v=r.width-l,_=r.height-f,y=r.width-d,w=r.height-m,b=n.borderTopWidth,C=n.borderRightWidth,E=n.borderBottomWidth,S=n.borderLeftWidth,D=Xe(n.paddingTop,t.bounds.width),T=Xe(n.paddingRight,t.bounds.width),F=Xe(n.paddingBottom,t.bounds.width),U=Xe(n.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?ct(r.left+S/3,r.top+b/3,i-S/3,s-b/3,Ve.TOP_LEFT):new q(r.left+S/3,r.top+b/3),this.topRightBorderDoubleOuterBox=i>0||s>0?ct(r.left+v,r.top+b/3,l-C/3,c-b/3,Ve.TOP_RIGHT):new q(r.left+r.width-C/3,r.top+b/3),this.bottomRightBorderDoubleOuterBox=d>0||f>0?ct(r.left+y,r.top+_,d-C/3,f-E/3,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C/3,r.top+r.height-E/3),this.bottomLeftBorderDoubleOuterBox=h>0||m>0?ct(r.left+S/3,r.top+w,h-S/3,m-E/3,Ve.BOTTOM_LEFT):new q(r.left+S/3,r.top+r.height-E/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?ct(r.left+S*2/3,r.top+b*2/3,i-S*2/3,s-b*2/3,Ve.TOP_LEFT):new q(r.left+S*2/3,r.top+b*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?ct(r.left+v,r.top+b*2/3,l-C*2/3,c-b*2/3,Ve.TOP_RIGHT):new q(r.left+r.width-C*2/3,r.top+b*2/3),this.bottomRightBorderDoubleInnerBox=d>0||f>0?ct(r.left+y,r.top+_,d-C*2/3,f-E*2/3,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C*2/3,r.top+r.height-E*2/3),this.bottomLeftBorderDoubleInnerBox=h>0||m>0?ct(r.left+S*2/3,r.top+w,h-S*2/3,m-E*2/3,Ve.BOTTOM_LEFT):new q(r.left+S*2/3,r.top+r.height-E*2/3),this.topLeftBorderStroke=i>0||s>0?ct(r.left+S/2,r.top+b/2,i-S/2,s-b/2,Ve.TOP_LEFT):new q(r.left+S/2,r.top+b/2),this.topRightBorderStroke=i>0||s>0?ct(r.left+v,r.top+b/2,l-C/2,c-b/2,Ve.TOP_RIGHT):new q(r.left+r.width-C/2,r.top+b/2),this.bottomRightBorderStroke=d>0||f>0?ct(r.left+y,r.top+_,d-C/2,f-E/2,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C/2,r.top+r.height-E/2),this.bottomLeftBorderStroke=h>0||m>0?ct(r.left+S/2,r.top+w,h-S/2,m-E/2,Ve.BOTTOM_LEFT):new q(r.left+S/2,r.top+r.height-E/2),this.topLeftBorderBox=i>0||s>0?ct(r.left,r.top,i,s,Ve.TOP_LEFT):new q(r.left,r.top),this.topRightBorderBox=l>0||c>0?ct(r.left+v,r.top,l,c,Ve.TOP_RIGHT):new q(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||f>0?ct(r.left+y,r.top+_,d,f,Ve.BOTTOM_RIGHT):new q(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=h>0||m>0?ct(r.left,r.top+w,h,m,Ve.BOTTOM_LEFT):new q(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||s>0?ct(r.left+S,r.top+b,Math.max(0,i-S),Math.max(0,s-b),Ve.TOP_LEFT):new q(r.left+S,r.top+b),this.topRightPaddingBox=l>0||c>0?ct(r.left+Math.min(v,r.width-C),r.top+b,v>r.width+C?0:Math.max(0,l-C),Math.max(0,c-b),Ve.TOP_RIGHT):new q(r.left+r.width-C,r.top+b),this.bottomRightPaddingBox=d>0||f>0?ct(r.left+Math.min(y,r.width-S),r.top+Math.min(_,r.height-E),Math.max(0,d-C),Math.max(0,f-E),Ve.BOTTOM_RIGHT):new q(r.left+r.width-C,r.top+r.height-E),this.bottomLeftPaddingBox=h>0||m>0?ct(r.left+S,r.top+Math.min(w,r.height-E),Math.max(0,h-S),Math.max(0,m-E),Ve.BOTTOM_LEFT):new q(r.left+S,r.top+r.height-E),this.topLeftContentBox=i>0||s>0?ct(r.left+S+U,r.top+b+D,Math.max(0,i-(S+U)),Math.max(0,s-(b+D)),Ve.TOP_LEFT):new q(r.left+S+U,r.top+b+D),this.topRightContentBox=l>0||c>0?ct(r.left+Math.min(v,r.width+S+U),r.top+b+D,v>r.width+S+U?0:l-S+U,c-(b+D),Ve.TOP_RIGHT):new q(r.left+r.width-(C+T),r.top+b+D),this.bottomRightContentBox=d>0||f>0?ct(r.left+Math.min(y,r.width-(S+U)),r.top+Math.min(_,r.height+b+D),Math.max(0,d-(C+T)),f-(E+F),Ve.BOTTOM_RIGHT):new q(r.left+r.width-(C+T),r.top+r.height-(E+F)),this.bottomLeftContentBox=h>0||m>0?ct(r.left+S+U,r.top+w,Math.max(0,h-(S+U)),m-(E+F),Ve.BOTTOM_LEFT):new q(r.left+S+U,r.top+r.height-(E+F))}return e}(),Ve;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Ve||(Ve={}));var ct=function(e,t,n,r,a){var i=4*((Math.sqrt(2)-1)/3),s=n*i,o=r*i,l=e+n,c=t+r;switch(a){case Ve.TOP_LEFT:return new Ec(new q(e,c),new q(e,c-o),new q(l-s,t),new q(l,t));case Ve.TOP_RIGHT:return new Ec(new q(e,t),new q(e+s,t),new q(l,c-o),new q(l,c));case Ve.BOTTOM_RIGHT:return new Ec(new q(l,t),new q(l,t+o),new q(e+s,c),new q(e,c));case Ve.BOTTOM_LEFT:default:return new Ec(new q(l,c),new q(l-s,c),new q(e,t+o),new q(e,t))}},Lu=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},$ee=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Ou=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},zee=function(){function e(t,n,r){this.offsetX=t,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return e}(),Sc=function(){function e(t,n){this.path=t,this.target=n,this.type=1}return e}(),Wee=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),Gee=function(e){return e.type===0},lk=function(e){return e.type===1},jee=function(e){return e.type===2},E2=function(e,t){return e.length===t.length?e.some(function(n,r){return n===t[r]}):!1},Yee=function(e,t,n,r,a){return e.map(function(i,s){switch(s){case 0:return i.add(t,n);case 1:return i.add(t+r,n);case 2:return i.add(t+r,n+a);case 3:return i.add(t,n+a)}return i})},ck=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),uk=function(){function e(t,n){if(this.container=t,this.parent=n,this.effects=[],this.curves=new Kee(this.container),this.container.styles.opacity<1&&this.effects.push(new Wee(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,a=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new zee(r,a,i))}if(this.container.styles.overflowX!==0){var s=Lu(this.curves),o=Ou(this.curves);E2(s,o)?this.effects.push(new Sc(s,6)):(this.effects.push(new Sc(s,2)),this.effects.push(new Sc(o,4)))}}return e.prototype.getEffects=function(t){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,a=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!lk(l)});if(n||r.container.styles.position!==0||!r.parent){if(a.unshift.apply(a,i),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var s=Lu(r.curves),o=Ou(r.curves);E2(s,o)||a.unshift(new Sc(o,6))}}else a.unshift.apply(a,i);r=r.parent}return a.filter(function(l){return Ut(l.target,t)})},e}(),Oh=function(e,t,n,r){e.container.elements.forEach(function(a){var i=Ut(a.flags,4),s=Ut(a.flags,2),o=new uk(a,e);Ut(a.styles.display,2048)&&r.push(o);var l=Ut(a.flags,8)?[]:r;if(i||s){var c=i||a.styles.isPositioned()?n:t,u=new ck(o);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var d=a.styles.zIndex.order;if(d<0){var f=0;c.negativeZIndex.some(function(h,m){return d>h.element.container.styles.zIndex.order?(f=m,!1):f>0}),c.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;c.positiveZIndex.some(function(h,m){return d>=h.element.container.styles.zIndex.order?(p=m+1,!1):p>0}),c.positiveZIndex.splice(p,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else a.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);Oh(o,u,i?u:n,l)}else a.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),Oh(o,t,n,l);Ut(a.flags,8)&&dk(a,l)})},dk=function(e,t){for(var n=e instanceof Th?e.start:1,r=e instanceof Th?e.reversed:!1,a=0;a<t.length;a++){var i=t[a];i.container instanceof Y4&&typeof i.container.value=="number"&&i.container.value!==0&&(n=i.container.value),i.listValue=Ro(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},qee=function(e){var t=new uk(e,null),n=new ck(t),r=[];return Oh(t,n,n,r),dk(t.container,r),n},S2=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Vn(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Vn(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return Vn(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Xee=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Vn(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Vn(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return Vn(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Jee=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Vn(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Vn(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return Vn(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Zee=function(e,t){switch(t){case 0:return xc(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return xc(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return xc(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return xc(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},xc=function(e,t){var n=[];return Hn(e)?n.push(e.subdivide(.5,!1)):n.push(e),Hn(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},Vn=function(e,t,n,r){var a=[];return Hn(e)?a.push(e.subdivide(.5,!1)):a.push(e),Hn(n)?a.push(n.subdivide(.5,!0)):a.push(n),Hn(r)?a.push(r.subdivide(.5,!0).reverse()):a.push(r),Hn(t)?a.push(t.subdivide(.5,!1).reverse()):a.push(t),a},fk=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Mu=function(e){var t=e.styles,n=e.bounds,r=Xe(t.paddingLeft,n.width),a=Xe(t.paddingRight,n.width),i=Xe(t.paddingTop,n.width),s=Xe(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,i+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+a),-(t.borderTopWidth+t.borderBottomWidth+i+s))},ete=function(e,t){return e===0?t.bounds:e===2?Mu(t):fk(t)},tte=function(e,t){return e===0?t.bounds:e===2?Mu(t):fk(t)},Zf=function(e,t,n){var r=ete(gs(e.styles.backgroundOrigin,t),e),a=tte(gs(e.styles.backgroundClip,t),e),i=nte(gs(e.styles.backgroundSize,t),n,r),s=i[0],o=i[1],l=PA(gs(e.styles.backgroundPosition,t),r.width-s,r.height-o),c=rte(gs(e.styles.backgroundRepeat,t),l,i,r,a),u=Math.round(r.left+l[0]),d=Math.round(r.top+l[1]);return[c,u,d,s,o]},ds=function(e){return We(e)&&e.value===Fs.AUTO},Fc=function(e){return typeof e=="number"},nte=function(e,t,n){var r=t[0],a=t[1],i=t[2],s=e[0],o=e[1];if(!s)return[0,0];if(St(s)&&o&&St(o))return[Xe(s,n.width),Xe(o,n.height)];var l=Fc(i);if(We(s)&&(s.value===Fs.CONTAIN||s.value===Fs.COVER)){if(Fc(i)){var c=n.width/n.height;return c<i!=(s.value===Fs.COVER)?[n.width,n.width/i]:[n.height*i,n.height]}return[n.width,n.height]}var u=Fc(r),d=Fc(a),f=u||d;if(ds(s)&&(!o||ds(o))){if(u&&d)return[r,a];if(!l&&!f)return[n.width,n.height];if(f&&l){var p=u?r:a*i,h=d?a:r/i;return[p,h]}var m=u?r:n.width,B=d?a:n.height;return[m,B]}if(l){var g=0,v=0;return St(s)?g=Xe(s,n.width):St(o)&&(v=Xe(o,n.height)),ds(s)?g=v*i:(!o||ds(o))&&(v=g/i),[g,v]}var _=null,y=null;if(St(s)?_=Xe(s,n.width):o&&St(o)&&(y=Xe(o,n.height)),_!==null&&(!o||ds(o))&&(y=u&&d?_/r*a:n.height),y!==null&&ds(s)&&(_=u&&d?y/a*r:n.width),_!==null&&y!==null)return[_,y];throw new Error("Unable to calculate background-size for element")},gs=function(e,t){var n=e[t];return typeof n>"u"?e[0]:n},rte=function(e,t,n,r,a){var i=t[0],s=t[1],o=n[0],l=n[1];switch(e){case 2:return[new q(Math.round(r.left),Math.round(r.top+s)),new q(Math.round(r.left+r.width),Math.round(r.top+s)),new q(Math.round(r.left+r.width),Math.round(l+r.top+s)),new q(Math.round(r.left),Math.round(l+r.top+s))];case 3:return[new q(Math.round(r.left+i),Math.round(r.top)),new q(Math.round(r.left+i+o),Math.round(r.top)),new q(Math.round(r.left+i+o),Math.round(r.height+r.top)),new q(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new q(Math.round(r.left+i),Math.round(r.top+s)),new q(Math.round(r.left+i+o),Math.round(r.top+s)),new q(Math.round(r.left+i+o),Math.round(r.top+s+l)),new q(Math.round(r.left+i),Math.round(r.top+s+l))];default:return[new q(Math.round(a.left),Math.round(a.top)),new q(Math.round(a.left+a.width),Math.round(a.top)),new q(Math.round(a.left+a.width),Math.round(a.height+a.top)),new q(Math.round(a.left),Math.round(a.height+a.top))]}},ate="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",x2="Hidden Text",ite=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,n){var r=this._document.createElement("div"),a=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",s.appendChild(r),a.src=ate,a.width=1,a.height=1,a.style.margin="0",a.style.padding="0",a.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(x2)),r.appendChild(i),r.appendChild(a);var o=a.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(x2)),r.style.lineHeight="normal",a.style.verticalAlign="super";var l=a.offsetTop-r.offsetTop+2;return s.removeChild(r),{baseline:o,middle:l}},e.prototype.getMetrics=function(t,n){var r=t+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,n)),this._data[r]},e}(),pk=function(){function e(t,n){this.context=t,this.options=n}return e}(),ste=1e4,Ate=function(e){ir(t,e);function t(n,r){var a=e.call(this,n,r)||this;return a._activeEffects=[],a.canvas=r.canvas?r.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),r.canvas||(a.canvas.width=Math.floor(r.width*r.scale),a.canvas.height=Math.floor(r.height*r.scale),a.canvas.style.width=r.width+"px",a.canvas.style.height=r.height+"px"),a.fontMetrics=new ite(document),a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-r.x,-r.y),a.ctx.textBaseline="bottom",a._activeEffects=[],a.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),a}return t.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(a){return r.applyEffect(a)})},t.prototype.applyEffect=function(n){this.ctx.save(),jee(n)&&(this.ctx.globalAlpha=n.opacity),Gee(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),lk(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(n){return rn(this,void 0,void 0,function(){var r;return zt(this,function(a){switch(a.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(n){return rn(this,void 0,void 0,function(){return zt(this,function(r){switch(r.label){case 0:if(Ut(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(n,r,a){var i=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+a);else{var s=jm(n.text);s.reduce(function(o,l){return i.ctx.fillText(l,o,n.bounds.top+a),o+i.ctx.measureText(l).width},n.bounds.left)}},t.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),a=dte(n.fontFamily).join(", "),i=yl(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,a].join(" "),a,i]},t.prototype.renderTextNode=function(n,r){return rn(this,void 0,void 0,function(){var a,i,s,o,l,c,u,d,f=this;return zt(this,function(p){return a=this.createFontStyle(r),i=a[0],s=a[1],o=a[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(s,o),c=l.baseline,u=l.middle,d=r.paintOrder,n.textBounds.forEach(function(h){d.forEach(function(m){switch(m){case 0:f.ctx.fillStyle=Mt(r.color),f.renderTextWithLetterSpacing(h,r.letterSpacing,c);var B=r.textShadow;B.length&&h.text.trim().length&&(B.slice(0).reverse().forEach(function(g){f.ctx.shadowColor=Mt(g.color),f.ctx.shadowOffsetX=g.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=g.offsetY.number*f.options.scale,f.ctx.shadowBlur=g.blur.number,f.renderTextWithLetterSpacing(h,r.letterSpacing,c)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=Mt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(g){switch(g){case 1:f.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top+c),h.bounds.width,1);break;case 2:f.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top),h.bounds.width,1);break;case 3:f.ctx.fillRect(h.bounds.left,Math.ceil(h.bounds.top+u),h.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&h.text.trim().length&&(f.ctx.strokeStyle=Mt(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(h.text,h.bounds.left,h.bounds.top+c)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(n,r,a){if(a&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var i=Mu(n),s=Ou(r);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(a,0,0,n.intrinsicWidth,n.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l,v,v,c,u,d,f,y,p,h,w,m,B,g,v,_,y,w;return zt(this,function(b){switch(b.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,a=n.curves,i=r.styles,s=0,o=r.textNodes,b.label=1;case 1:return s<o.length?(l=o[s],[4,this.renderTextNode(l,i)]):[3,4];case 2:b.sent(),b.label=3;case 3:return s++,[3,1];case 4:if(!(r instanceof W4))return[3,8];b.label=5;case 5:return b.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return v=b.sent(),this.renderReplacedElement(r,a,v),[3,8];case 7:return b.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof G4&&this.renderReplacedElement(r,a,r.canvas),!(r instanceof j4))return[3,12];b.label=9;case 9:return b.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return v=b.sent(),this.renderReplacedElement(r,a,v),[3,12];case 11:return b.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof J4&&r.tree?(c=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,c.render(r.tree)]):[3,14];case 13:u=b.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),b.label=14;case 14:if(r instanceof Ym&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new q(r.bounds.left+d*.39363,r.bounds.top+d*.79),new q(r.bounds.left+d*.16,r.bounds.top+d*.5549),new q(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new q(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new q(r.bounds.left+d*.72983,r.bounds.top+d*.23),new q(r.bounds.left+d*.84,r.bounds.top+d*.34085),new q(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=Mt(h2),this.ctx.fill(),this.ctx.restore()):r.type===Uu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=Mt(h2),this.ctx.fill(),this.ctx.restore())),ote(r)&&r.value.length){switch(f=this.createFontStyle(i),y=f[0],p=f[1],h=this.fontMetrics.getMetrics(y,p).baseline,this.ctx.font=y,this.ctx.fillStyle=Mt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=cte(r.styles.textAlign),w=Mu(r),m=0,r.styles.textAlign){case 1:m+=w.width/2;break;case 2:m+=w.width;break}B=w.add(m,0,0,-w.height/2+1),this.ctx.save(),this.path([new q(w.left,w.top),new q(w.left+w.width,w.top),new q(w.left+w.width,w.top+w.height),new q(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new uo(r.value,B),i.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ut(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(g=r.styles.listStyleImage,g.type!==0)return[3,18];v=void 0,_=g.url,b.label=15;case 15:return b.trys.push([15,17,,18]),[4,this.context.cache.match(_)];case 16:return v=b.sent(),this.ctx.drawImage(v,r.bounds.left-(v.width+10),r.bounds.top),[3,18];case 17:return b.sent(),this.context.logger.error("Error loading list-style-image "+_),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=Mt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new Aa(r.bounds.left,r.bounds.top+Xe(r.styles.paddingTop,r.bounds.width),r.bounds.width,JB(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new uo(n.listValue,w),i.letterSpacing,JB(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),b.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(n){return rn(this,void 0,void 0,function(){var r,a,g,i,s,g,o,l,g,c,u,g,d,f,g,p,h,g,m,B,g;return zt(this,function(v){switch(v.label){case 0:if(Ut(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:v.sent(),r=0,a=n.negativeZIndex,v.label=2;case 2:return r<a.length?(g=a[r],[4,this.renderStack(g)]):[3,5];case 3:v.sent(),v.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:v.sent(),i=0,s=n.nonInlineLevel,v.label=7;case 7:return i<s.length?(g=s[i],[4,this.renderNode(g)]):[3,10];case 8:v.sent(),v.label=9;case 9:return i++,[3,7];case 10:o=0,l=n.nonPositionedFloats,v.label=11;case 11:return o<l.length?(g=l[o],[4,this.renderStack(g)]):[3,14];case 12:v.sent(),v.label=13;case 13:return o++,[3,11];case 14:c=0,u=n.nonPositionedInlineLevel,v.label=15;case 15:return c<u.length?(g=u[c],[4,this.renderStack(g)]):[3,18];case 16:v.sent(),v.label=17;case 17:return c++,[3,15];case 18:d=0,f=n.inlineLevel,v.label=19;case 19:return d<f.length?(g=f[d],[4,this.renderNode(g)]):[3,22];case 20:v.sent(),v.label=21;case 21:return d++,[3,19];case 22:p=0,h=n.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return p<h.length?(g=h[p],[4,this.renderStack(g)]):[3,26];case 24:v.sent(),v.label=25;case 25:return p++,[3,23];case 26:m=0,B=n.positiveZIndex,v.label=27;case 27:return m<B.length?(g=B[m],[4,this.renderStack(g)]):[3,30];case 28:v.sent(),v.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},t.prototype.formatPath=function(n){var r=this;n.forEach(function(a,i){var s=Hn(a)?a.start:a;i===0?r.ctx.moveTo(s.x,s.y):r.ctx.lineTo(s.x,s.y),Hn(a)&&r.ctx.bezierCurveTo(a.startControl.x,a.startControl.y,a.endControl.x,a.endControl.y,a.end.x,a.end.y)})},t.prototype.renderRepeat=function(n,r,a,i){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(a,i),this.ctx.fill(),this.ctx.translate(-a,-i)},t.prototype.resizeImage=function(n,r,a){var i;if(n.width===r&&n.height===a)return n;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,o=s.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,a);var l=o.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,a),o},t.prototype.renderBackgroundImage=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l;return zt(this,function(c){switch(c.label){case 0:r=n.styles.backgroundImage.length-1,a=function(u){var d,f,p,D,j,K,U,Y,E,h,D,j,K,U,Y,m,B,g,v,_,y,w,b,C,E,S,D,T,F,U,Y,X,j,K,oe,$,ie,ce,me,Ee,fe,re;return zt(this,function(N){switch(N.label){case 0:if(u.type!==0)return[3,5];d=void 0,f=u.url,N.label=1;case 1:return N.trys.push([1,3,,4]),[4,i.context.cache.match(f)];case 2:return d=N.sent(),[3,4];case 3:return N.sent(),i.context.logger.error("Error loading background-image "+f),[3,4];case 4:return d&&(p=Zf(n,r,[d.width,d.height,d.width/d.height]),D=p[0],j=p[1],K=p[2],U=p[3],Y=p[4],E=i.ctx.createPattern(i.resizeImage(d,U,Y),"repeat"),i.renderRepeat(D,E,j,K)),[3,6];case 5:GX(u)?(h=Zf(n,r,[null,null,null]),D=h[0],j=h[1],K=h[2],U=h[3],Y=h[4],m=VX(u.angle,U,Y),B=m[0],g=m[1],v=m[2],_=m[3],y=m[4],w=document.createElement("canvas"),w.width=U,w.height=Y,b=w.getContext("2d"),C=b.createLinearGradient(g,_,v,y),qB(u.stops,B).forEach(function(ne){return C.addColorStop(ne.stop,Mt(ne.color))}),b.fillStyle=C,b.fillRect(0,0,U,Y),U>0&&Y>0&&(E=i.ctx.createPattern(w,"repeat"),i.renderRepeat(D,E,j,K))):jX(u)&&(S=Zf(n,r,[null,null,null]),D=S[0],T=S[1],F=S[2],U=S[3],Y=S[4],X=u.position.length===0?[zm]:u.position,j=Xe(X[0],U),K=Xe(X[X.length-1],Y),oe=KX(u,j,K,U,Y),$=oe[0],ie=oe[1],$>0&&ie>0&&(ce=i.ctx.createRadialGradient(T+j,F+K,0,T+j,F+K,$),qB(u.stops,$*2).forEach(function(ne){return ce.addColorStop(ne.stop,Mt(ne.color))}),i.path(D),i.ctx.fillStyle=ce,$!==ie?(me=n.bounds.left+.5*n.bounds.width,Ee=n.bounds.top+.5*n.bounds.height,fe=ie/$,re=1/fe,i.ctx.save(),i.ctx.translate(me,Ee),i.ctx.transform(1,0,0,fe,0,0),i.ctx.translate(-me,-Ee),i.ctx.fillRect(T,re*(F-Ee)+Ee,U,Y*re),i.ctx.restore()):i.ctx.fill())),N.label=6;case 6:return r--,[2]}})},i=this,s=0,o=n.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return s<o.length?(l=o[s],[5,a(l)]):[3,4];case 2:c.sent(),c.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(n,r,a){return rn(this,void 0,void 0,function(){return zt(this,function(i){return this.path(S2(a,r)),this.ctx.fillStyle=Mt(n),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(n,r,a,i){return rn(this,void 0,void 0,function(){var s,o;return zt(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,a,i)]:[3,2];case 1:return l.sent(),[2];case 2:return s=Xee(i,a),this.path(s),this.ctx.fillStyle=Mt(n),this.ctx.fill(),o=Jee(i,a),this.path(o),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l,c,u,d=this;return zt(this,function(f){switch(f.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,a=!Ra(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],s=lte(gs(r.backgroundClip,0),n.curves),a||r.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Ra(r.backgroundColor)||(this.ctx.fillStyle=Mt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(p){d.ctx.save();var h=Lu(n.curves),m=p.inset?0:ste,B=Yee(h,-m+(p.inset?1:-1)*p.spread.number,(p.inset?1:-1)*p.spread.number,p.spread.number*(p.inset?-2:2),p.spread.number*(p.inset?-2:2));p.inset?(d.path(h),d.ctx.clip(),d.mask(B)):(d.mask(h),d.ctx.clip(),d.path(B)),d.ctx.shadowOffsetX=p.offsetX.number+m,d.ctx.shadowOffsetY=p.offsetY.number,d.ctx.shadowColor=Mt(p.color),d.ctx.shadowBlur=p.blur.number,d.ctx.fillStyle=p.inset?Mt(p.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),f.label=2;case 2:o=0,l=0,c=i,f.label=3;case 3:return l<c.length?(u=c[l],u.style!==0&&!Ra(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,n.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,n.curves,3)];case 6:return f.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,n.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,n.curves)];case 10:f.sent(),f.label=11;case 11:o++,f.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(n,r,a,i,s){return rn(this,void 0,void 0,function(){var o,l,c,u,d,f,p,h,m,B,g,v,_,y,w,b,w,b;return zt(this,function(C){return this.ctx.save(),o=Zee(i,a),l=S2(i,a),s===2&&(this.path(l),this.ctx.clip()),Hn(l[0])?(c=l[0].start.x,u=l[0].start.y):(c=l[0].x,u=l[0].y),Hn(l[1])?(d=l[1].end.x,f=l[1].end.y):(d=l[1].x,f=l[1].y),a===0||a===2?p=Math.abs(c-d):p=Math.abs(u-f),this.ctx.beginPath(),s===3?this.formatPath(o):this.formatPath(l.slice(0,2)),h=r<3?r*3:r*2,m=r<3?r*2:r,s===3&&(h=r,m=r),B=!0,p<=h*2?B=!1:p<=h*2+m?(g=p/(2*h+m),h*=g,m*=g):(v=Math.floor((p+m)/(h+m)),_=(p-v*h)/(v-1),y=(p-(v+1)*h)/v,m=y<=0||Math.abs(m-_)<Math.abs(m-y)?_:y),B&&(s===3?this.ctx.setLineDash([0,h+m]):this.ctx.setLineDash([h,m])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Mt(n),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Hn(l[0])&&(w=l[3],b=l[0],this.ctx.beginPath(),this.formatPath([new q(w.end.x,w.end.y),new q(b.start.x,b.start.y)]),this.ctx.stroke()),Hn(l[1])&&(w=l[1],b=l[2],this.ctx.beginPath(),this.formatPath([new q(w.end.x,w.end.y),new q(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(n){return rn(this,void 0,void 0,function(){var r;return zt(this,function(a){switch(a.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Mt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=qee(n),[4,this.renderStack(r)];case 1:return a.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(pk),ote=function(e){return e instanceof X4||e instanceof q4?!0:e instanceof Ym&&e.type!==Uu&&e.type!==Tu},lte=function(e,t){switch(e){case 0:return Lu(t);case 2:return $ee(t);case 1:default:return Ou(t)}},cte=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},ute=["-apple-system","system-ui"],dte=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(t){return ute.indexOf(t)===-1}):e},fte=function(e){ir(t,e);function t(n,r){var a=e.call(this,n,r)||this;return a.canvas=r.canvas?r.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),a.options=r,a.canvas.width=Math.floor(r.width*r.scale),a.canvas.height=Math.floor(r.height*r.scale),a.canvas.style.width=r.width+"px",a.canvas.style.height=r.height+"px",a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-r.x,-r.y),a.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),a}return t.prototype.render=function(n){return rn(this,void 0,void 0,function(){var r,a;return zt(this,function(i){switch(i.label){case 0:return r=Ih(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,pte(r)];case 1:return a=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Mt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(a,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(pk),pte=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},hte=function(){function e(t){var n=t.id,r=t.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ac([this.id,this.getTime()+"ms"],t))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.instances={},e}(),gte=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new hte({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new Oee(this,t)}return e.instanceCount=1,e}(),mte=function(e,t){return t===void 0&&(t={}),vte(e,t)};typeof window<"u"&&ok.setContext(window);var vte=function(e,t){return rn(void 0,void 0,void 0,function(){var n,r,a,i,s,o,l,c,u,d,f,p,h,m,B,g,v,_,y,w,C,b,C,E,S,D,T,F,U,Y,X,j,K,oe,$,ie,ce,me,Ee,fe;return zt(this,function(re){switch(re.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return a={allowTaint:(E=t.allowTaint)!==null&&E!==void 0?E:!1,imageTimeout:(S=t.imageTimeout)!==null&&S!==void 0?S:15e3,proxy:t.proxy,useCORS:(D=t.useCORS)!==null&&D!==void 0?D:!1},i=hh({logging:(T=t.logging)!==null&&T!==void 0?T:!0,cache:t.cache},a),s={windowWidth:(F=t.windowWidth)!==null&&F!==void 0?F:r.innerWidth,windowHeight:(U=t.windowHeight)!==null&&U!==void 0?U:r.innerHeight,scrollX:(Y=t.scrollX)!==null&&Y!==void 0?Y:r.pageXOffset,scrollY:(X=t.scrollY)!==null&&X!==void 0?X:r.pageYOffset},o=new Aa(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),l=new gte(i,o),c=(j=t.foreignObjectRendering)!==null&&j!==void 0?j:!1,u={allowTaint:(K=t.allowTaint)!==null&&K!==void 0?K:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:c,copyStyles:c},l.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new C2(l,e,u),f=d.clonedReferenceElement,f?[4,d.toIFrame(n,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return p=re.sent(),h=qm(f)||yee(f)?YY(f.ownerDocument):Dd(l,f),m=h.width,B=h.height,g=h.left,v=h.top,_=yte(l,f,t.backgroundColor),y={canvas:t.canvas,backgroundColor:_,scale:($=(oe=t.scale)!==null&&oe!==void 0?oe:r.devicePixelRatio)!==null&&$!==void 0?$:1,x:((ie=t.x)!==null&&ie!==void 0?ie:0)+g,y:((ce=t.y)!==null&&ce!==void 0?ce:0)+v,width:(me=t.width)!==null&&me!==void 0?me:Math.ceil(m),height:(Ee=t.height)!==null&&Ee!==void 0?Ee:Math.ceil(B)},c?(l.logger.debug("Document cloned, using foreign object rendering"),C=new fte(l,y),[4,C.render(f)]):[3,3];case 2:return w=re.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+g+","+v+" with size "+m+"x"+B+" using computed rendering"),l.logger.debug("Starting DOM parsing"),b=ek(l,f),_===b.styles.backgroundColor&&(b.styles.backgroundColor=ea.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),C=new Ate(l,y),[4,C.render(b)];case 4:w=re.sent(),re.label=5;case 5:return(!((fe=t.removeContainer)!==null&&fe!==void 0)||fe)&&(C2.destroy(p)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,w]}})})},yte=function(e,t,n){var r=t.ownerDocument,a=r.documentElement?lo(e,getComputedStyle(r.documentElement).backgroundColor):ea.TRANSPARENT,i=r.body?lo(e,getComputedStyle(r.body).backgroundColor):ea.TRANSPARENT,s=typeof n=="string"?lo(e,n):n===null?ea.TRANSPARENT:4294967295;return t===r.documentElement?Ra(a)?Ra(i)?s:i:a:s};const Bte=A.defineComponent({__name:"CaptureButton",props:jY,setup(e){const t=e,{t:n}=Z(),r=A.ref(null);A.onMounted(()=>{et(r.value,{content:n("general.captureImage"),arrow:!0})});function a(){console.log(t.element.tagName),mte(t.element,{imageTimeout:1e4,allowTaint:!0,foreignObjectRendering:!0}).then(l=>{console.log(l),i(l.toDataURL(),"file-name.png")})}function i(l,c){const u=document.createElement("a");typeof u.download!="string"?window.open(l):(u.href=l,u.download=c,o(s,u))}function s(l){l.click()}function o(l,c){document.body.appendChild(c),l(c),document.body.removeChild(c)}return(l,c)=>(A.openBlock(),A.createElementBlock("div",null,[A.createElementVNode("button",{ref_key:"button",ref:r,class:"circle-button",onClick:a},[A.createVNode(A.unref(Se),{icon:"camera"})],512)]))}});const wte=M(Bte,[["__scopeId","data-v-4b809ad3"]]),bte={class:"deck-preview no-scrollbar"},_te={class:"top"},Cte={class:"top-left"},kte={key:1,class:"buttons"},Ete={class:"buttons no-scrollbar"},Ste=A.defineComponent({__name:"DeckPreview",props:GY,emits:["click:save","click:share","click:edit-name","click:update-privacy","click:delete"],setup(e,{emit:t}){const n=e,{t:r}=Z(),a=A.ref(),i=A.ref(n.deckName??Hh(n.deckCode)),s=A.ref(!1),o=A.computed(()=>n.deck?n.deck:kt(n.deckCode)),l=A.computed(()=>n.cards?n.cards:Xt(o.value)),c=A.computed(()=>{var f;const d=(f=ta(l.value,o.value,1)[0])==null?void 0:f.cardCode;return{"--deck-summary-background":`url(${_e().callbacks.cardImageCallback(d??"",yt.Full)})`}});function u(){console.log(n.deckCode),t("click:save",{deckName:i.value,deckCode:n.deckCode,isPrivate:s.value})}return(d,f)=>(A.openBlock(),A.createElementBlock("div",bte,[A.createElementVNode("div",_te,[A.createElementVNode("div",Cte,[n.isSaving?A.withDirectives((A.openBlock(),A.createElementBlock("input",{key:0,class:"deck-name","onUpdate:modelValue":f[0]||(f[0]=p=>i.value=p)},null,512)),[[A.vModelText,i.value]]):(A.openBlock(),A.createElementBlock("div",kte,[A.createVNode(wte,{element:a.value},null,8,["element"])]))]),A.createElementVNode("div",Ete,[A.createVNode(AA,A.mergeProps(n.deckButtonsProps,{"onClick:updatePrivacy":f[1]||(f[1]=p=>t("click:update-privacy")),"onClick:editName":f[2]||(f[2]=p=>t("click:edit-name")),"onClick:delete":f[3]||(f[3]=p=>t("click:delete")),"onClick:share":f[4]||(f[4]=p=>t("click:share"))}),null,16),n.isSaving?(A.openBlock(),A.createElementBlock("div",{key:0,class:"fancy-button",onClick:u},A.toDisplayString(A.unref(r)("general.save")),1)):A.createCommentVNode("",!0)])]),A.createElementVNode("div",{class:"deck-summary-wrapper",style:A.normalizeStyle(c.value),ref_key:"deckSummary",ref:a},[A.createVNode(Fd,{deck:o.value},null,8,["deck"])],4)]))}});const Bl=M(Ste,[["__scopeId","data-v-7cd2b0e1"]]),xte={cards:{type:Array,required:!1},deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},Fte={class:"deck-highlight-eye"},Ite=A.defineComponent({__name:"DeckHighlightEye",props:xte,setup(e){const t=e,n=A.ref(null),r=A.ref(null),a=A.ref(!1),i=A.ref(!1),s=A.computed(()=>t.deck?t.deck:kt(t.deckCode)),o=A.computed(()=>t.cards?t.cards:Xt(s.value));A.onMounted(()=>{var c;et((c=r.value)==null?void 0:c.$el,{content:n.value,arrow:!0,duration:0,maxWidth:"90vw",touch:!1,onShow(){a.value=!0},onCreate(u){o.value.length<1||u.popper.style.setProperty("--tippy-background",`url(${_e().callbacks.cardImageCallback(ta(o.value,s.value,1)[0].cardCode??"",yt.Full)})`)}})});function l(){i.value=!0}return(c,u)=>(A.openBlock(),A.createElementBlock("div",Fte,[A.createVNode(A.unref(Se),{ref_key:"eyeIcon",ref:r,icon:"eye",class:"icon",onClick:l},null,512),A.createElementVNode("div",{ref_key:"deckSummary",ref:n,class:"deck-summary-wrapper"},[a.value?(A.openBlock(),A.createBlock(Fd,{key:0,class:"deck-summary",deck:s.value,"cards-prop":o.value},null,8,["deck","cards-prop"])):A.createCommentVNode("",!0)],512),A.createVNode(ai,{"show-modal":i.value,"onUpdate:showModal":u[0]||(u[0]=d=>i.value=d)},{default:A.withCtx(()=>[A.createVNode(Bl,{cards:o.value,deck:s.value,"deck-code":t.deckCode,"deck-buttons-props":t.deckButtonsProps},null,8,["cards","deck","deck-code","deck-buttons-props"])]),_:1},8,["show-modal"])]))}});const Kd=M(Ite,[["__scopeId","data-v-a655bad6"]]),Tte={cards:{type:Array,required:!1},deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},showEye:{type:Boolean,required:!1,default:!0},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},Ute=A.defineComponent({__name:"DeckHighlight",props:Tte,setup(e){const t=e,n=A.computed(()=>t.deck?t.deck:kt(t.deckCode)),r=A.computed(()=>t.cards?t.cards:Xt(n.value)),a=A.computed(()=>Pu(r.value)),i=A.computed(()=>r.value.filter(s=>Ds(s)));return(s,o)=>(A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(["deck-highlight",t.showEye?"":"hide-eye"])},[A.createVNode(Zo,{class:"deck-highlight-regions",regions:a.value},null,8,["regions"]),A.createVNode(el,{class:"deck-highlight-cards",cards:i.value,regions:a.value},null,8,["cards","regions"]),A.createVNode(Kd,{class:"deck-highlight-eye",cards:r.value,deck:n.value,"deck-code":t.deckCode,"deck-buttons-props":t.deckButtonsProps},null,8,["cards","deck","deck-code","deck-buttons-props"])],2))}});const ei=M(Ute,[["__scopeId","data-v-02c48ced"]]),Dte={cardCodes:{type:Array,required:!0,default:[]},regions:{type:Array,required:!0,default:[]},filters:{type:Object,required:!0,default:{sampleSizeFilters:[],serverFilters:[],timeFilters:[]}}},hk=A.defineComponent({__name:"ArchetypeSidePanel",props:Dte,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=A.reactive(n.filters);A.watch(r,()=>{t("update:filters",r)});function a(){for(const[,i]of Object.entries(r))i.splice(0)}return(i,s)=>(A.openBlock(),A.createBlock(eA,{"filter-object":n.filters,"onClear:filterObject":a},{default:A.withCtx(()=>[A.createVNode(td,{"card-codes":n.cardCodes,regions:n.regions},null,8,["card-codes","regions"]),A.createVNode(Js,{"filter-array":r.sampleSizeFilters,"onUpdate:filterArray":s[0]||(s[0]=o=>r.sampleSizeFilters=o)},null,8,["filter-array"]),A.createVNode(zi,{"filter-array":r.timeFilters,"onUpdate:filterArray":s[1]||(s[1]=o=>r.timeFilters=o)},null,8,["filter-array"]),A.createVNode(Zs,{"filter-array":r.serverFilters,"onUpdate:filterArray":s[2]||(s[2]=o=>r.serverFilters=o)},null,8,["filter-array"])]),_:1},8,["filter-object"]))}});const Qte={},Lte={class:"social-links"},Ote={href:"https://discord.gg/tGTSXgDFVU"},Mte={href:"https://twitter.com/LORGG__"};function Nte(e,t){const n=A.resolveComponent("FontAwesomeIcon");return A.openBlock(),A.createElementBlock("div",Lte,[A.createElementVNode("a",Ote,[A.createVNode(n,{icon:["fab","discord"],class:"social-icon"})]),A.createElementVNode("a",Mte,[A.createVNode(n,{icon:["fab","twitter"],class:"social-icon"})])])}const gk=M(Qte,[["render",Nte],["__scopeId","data-v-9de6c1ad"]]),Pte={routerLink:{type:Object,required:!0,default:"404"},archetypeRouterLink:{type:Object,required:!1,default:"404"},deckBuilderRouterLink:{type:Object,required:!0,default:"404"},showOwnerButtons:{type:Boolean,required:!1,default:!1},type:{type:String,required:!0,default:"data"},deckCode:{type:String,required:!0,default:""},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!1,default:1},wins:{type:Number,required:!1,default:1},comparedDeckCode:{type:String,required:!1,default:""},isPrivate:{type:Boolean,required:!1,default:!1},id:{type:Number,required:!1,default:1},name:{type:String,required:!1,default:""},updatedAt:{type:Number,required:!1,default:1},createdAt:{type:Number,required:!1,default:1}},Hte={...Cb,difference:{type:Number,required:!0,default:1}},Rte={class:"deck-difference-item"},Vte=A.defineComponent({__name:"DeckDifferenceItem",props:Hte,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",Rte,[A.createVNode(la,{"card-code-prop":t.cardCodeProp,"card-prop":t.cardProp,regions:t.regions,"ignore-card-item":t.ignoreCardItem,"router-link":t.routerLink},null,8,["card-code-prop","card-prop","regions","ignore-card-item","router-link"]),A.createElementVNode("div",{class:A.normalizeClass(["difference",t.difference>0?"positive":"negative"])},A.toDisplayString(`${t.difference>0?"+":""}${t.difference}`),3)]))}});const Xm=M(Vte,[["__scopeId","data-v-cdadc542"]]),Kte={differences:{type:Array,required:!0,default:[]}},$te={class:"deck-differences no-scrollbar"},zte=A.defineComponent({__name:"DeckDifferences",props:Kte,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",$te,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(t.differences,a=>(A.openBlock(),A.createBlock(Xm,{key:a.cardCodeProp,"card-code-prop":a.cardCodeProp,"card-prop":a.cardProp,difference:a.difference,"ignore-card-item":a.ignoreCardItem,regions:a.regions,"router-link":a.routerLink},null,8,["card-code-prop","card-prop","difference","ignore-card-item","regions","router-link"]))),128))]))}});const Jm=M(zte,[["__scopeId","data-v-e4cddaa9"]]),Wte=e=>(A.pushScopeId("data-v-145f94e2"),e=e(),A.popScopeId(),e),Gte={class:"table-card-row-background-wrapper"},jte={class:"table-card-row-background"},Yte=Wte(()=>A.createElementVNode("div",{class:"background-card"},null,-1)),qte=[Yte],Xte={class:"decks-row wrapper"},Jte={class:"column-content"},Zte={class:"column-content"},ene={class:"column-content"},tne={class:"column-content"},nne={key:2,class:"column-content"},rne={class:"column-content cost"},ane={key:3,class:"column-content deck-differences-column"},ine=A.defineComponent({__name:"DecksRow",props:Pte,setup(e){const t=e,n=A.inject(ti),r=A.ref(!1),a=A.computed(()=>kt(t.deckCode)),i=A.computed(()=>Xt(a.value)),s=A.computed(()=>ta(i.value,a.value,2).map(c=>_e().callbacks.cardImageCallback(c.cardCode,yt.Banner))),o=A.computed(()=>({showButtons:{deleteDeck:t.type==="built"?t.showOwnerButtons:!1,updateDeckPrivacy:t.type==="built"?t.showOwnerButtons:!1,editDeckName:t.type==="built"?t.showOwnerButtons:!1,gemsCost:!1,openArchetypePage:t.type!=="built",simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.type==="built"?void 0:t.archetypeRouterLink,deckId:t.type==="built"?t.id:void 0,deckName:t.type==="built"?t.name:void 0,isPrivate:t.type==="built"?t.isPrivate:void 0})),l=A.computed(()=>{const c=[];if(t.type!=="similar")return c;const u=kt(t.comparedDeckCode);for(const[d,f]of Object.entries(a.value))f!==u[d]&&c.push({cardCodeProp:d,difference:f-(u[d]??0),ignoreCardItem:!1,routerLink:_e().callbacks.cardCodeRouterLinkCallback(d)});for(const[d,f]of Object.entries(u))f===a.value[d]||c.some(p=>p.cardCodeProp===d)||c.push({cardCodeProp:d,difference:(a.value[d]??0)-f,ignoreCardItem:!1,routerLink:_e().callbacks.cardCodeRouterLinkCallback(d)});return c});return(c,u)=>{const d=A.resolveComponent("RouterLink");return A.openBlock(),A.createBlock(d,{to:t.routerLink,class:"wrapper"},{default:A.withCtx(()=>{var f;return[A.createElementVNode("div",{class:"decks-row-wrapper wrapper",style:A.normalizeStyle({"--index":t.index})},[A.createElementVNode("div",Gte,[A.createElementVNode("div",jte,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(s.value,p=>(A.openBlock(),A.createElementBlock("div",{key:p,class:"background-card-wrapper",style:A.normalizeStyle({"--background-image":`url(${p})`})},qte,4))),128))])]),A.createElementVNode("div",Xte,[A.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:u[0]||(u[0]=A.withModifiers(()=>{},["stop","prevent"]))},[A.createVNode(ei,{"deck-code":t.deckCode,deck:a.value,cards:i.value,"deck-buttons-props":{...o.value,showButtons:{...o.value.showButtons,gemsCost:!0,shareDeck:!0}}},null,8,["deck-code","deck","cards","deck-buttons-props"])]),t.type==="data"||t.type==="similar"?(A.openBlock(),A.createElementBlock(A.Fragment,{key:0},[A.createElementVNode("div",Jte,A.toDisplayString(A.unref(Qe)(t.matches)),1),A.createElementVNode("div",{class:"column-content",style:A.normalizeStyle({color:`var(${A.unref(er)(t.wins/t.matches)})`})},A.toDisplayString(A.unref(Qe)(t.wins/t.matches*100,1,3))+"% ",5)],64)):t.type==="built"?(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[A.createElementVNode("div",Zte,A.toDisplayString(t.name),1),A.createElementVNode("div",ene,A.toDisplayString(A.unref(n)(t.updatedAt).fromNow()),1),A.createElementVNode("div",tne,A.toDisplayString(A.unref(n)(t.createdAt).fromNow()),1)],64)):A.createCommentVNode("",!0),t.type!=="similar"?(A.openBlock(),A.createElementBlock("div",nne,[A.createVNode(gl,{class:"mana-curve-chart","deck-code":t.deckCode,"padding-top":0,"show-data-labels":!1,"data-labels-offset":0,"tooltips-enabled":!1,"display-x-scale":!1,animation:!1},null,8,["deck-code"])])):A.createCommentVNode("",!0),A.createElementVNode("div",rne,A.toDisplayString((f=A.unref(Xc)(a.value,!0)??A.unref(Xc)(a.value,!1))==null?void 0:f.toLocaleString()),1),t.type==="similar"?(A.openBlock(),A.createElementBlock("div",ane,[A.createVNode(Jm,{differences:l.value},null,8,["differences"])])):A.createCommentVNode("",!0),A.createElementVNode("div",{class:A.normalizeClass(["column-content options-button",r.value?"show":"hide"]),onClick:u[2]||(u[2]=A.withModifiers(p=>r.value=!r.value,["stop","prevent"]))},[A.createVNode(AA,A.mergeProps({onClick:u[1]||(u[1]=A.withModifiers(()=>{},["stop","prevent"])),class:"deck-buttons"},o.value),null,16),A.createVNode(A.unref(Se),{icon:"ellipsis-v"})],2)])],4)]}),_:1},8,["to"])}}});const wl=M(ine,[["__scopeId","data-v-145f94e2"]]),sne={},Ane={class:"icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 172 172"},one=A.createStaticVNode('<g fill="none" stroke-miterlimit="10" style="mix-blend-mode:normal;"><g stroke="var(--color-primary-2)" stroke-width="20" stroke-linejoin="round"><path d="M86 157.277c-39.302 0-71.277-31.975-71.277-71.277S46.698 14.723 86 14.723 157.277 46.698 157.277 86 125.302 157.277 86 157.277z" fill="var(--color-primary)" stroke-width="17.92"></path><path d="M86 16.65C47.761 16.65 16.65 47.76 16.65 86c0 38.239 31.111 69.35 69.35 69.35 38.239 0 69.35-31.111 69.35-69.35 0-38.239-31.111-69.35-69.35-69.35m0-3.853c40.427 0 73.203 32.776 73.203 73.203S126.427 159.203 86 159.203 12.797 126.427 12.797 86 45.573 12.797 86 12.797z" fill="var(--color-primary)" stroke-width="17.92"></path><path d="M93.706 55.178a7.706 7.706 0 1 1-15.412 0 7.706 7.706 0 0 1 15.412 0zM97.558 120.675v3.853H74.442v-3.853h3.852v-42.38h-3.852v-3.853h19.264v46.233z" fill="var(--color-primary-2)" stroke-width="17.92"></path></g><path d="M8.944 163.056V8.944h154.112v154.112z"></path><g stroke-width="1" stroke-linejoin="miter"><path d="M86 157.277c-39.302 0-71.277-31.975-71.277-71.277S46.698 14.723 86 14.723 157.277 46.698 157.277 86 125.302 157.277 86 157.277z" fill="var(--color-background-1)"></path><path d="M86 16.65c38.239 0 69.35 31.111 69.35 69.35 0 38.239-31.111 69.35-69.35 69.35-38.239 0-69.35-31.111-69.35-69.35 0-38.239 31.111-69.35 69.35-69.35m0-3.853c-40.427 0-73.203 32.776-73.203 73.203S45.573 159.203 86 159.203 159.203 126.427 159.203 86 126.427 12.797 86 12.797z" fill="var(--color-background-1)"></path><path d="M86 47.472a7.706 7.706 0 1 0 0 15.411 7.706 7.706 0 0 0 0-15.411zM93.706 120.675V74.442H74.442v3.852h3.852v42.381h-3.852v3.853h23.116v-3.853z" fill="var(--color-primary-2)"></path></g></g>',1),lne=[one];function cne(e,t){return A.openBlock(),A.createElementBlock("svg",Ane,lne)}const Zm=M(sne,[["render",cne]]),une={...hb,routerLink:{type:Object,required:!0,default:{path:"/404"}}},dne={class:"card-item-link-wrapper"},fne={key:0,class:"card-item-wrapper"},pne={key:1,class:"card-item-wrapper"},hne={class:"link-icon"},gne=A.defineComponent({__name:"CardItemLinkWrapper",props:une,setup(e){const t=e;return(n,r)=>{const a=A.resolveComponent("RouterLink");return A.openBlock(),A.createElementBlock("div",dne,[n.isDeckBuilder?(A.openBlock(),A.createElementBlock("div",pne,[A.createVNode(Ga,A.normalizeProps(A.guardReactiveProps(t)),null,16),A.createVNode(a,{class:"link-icon-link",to:t.routerLink},{default:A.withCtx(()=>[A.createElementVNode("div",hne,[A.createVNode(Zm)])]),_:1},8,["to"])])):(A.openBlock(),A.createElementBlock("div",fne,[A.createVNode(a,{to:t.routerLink},{default:A.withCtx(()=>[A.createVNode(Ga,A.normalizeProps(A.guardReactiveProps(t)),null,16)]),_:1},8,["to"])]))])}}});const e1=M(gne,[["__scopeId","data-v-89823586"]]),mne={name:{type:String,required:!0,default:""}},vne={class:"profile-dropdown-wrapper"},yne=A.defineComponent({__name:"ProfileDropdown",props:mne,setup(e){const t=e,n=A.ref(),r=A.ref();return A.onMounted(()=>{et(n.value,{content:r.value,arrow:!0,interactive:!0,interactiveBorder:10})}),(a,i)=>(A.openBlock(),A.createElementBlock("div",vne,[A.createElementVNode("div",{ref_key:"profile",ref:n,class:"profile-dropdown"},A.toDisplayString(t.name),513),A.createElementVNode("div",{ref_key:"dropdown",ref:r,class:"slider-wrapper"},"Test",512)]))}});const t1=M(yne,[["__scopeId","data-v-1c516824"]]),Bne={class:"navigation-top-desktop"},wne={class:"left content"},bne={class:"right content"},_ne={key:1,class:"fancy-button"},Cne=A.defineComponent({__name:"NavigationTopDesktop",props:gb,setup(e){const t=e,{t:n}=Z();return(r,a)=>{var i;return A.openBlock(),A.createElementBlock("div",Bne,[A.createElementVNode("div",wne,[A.createVNode(Xu,{"fetch-seach-result":t.fetchSeachResult,class:"search-bar"},null,8,["fetch-seach-result"]),A.renderSlot(r.$slots,"default",{},void 0,!0)]),A.createElementVNode("div",bne,[A.createVNode(yg,{class:"social-links"}),A.createVNode(Lg,{class:"language-selection"}),A.unref(zr)().user?(A.openBlock(),A.createBlock(t1,{key:0,name:(i=A.unref(zr)().user)==null?void 0:i.name},null,8,["name"])):(A.openBlock(),A.createElementBlock("div",_ne,A.toDisplayString(A.unref(n)("general.signIn")),1))])])}}});const n1=M(Cne,[["__scopeId","data-v-2142e0e0"]]),kne={card:{type:Object,required:!0,default:{associatedCardRefs:["06NX013T1"],regionRefs:["Noxus","06RU002"],attack:1,cost:2,health:1,description:"<link=keyword.PlaySkillMark><sprite name=SkillMark><style=Keyword>Play</style></link>: <link=keyword.Stun><sprite name=Stunned><style=Keyword>Stun</style></link> an enemy or if it's already <link=keyword.Stun><sprite name=Stunned><style=Keyword>Stunned</style></link> deal 2 to it instead.",descriptionRaw:"Play: Stun an enemy or if it's already Stunned deal 2 to it instead.",levelupDescription:"",levelupDescriptionRaw:"",flavorText:`"Student: Sydell Kythera
|
|
875
|
+
.`+Lh+Dee+k2)},Lee=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},ok=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Oee=function(){function e(t,n){this.context=t,this._options=n,this._cache={}}return e.prototype.addImage=function(t){var n=Promise.resolve();return this.has(t)||(Jf(t)||Hee(t))&&(this._cache[t]=this.loadImage(t)).catch(function(){}),n},e.prototype.match=function(t){return this._cache[t]},e.prototype.loadImage=function(t){return rn(this,void 0,void 0,function(){var n,r,a,i,s=this;return zt(this,function(o){switch(o.label){case 0:return n=ok.isSameOrigin(t),r=!Xf(t)&&this._options.useCORS===!0&&Vt.SUPPORT_CORS_IMAGES&&!n,a=!Xf(t)&&!n&&!Jf(t)&&typeof this._options.proxy=="string"&&Vt.SUPPORT_CORS_XHR&&!r,!n&&this._options.allowTaint===!1&&!Xf(t)&&!Jf(t)&&!a&&!r?[2]:(i=t,a?[4,this.proxy(i)]:[3,2]);case 1:i=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+t.substring(0,256)),[4,new Promise(function(l,c){var u=new Image;u.onload=function(){return l(u)},u.onerror=c,(Ree(i)||r)&&(u.crossOrigin="anonymous"),u.src=i,u.complete===!0&&setTimeout(function(){return l(u)},500),s._options.imageTimeout>0&&setTimeout(function(){return c("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},e.prototype.has=function(t){return typeof this._cache[t]<"u"},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(t){var n=this,r=this._options.proxy;if(!r)throw new Error("No proxy defined");var a=t.substring(0,256);return new Promise(function(i,s){var o=Vt.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(o==="text")i(l.response);else{var d=new FileReader;d.addEventListener("load",function(){return i(d.result)},!1),d.addEventListener("error",function(f){return s(f)},!1),d.readAsDataURL(l.response)}else s("Failed to proxy resource "+a+" with status code "+l.status)},l.onerror=s;var c=r.indexOf("?")>-1?"&":"?";if(l.open("GET",""+r+c+"url="+encodeURIComponent(t)+"&responseType="+o),o!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=o),n._options.imageTimeout){var u=n._options.imageTimeout;l.timeout=u,l.ontimeout=function(){return s("Timed out ("+u+"ms) proxying "+a)}}l.send()})},e}(),Mee=/^data:image\/svg\+xml/i,Nee=/^data:image\/.*;base64,/i,Pee=/^data:image\/.*/i,Hee=function(e){return Vt.SUPPORT_SVG_DRAWING||!Vee(e)},Xf=function(e){return Pee.test(e)},Ree=function(e){return Nee.test(e)},Jf=function(e){return e.substr(0,4)==="blob"},Vee=function(e){return e.substr(-3).toLowerCase()==="svg"||Mee.test(e)},q=function(){function e(t,n){this.type=0,this.x=t,this.y=n}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),us=function(e,t,n){return new q(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Ec=function(){function e(t,n,r,a){this.type=1,this.start=t,this.startControl=n,this.endControl=r,this.end=a}return e.prototype.subdivide=function(t,n){var r=us(this.start,this.startControl,t),a=us(this.startControl,this.endControl,t),i=us(this.endControl,this.end,t),s=us(r,a,t),o=us(a,i,t),l=us(s,o,t);return n?new e(this.start,r,s,l):new e(l,o,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Hn=function(e){return e.type===1},Kee=function(){function e(t){var n=t.styles,r=t.bounds,a=PA(n.borderTopLeftRadius,r.width,r.height),i=a[0],s=a[1],o=PA(n.borderTopRightRadius,r.width,r.height),l=o[0],c=o[1],u=PA(n.borderBottomRightRadius,r.width,r.height),d=u[0],f=u[1],p=PA(n.borderBottomLeftRadius,r.width,r.height),h=p[0],m=p[1],B=[];B.push((i+l)/r.width),B.push((h+d)/r.width),B.push((s+m)/r.height),B.push((c+f)/r.height);var g=Math.max.apply(Math,B);g>1&&(i/=g,s/=g,l/=g,c/=g,d/=g,f/=g,h/=g,m/=g);var v=r.width-l,_=r.height-f,y=r.width-d,w=r.height-m,b=n.borderTopWidth,C=n.borderRightWidth,E=n.borderBottomWidth,S=n.borderLeftWidth,D=Xe(n.paddingTop,t.bounds.width),T=Xe(n.paddingRight,t.bounds.width),F=Xe(n.paddingBottom,t.bounds.width),U=Xe(n.paddingLeft,t.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?ct(r.left+S/3,r.top+b/3,i-S/3,s-b/3,Ve.TOP_LEFT):new q(r.left+S/3,r.top+b/3),this.topRightBorderDoubleOuterBox=i>0||s>0?ct(r.left+v,r.top+b/3,l-C/3,c-b/3,Ve.TOP_RIGHT):new q(r.left+r.width-C/3,r.top+b/3),this.bottomRightBorderDoubleOuterBox=d>0||f>0?ct(r.left+y,r.top+_,d-C/3,f-E/3,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C/3,r.top+r.height-E/3),this.bottomLeftBorderDoubleOuterBox=h>0||m>0?ct(r.left+S/3,r.top+w,h-S/3,m-E/3,Ve.BOTTOM_LEFT):new q(r.left+S/3,r.top+r.height-E/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?ct(r.left+S*2/3,r.top+b*2/3,i-S*2/3,s-b*2/3,Ve.TOP_LEFT):new q(r.left+S*2/3,r.top+b*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?ct(r.left+v,r.top+b*2/3,l-C*2/3,c-b*2/3,Ve.TOP_RIGHT):new q(r.left+r.width-C*2/3,r.top+b*2/3),this.bottomRightBorderDoubleInnerBox=d>0||f>0?ct(r.left+y,r.top+_,d-C*2/3,f-E*2/3,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C*2/3,r.top+r.height-E*2/3),this.bottomLeftBorderDoubleInnerBox=h>0||m>0?ct(r.left+S*2/3,r.top+w,h-S*2/3,m-E*2/3,Ve.BOTTOM_LEFT):new q(r.left+S*2/3,r.top+r.height-E*2/3),this.topLeftBorderStroke=i>0||s>0?ct(r.left+S/2,r.top+b/2,i-S/2,s-b/2,Ve.TOP_LEFT):new q(r.left+S/2,r.top+b/2),this.topRightBorderStroke=i>0||s>0?ct(r.left+v,r.top+b/2,l-C/2,c-b/2,Ve.TOP_RIGHT):new q(r.left+r.width-C/2,r.top+b/2),this.bottomRightBorderStroke=d>0||f>0?ct(r.left+y,r.top+_,d-C/2,f-E/2,Ve.BOTTOM_RIGHT):new q(r.left+r.width-C/2,r.top+r.height-E/2),this.bottomLeftBorderStroke=h>0||m>0?ct(r.left+S/2,r.top+w,h-S/2,m-E/2,Ve.BOTTOM_LEFT):new q(r.left+S/2,r.top+r.height-E/2),this.topLeftBorderBox=i>0||s>0?ct(r.left,r.top,i,s,Ve.TOP_LEFT):new q(r.left,r.top),this.topRightBorderBox=l>0||c>0?ct(r.left+v,r.top,l,c,Ve.TOP_RIGHT):new q(r.left+r.width,r.top),this.bottomRightBorderBox=d>0||f>0?ct(r.left+y,r.top+_,d,f,Ve.BOTTOM_RIGHT):new q(r.left+r.width,r.top+r.height),this.bottomLeftBorderBox=h>0||m>0?ct(r.left,r.top+w,h,m,Ve.BOTTOM_LEFT):new q(r.left,r.top+r.height),this.topLeftPaddingBox=i>0||s>0?ct(r.left+S,r.top+b,Math.max(0,i-S),Math.max(0,s-b),Ve.TOP_LEFT):new q(r.left+S,r.top+b),this.topRightPaddingBox=l>0||c>0?ct(r.left+Math.min(v,r.width-C),r.top+b,v>r.width+C?0:Math.max(0,l-C),Math.max(0,c-b),Ve.TOP_RIGHT):new q(r.left+r.width-C,r.top+b),this.bottomRightPaddingBox=d>0||f>0?ct(r.left+Math.min(y,r.width-S),r.top+Math.min(_,r.height-E),Math.max(0,d-C),Math.max(0,f-E),Ve.BOTTOM_RIGHT):new q(r.left+r.width-C,r.top+r.height-E),this.bottomLeftPaddingBox=h>0||m>0?ct(r.left+S,r.top+Math.min(w,r.height-E),Math.max(0,h-S),Math.max(0,m-E),Ve.BOTTOM_LEFT):new q(r.left+S,r.top+r.height-E),this.topLeftContentBox=i>0||s>0?ct(r.left+S+U,r.top+b+D,Math.max(0,i-(S+U)),Math.max(0,s-(b+D)),Ve.TOP_LEFT):new q(r.left+S+U,r.top+b+D),this.topRightContentBox=l>0||c>0?ct(r.left+Math.min(v,r.width+S+U),r.top+b+D,v>r.width+S+U?0:l-S+U,c-(b+D),Ve.TOP_RIGHT):new q(r.left+r.width-(C+T),r.top+b+D),this.bottomRightContentBox=d>0||f>0?ct(r.left+Math.min(y,r.width-(S+U)),r.top+Math.min(_,r.height+b+D),Math.max(0,d-(C+T)),f-(E+F),Ve.BOTTOM_RIGHT):new q(r.left+r.width-(C+T),r.top+r.height-(E+F)),this.bottomLeftContentBox=h>0||m>0?ct(r.left+S+U,r.top+w,Math.max(0,h-(S+U)),m-(E+F),Ve.BOTTOM_LEFT):new q(r.left+S+U,r.top+r.height-(E+F))}return e}(),Ve;(function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Ve||(Ve={}));var ct=function(e,t,n,r,a){var i=4*((Math.sqrt(2)-1)/3),s=n*i,o=r*i,l=e+n,c=t+r;switch(a){case Ve.TOP_LEFT:return new Ec(new q(e,c),new q(e,c-o),new q(l-s,t),new q(l,t));case Ve.TOP_RIGHT:return new Ec(new q(e,t),new q(e+s,t),new q(l,c-o),new q(l,c));case Ve.BOTTOM_RIGHT:return new Ec(new q(l,t),new q(l,t+o),new q(e+s,c),new q(e,c));case Ve.BOTTOM_LEFT:default:return new Ec(new q(l,c),new q(l-s,c),new q(e,t+o),new q(e,t))}},Lu=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},$ee=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Ou=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},zee=function(){function e(t,n,r){this.offsetX=t,this.offsetY=n,this.matrix=r,this.type=0,this.target=6}return e}(),Sc=function(){function e(t,n){this.path=t,this.target=n,this.type=1}return e}(),Wee=function(){function e(t){this.opacity=t,this.type=2,this.target=6}return e}(),Gee=function(e){return e.type===0},lk=function(e){return e.type===1},jee=function(e){return e.type===2},E2=function(e,t){return e.length===t.length?e.some(function(n,r){return n===t[r]}):!1},Yee=function(e,t,n,r,a){return e.map(function(i,s){switch(s){case 0:return i.add(t,n);case 1:return i.add(t+r,n);case 2:return i.add(t+r,n+a);case 3:return i.add(t,n+a)}return i})},ck=function(){function e(t){this.element=t,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),uk=function(){function e(t,n){if(this.container=t,this.parent=n,this.effects=[],this.curves=new Kee(this.container),this.container.styles.opacity<1&&this.effects.push(new Wee(this.container.styles.opacity)),this.container.styles.transform!==null){var r=this.container.bounds.left+this.container.styles.transformOrigin[0].number,a=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new zee(r,a,i))}if(this.container.styles.overflowX!==0){var s=Lu(this.curves),o=Ou(this.curves);E2(s,o)?this.effects.push(new Sc(s,6)):(this.effects.push(new Sc(s,2)),this.effects.push(new Sc(o,4)))}}return e.prototype.getEffects=function(t){for(var n=[2,3].indexOf(this.container.styles.position)===-1,r=this.parent,a=this.effects.slice(0);r;){var i=r.effects.filter(function(l){return!lk(l)});if(n||r.container.styles.position!==0||!r.parent){if(a.unshift.apply(a,i),n=[2,3].indexOf(r.container.styles.position)===-1,r.container.styles.overflowX!==0){var s=Lu(r.curves),o=Ou(r.curves);E2(s,o)||a.unshift(new Sc(o,6))}}else a.unshift.apply(a,i);r=r.parent}return a.filter(function(l){return Ut(l.target,t)})},e}(),Oh=function(e,t,n,r){e.container.elements.forEach(function(a){var i=Ut(a.flags,4),s=Ut(a.flags,2),o=new uk(a,e);Ut(a.styles.display,2048)&&r.push(o);var l=Ut(a.flags,8)?[]:r;if(i||s){var c=i||a.styles.isPositioned()?n:t,u=new ck(o);if(a.styles.isPositioned()||a.styles.opacity<1||a.styles.isTransformed()){var d=a.styles.zIndex.order;if(d<0){var f=0;c.negativeZIndex.some(function(h,m){return d>h.element.container.styles.zIndex.order?(f=m,!1):f>0}),c.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;c.positiveZIndex.some(function(h,m){return d>=h.element.container.styles.zIndex.order?(p=m+1,!1):p>0}),c.positiveZIndex.splice(p,0,u)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else a.styles.isFloating()?c.nonPositionedFloats.push(u):c.nonPositionedInlineLevel.push(u);Oh(o,u,i?u:n,l)}else a.styles.isInlineLevel()?t.inlineLevel.push(o):t.nonInlineLevel.push(o),Oh(o,t,n,l);Ut(a.flags,8)&&dk(a,l)})},dk=function(e,t){for(var n=e instanceof Th?e.start:1,r=e instanceof Th?e.reversed:!1,a=0;a<t.length;a++){var i=t[a];i.container instanceof Y4&&typeof i.container.value=="number"&&i.container.value!==0&&(n=i.container.value),i.listValue=Ro(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},qee=function(e){var t=new uk(e,null),n=new ck(t),r=[];return Oh(t,n,n,r),dk(t.container,r),n},S2=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Vn(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Vn(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return Vn(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Xee=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Vn(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Vn(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return Vn(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Jee=function(e,t){switch(t){case 0:return Vn(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Vn(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Vn(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return Vn(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Zee=function(e,t){switch(t){case 0:return xc(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return xc(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return xc(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return xc(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},xc=function(e,t){var n=[];return Hn(e)?n.push(e.subdivide(.5,!1)):n.push(e),Hn(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},Vn=function(e,t,n,r){var a=[];return Hn(e)?a.push(e.subdivide(.5,!1)):a.push(e),Hn(n)?a.push(n.subdivide(.5,!0)):a.push(n),Hn(r)?a.push(r.subdivide(.5,!0).reverse()):a.push(r),Hn(t)?a.push(t.subdivide(.5,!1).reverse()):a.push(t),a},fk=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},Mu=function(e){var t=e.styles,n=e.bounds,r=Xe(t.paddingLeft,n.width),a=Xe(t.paddingRight,n.width),i=Xe(t.paddingTop,n.width),s=Xe(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,i+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+a),-(t.borderTopWidth+t.borderBottomWidth+i+s))},ete=function(e,t){return e===0?t.bounds:e===2?Mu(t):fk(t)},tte=function(e,t){return e===0?t.bounds:e===2?Mu(t):fk(t)},Zf=function(e,t,n){var r=ete(gs(e.styles.backgroundOrigin,t),e),a=tte(gs(e.styles.backgroundClip,t),e),i=nte(gs(e.styles.backgroundSize,t),n,r),s=i[0],o=i[1],l=PA(gs(e.styles.backgroundPosition,t),r.width-s,r.height-o),c=rte(gs(e.styles.backgroundRepeat,t),l,i,r,a),u=Math.round(r.left+l[0]),d=Math.round(r.top+l[1]);return[c,u,d,s,o]},ds=function(e){return We(e)&&e.value===Fs.AUTO},Fc=function(e){return typeof e=="number"},nte=function(e,t,n){var r=t[0],a=t[1],i=t[2],s=e[0],o=e[1];if(!s)return[0,0];if(St(s)&&o&&St(o))return[Xe(s,n.width),Xe(o,n.height)];var l=Fc(i);if(We(s)&&(s.value===Fs.CONTAIN||s.value===Fs.COVER)){if(Fc(i)){var c=n.width/n.height;return c<i!=(s.value===Fs.COVER)?[n.width,n.width/i]:[n.height*i,n.height]}return[n.width,n.height]}var u=Fc(r),d=Fc(a),f=u||d;if(ds(s)&&(!o||ds(o))){if(u&&d)return[r,a];if(!l&&!f)return[n.width,n.height];if(f&&l){var p=u?r:a*i,h=d?a:r/i;return[p,h]}var m=u?r:n.width,B=d?a:n.height;return[m,B]}if(l){var g=0,v=0;return St(s)?g=Xe(s,n.width):St(o)&&(v=Xe(o,n.height)),ds(s)?g=v*i:(!o||ds(o))&&(v=g/i),[g,v]}var _=null,y=null;if(St(s)?_=Xe(s,n.width):o&&St(o)&&(y=Xe(o,n.height)),_!==null&&(!o||ds(o))&&(y=u&&d?_/r*a:n.height),y!==null&&ds(s)&&(_=u&&d?y/a*r:n.width),_!==null&&y!==null)return[_,y];throw new Error("Unable to calculate background-size for element")},gs=function(e,t){var n=e[t];return typeof n>"u"?e[0]:n},rte=function(e,t,n,r,a){var i=t[0],s=t[1],o=n[0],l=n[1];switch(e){case 2:return[new q(Math.round(r.left),Math.round(r.top+s)),new q(Math.round(r.left+r.width),Math.round(r.top+s)),new q(Math.round(r.left+r.width),Math.round(l+r.top+s)),new q(Math.round(r.left),Math.round(l+r.top+s))];case 3:return[new q(Math.round(r.left+i),Math.round(r.top)),new q(Math.round(r.left+i+o),Math.round(r.top)),new q(Math.round(r.left+i+o),Math.round(r.height+r.top)),new q(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new q(Math.round(r.left+i),Math.round(r.top+s)),new q(Math.round(r.left+i+o),Math.round(r.top+s)),new q(Math.round(r.left+i+o),Math.round(r.top+s+l)),new q(Math.round(r.left+i),Math.round(r.top+s+l))];default:return[new q(Math.round(a.left),Math.round(a.top)),new q(Math.round(a.left+a.width),Math.round(a.top)),new q(Math.round(a.left+a.width),Math.round(a.height+a.top)),new q(Math.round(a.left),Math.round(a.height+a.top))]}},ate="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",x2="Hidden Text",ite=function(){function e(t){this._data={},this._document=t}return e.prototype.parseMetrics=function(t,n){var r=this._document.createElement("div"),a=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;r.style.visibility="hidden",r.style.fontFamily=t,r.style.fontSize=n,r.style.margin="0",r.style.padding="0",r.style.whiteSpace="nowrap",s.appendChild(r),a.src=ate,a.width=1,a.height=1,a.style.margin="0",a.style.padding="0",a.style.verticalAlign="baseline",i.style.fontFamily=t,i.style.fontSize=n,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(x2)),r.appendChild(i),r.appendChild(a);var o=a.offsetTop-i.offsetTop+2;r.removeChild(i),r.appendChild(this._document.createTextNode(x2)),r.style.lineHeight="normal",a.style.verticalAlign="super";var l=a.offsetTop-r.offsetTop+2;return s.removeChild(r),{baseline:o,middle:l}},e.prototype.getMetrics=function(t,n){var r=t+" "+n;return typeof this._data[r]>"u"&&(this._data[r]=this.parseMetrics(t,n)),this._data[r]},e}(),pk=function(){function e(t,n){this.context=t,this.options=n}return e}(),ste=1e4,Ate=function(e){ir(t,e);function t(n,r){var a=e.call(this,n,r)||this;return a._activeEffects=[],a.canvas=r.canvas?r.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),r.canvas||(a.canvas.width=Math.floor(r.width*r.scale),a.canvas.height=Math.floor(r.height*r.scale),a.canvas.style.width=r.width+"px",a.canvas.style.height=r.height+"px"),a.fontMetrics=new ite(document),a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-r.x,-r.y),a.ctx.textBaseline="bottom",a._activeEffects=[],a.context.logger.debug("Canvas renderer initialized ("+r.width+"x"+r.height+") with scale "+r.scale),a}return t.prototype.applyEffects=function(n){for(var r=this;this._activeEffects.length;)this.popEffect();n.forEach(function(a){return r.applyEffect(a)})},t.prototype.applyEffect=function(n){this.ctx.save(),jee(n)&&(this.ctx.globalAlpha=n.opacity),Gee(n)&&(this.ctx.translate(n.offsetX,n.offsetY),this.ctx.transform(n.matrix[0],n.matrix[1],n.matrix[2],n.matrix[3],n.matrix[4],n.matrix[5]),this.ctx.translate(-n.offsetX,-n.offsetY)),lk(n)&&(this.path(n.path),this.ctx.clip()),this._activeEffects.push(n)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(n){return rn(this,void 0,void 0,function(){var r;return zt(this,function(a){switch(a.label){case 0:return r=n.element.container.styles,r.isVisible()?[4,this.renderStackContent(n)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(n){return rn(this,void 0,void 0,function(){return zt(this,function(r){switch(r.label){case 0:if(Ut(n.container.flags,16))debugger;return n.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(n)]:[3,3];case 1:return r.sent(),[4,this.renderNodeContent(n)];case 2:r.sent(),r.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(n,r,a){var i=this;if(r===0)this.ctx.fillText(n.text,n.bounds.left,n.bounds.top+a);else{var s=jm(n.text);s.reduce(function(o,l){return i.ctx.fillText(l,o,n.bounds.top+a),o+i.ctx.measureText(l).width},n.bounds.left)}},t.prototype.createFontStyle=function(n){var r=n.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),a=dte(n.fontFamily).join(", "),i=yl(n.fontSize)?""+n.fontSize.number+n.fontSize.unit:n.fontSize.number+"px";return[[n.fontStyle,r,n.fontWeight,i,a].join(" "),a,i]},t.prototype.renderTextNode=function(n,r){return rn(this,void 0,void 0,function(){var a,i,s,o,l,c,u,d,f=this;return zt(this,function(p){return a=this.createFontStyle(r),i=a[0],s=a[1],o=a[2],this.ctx.font=i,this.ctx.direction=r.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(s,o),c=l.baseline,u=l.middle,d=r.paintOrder,n.textBounds.forEach(function(h){d.forEach(function(m){switch(m){case 0:f.ctx.fillStyle=Mt(r.color),f.renderTextWithLetterSpacing(h,r.letterSpacing,c);var B=r.textShadow;B.length&&h.text.trim().length&&(B.slice(0).reverse().forEach(function(g){f.ctx.shadowColor=Mt(g.color),f.ctx.shadowOffsetX=g.offsetX.number*f.options.scale,f.ctx.shadowOffsetY=g.offsetY.number*f.options.scale,f.ctx.shadowBlur=g.blur.number,f.renderTextWithLetterSpacing(h,r.letterSpacing,c)}),f.ctx.shadowColor="",f.ctx.shadowOffsetX=0,f.ctx.shadowOffsetY=0,f.ctx.shadowBlur=0),r.textDecorationLine.length&&(f.ctx.fillStyle=Mt(r.textDecorationColor||r.color),r.textDecorationLine.forEach(function(g){switch(g){case 1:f.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top+c),h.bounds.width,1);break;case 2:f.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top),h.bounds.width,1);break;case 3:f.ctx.fillRect(h.bounds.left,Math.ceil(h.bounds.top+u),h.bounds.width,1);break}}));break;case 1:r.webkitTextStrokeWidth&&h.text.trim().length&&(f.ctx.strokeStyle=Mt(r.webkitTextStrokeColor),f.ctx.lineWidth=r.webkitTextStrokeWidth,f.ctx.lineJoin=window.chrome?"miter":"round",f.ctx.strokeText(h.text,h.bounds.left,h.bounds.top+c)),f.ctx.strokeStyle="",f.ctx.lineWidth=0,f.ctx.lineJoin="miter";break}})}),[2]})})},t.prototype.renderReplacedElement=function(n,r,a){if(a&&n.intrinsicWidth>0&&n.intrinsicHeight>0){var i=Mu(n),s=Ou(r);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(a,0,0,n.intrinsicWidth,n.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l,v,v,c,u,d,f,y,p,h,w,m,B,g,v,_,y,w;return zt(this,function(b){switch(b.label){case 0:this.applyEffects(n.getEffects(4)),r=n.container,a=n.curves,i=r.styles,s=0,o=r.textNodes,b.label=1;case 1:return s<o.length?(l=o[s],[4,this.renderTextNode(l,i)]):[3,4];case 2:b.sent(),b.label=3;case 3:return s++,[3,1];case 4:if(!(r instanceof W4))return[3,8];b.label=5;case 5:return b.trys.push([5,7,,8]),[4,this.context.cache.match(r.src)];case 6:return v=b.sent(),this.renderReplacedElement(r,a,v),[3,8];case 7:return b.sent(),this.context.logger.error("Error loading image "+r.src),[3,8];case 8:if(r instanceof G4&&this.renderReplacedElement(r,a,r.canvas),!(r instanceof j4))return[3,12];b.label=9;case 9:return b.trys.push([9,11,,12]),[4,this.context.cache.match(r.svg)];case 10:return v=b.sent(),this.renderReplacedElement(r,a,v),[3,12];case 11:return b.sent(),this.context.logger.error("Error loading svg "+r.svg.substring(0,255)),[3,12];case 12:return r instanceof J4&&r.tree?(c=new t(this.context,{scale:this.options.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}),[4,c.render(r.tree)]):[3,14];case 13:u=b.sent(),r.width&&r.height&&this.ctx.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height),b.label=14;case 14:if(r instanceof Ym&&(d=Math.min(r.bounds.width,r.bounds.height),r.type===Tu?r.checked&&(this.ctx.save(),this.path([new q(r.bounds.left+d*.39363,r.bounds.top+d*.79),new q(r.bounds.left+d*.16,r.bounds.top+d*.5549),new q(r.bounds.left+d*.27347,r.bounds.top+d*.44071),new q(r.bounds.left+d*.39694,r.bounds.top+d*.5649),new q(r.bounds.left+d*.72983,r.bounds.top+d*.23),new q(r.bounds.left+d*.84,r.bounds.top+d*.34085),new q(r.bounds.left+d*.39363,r.bounds.top+d*.79)]),this.ctx.fillStyle=Mt(h2),this.ctx.fill(),this.ctx.restore()):r.type===Uu&&r.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(r.bounds.left+d/2,r.bounds.top+d/2,d/4,0,Math.PI*2,!0),this.ctx.fillStyle=Mt(h2),this.ctx.fill(),this.ctx.restore())),ote(r)&&r.value.length){switch(f=this.createFontStyle(i),y=f[0],p=f[1],h=this.fontMetrics.getMetrics(y,p).baseline,this.ctx.font=y,this.ctx.fillStyle=Mt(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=cte(r.styles.textAlign),w=Mu(r),m=0,r.styles.textAlign){case 1:m+=w.width/2;break;case 2:m+=w.width;break}B=w.add(m,0,0,-w.height/2+1),this.ctx.save(),this.path([new q(w.left,w.top),new q(w.left+w.width,w.top),new q(w.left+w.width,w.top+w.height),new q(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new uo(r.value,B),i.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ut(r.styles.display,2048))return[3,20];if(r.styles.listStyleImage===null)return[3,19];if(g=r.styles.listStyleImage,g.type!==0)return[3,18];v=void 0,_=g.url,b.label=15;case 15:return b.trys.push([15,17,,18]),[4,this.context.cache.match(_)];case 16:return v=b.sent(),this.ctx.drawImage(v,r.bounds.left-(v.width+10),r.bounds.top),[3,18];case 17:return b.sent(),this.context.logger.error("Error loading list-style-image "+_),[3,18];case 18:return[3,20];case 19:n.listValue&&r.styles.listStyleType!==-1&&(y=this.createFontStyle(i)[0],this.ctx.font=y,this.ctx.fillStyle=Mt(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new Aa(r.bounds.left,r.bounds.top+Xe(r.styles.paddingTop,r.bounds.width),r.bounds.width,JB(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new uo(n.listValue,w),i.letterSpacing,JB(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),b.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(n){return rn(this,void 0,void 0,function(){var r,a,g,i,s,g,o,l,g,c,u,g,d,f,g,p,h,g,m,B,g;return zt(this,function(v){switch(v.label){case 0:if(Ut(n.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(n.element)];case 1:v.sent(),r=0,a=n.negativeZIndex,v.label=2;case 2:return r<a.length?(g=a[r],[4,this.renderStack(g)]):[3,5];case 3:v.sent(),v.label=4;case 4:return r++,[3,2];case 5:return[4,this.renderNodeContent(n.element)];case 6:v.sent(),i=0,s=n.nonInlineLevel,v.label=7;case 7:return i<s.length?(g=s[i],[4,this.renderNode(g)]):[3,10];case 8:v.sent(),v.label=9;case 9:return i++,[3,7];case 10:o=0,l=n.nonPositionedFloats,v.label=11;case 11:return o<l.length?(g=l[o],[4,this.renderStack(g)]):[3,14];case 12:v.sent(),v.label=13;case 13:return o++,[3,11];case 14:c=0,u=n.nonPositionedInlineLevel,v.label=15;case 15:return c<u.length?(g=u[c],[4,this.renderStack(g)]):[3,18];case 16:v.sent(),v.label=17;case 17:return c++,[3,15];case 18:d=0,f=n.inlineLevel,v.label=19;case 19:return d<f.length?(g=f[d],[4,this.renderNode(g)]):[3,22];case 20:v.sent(),v.label=21;case 21:return d++,[3,19];case 22:p=0,h=n.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return p<h.length?(g=h[p],[4,this.renderStack(g)]):[3,26];case 24:v.sent(),v.label=25;case 25:return p++,[3,23];case 26:m=0,B=n.positiveZIndex,v.label=27;case 27:return m<B.length?(g=B[m],[4,this.renderStack(g)]):[3,30];case 28:v.sent(),v.label=29;case 29:return m++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(n){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(n.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(n){this.ctx.beginPath(),this.formatPath(n),this.ctx.closePath()},t.prototype.formatPath=function(n){var r=this;n.forEach(function(a,i){var s=Hn(a)?a.start:a;i===0?r.ctx.moveTo(s.x,s.y):r.ctx.lineTo(s.x,s.y),Hn(a)&&r.ctx.bezierCurveTo(a.startControl.x,a.startControl.y,a.endControl.x,a.endControl.y,a.end.x,a.end.y)})},t.prototype.renderRepeat=function(n,r,a,i){this.path(n),this.ctx.fillStyle=r,this.ctx.translate(a,i),this.ctx.fill(),this.ctx.translate(-a,-i)},t.prototype.resizeImage=function(n,r,a){var i;if(n.width===r&&n.height===a)return n;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,o=s.createElement("canvas");o.width=Math.max(1,r),o.height=Math.max(1,a);var l=o.getContext("2d");return l.drawImage(n,0,0,n.width,n.height,0,0,r,a),o},t.prototype.renderBackgroundImage=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l;return zt(this,function(c){switch(c.label){case 0:r=n.styles.backgroundImage.length-1,a=function(u){var d,f,p,D,j,K,U,Y,E,h,D,j,K,U,Y,m,B,g,v,_,y,w,b,C,E,S,D,T,F,U,Y,X,j,K,oe,$,ie,ce,me,Ee,fe,re;return zt(this,function(N){switch(N.label){case 0:if(u.type!==0)return[3,5];d=void 0,f=u.url,N.label=1;case 1:return N.trys.push([1,3,,4]),[4,i.context.cache.match(f)];case 2:return d=N.sent(),[3,4];case 3:return N.sent(),i.context.logger.error("Error loading background-image "+f),[3,4];case 4:return d&&(p=Zf(n,r,[d.width,d.height,d.width/d.height]),D=p[0],j=p[1],K=p[2],U=p[3],Y=p[4],E=i.ctx.createPattern(i.resizeImage(d,U,Y),"repeat"),i.renderRepeat(D,E,j,K)),[3,6];case 5:GX(u)?(h=Zf(n,r,[null,null,null]),D=h[0],j=h[1],K=h[2],U=h[3],Y=h[4],m=VX(u.angle,U,Y),B=m[0],g=m[1],v=m[2],_=m[3],y=m[4],w=document.createElement("canvas"),w.width=U,w.height=Y,b=w.getContext("2d"),C=b.createLinearGradient(g,_,v,y),qB(u.stops,B).forEach(function(ne){return C.addColorStop(ne.stop,Mt(ne.color))}),b.fillStyle=C,b.fillRect(0,0,U,Y),U>0&&Y>0&&(E=i.ctx.createPattern(w,"repeat"),i.renderRepeat(D,E,j,K))):jX(u)&&(S=Zf(n,r,[null,null,null]),D=S[0],T=S[1],F=S[2],U=S[3],Y=S[4],X=u.position.length===0?[zm]:u.position,j=Xe(X[0],U),K=Xe(X[X.length-1],Y),oe=KX(u,j,K,U,Y),$=oe[0],ie=oe[1],$>0&&ie>0&&(ce=i.ctx.createRadialGradient(T+j,F+K,0,T+j,F+K,$),qB(u.stops,$*2).forEach(function(ne){return ce.addColorStop(ne.stop,Mt(ne.color))}),i.path(D),i.ctx.fillStyle=ce,$!==ie?(me=n.bounds.left+.5*n.bounds.width,Ee=n.bounds.top+.5*n.bounds.height,fe=ie/$,re=1/fe,i.ctx.save(),i.ctx.translate(me,Ee),i.ctx.transform(1,0,0,fe,0,0),i.ctx.translate(-me,-Ee),i.ctx.fillRect(T,re*(F-Ee)+Ee,U,Y*re),i.ctx.restore()):i.ctx.fill())),N.label=6;case 6:return r--,[2]}})},i=this,s=0,o=n.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return s<o.length?(l=o[s],[5,a(l)]):[3,4];case 2:c.sent(),c.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(n,r,a){return rn(this,void 0,void 0,function(){return zt(this,function(i){return this.path(S2(a,r)),this.ctx.fillStyle=Mt(n),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(n,r,a,i){return rn(this,void 0,void 0,function(){var s,o;return zt(this,function(l){switch(l.label){case 0:return r<3?[4,this.renderSolidBorder(n,a,i)]:[3,2];case 1:return l.sent(),[2];case 2:return s=Xee(i,a),this.path(s),this.ctx.fillStyle=Mt(n),this.ctx.fill(),o=Jee(i,a),this.path(o),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(n){return rn(this,void 0,void 0,function(){var r,a,i,s,o,l,c,u,d=this;return zt(this,function(f){switch(f.label){case 0:return this.applyEffects(n.getEffects(2)),r=n.container.styles,a=!Ra(r.backgroundColor)||r.backgroundImage.length,i=[{style:r.borderTopStyle,color:r.borderTopColor,width:r.borderTopWidth},{style:r.borderRightStyle,color:r.borderRightColor,width:r.borderRightWidth},{style:r.borderBottomStyle,color:r.borderBottomColor,width:r.borderBottomWidth},{style:r.borderLeftStyle,color:r.borderLeftColor,width:r.borderLeftWidth}],s=lte(gs(r.backgroundClip,0),n.curves),a||r.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Ra(r.backgroundColor)||(this.ctx.fillStyle=Mt(r.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(n.container)]):[3,2];case 1:f.sent(),this.ctx.restore(),r.boxShadow.slice(0).reverse().forEach(function(p){d.ctx.save();var h=Lu(n.curves),m=p.inset?0:ste,B=Yee(h,-m+(p.inset?1:-1)*p.spread.number,(p.inset?1:-1)*p.spread.number,p.spread.number*(p.inset?-2:2),p.spread.number*(p.inset?-2:2));p.inset?(d.path(h),d.ctx.clip(),d.mask(B)):(d.mask(h),d.ctx.clip(),d.path(B)),d.ctx.shadowOffsetX=p.offsetX.number+m,d.ctx.shadowOffsetY=p.offsetY.number,d.ctx.shadowColor=Mt(p.color),d.ctx.shadowBlur=p.blur.number,d.ctx.fillStyle=p.inset?Mt(p.color):"rgba(0,0,0,1)",d.ctx.fill(),d.ctx.restore()}),f.label=2;case 2:o=0,l=0,c=i,f.label=3;case 3:return l<c.length?(u=c[l],u.style!==0&&!Ra(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,n.curves,2)]:[3,11]):[3,13];case 4:return f.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,n.curves,3)];case 6:return f.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,n.curves)];case 8:return f.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,n.curves)];case 10:f.sent(),f.label=11;case 11:o++,f.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(n,r,a,i,s){return rn(this,void 0,void 0,function(){var o,l,c,u,d,f,p,h,m,B,g,v,_,y,w,b,w,b;return zt(this,function(C){return this.ctx.save(),o=Zee(i,a),l=S2(i,a),s===2&&(this.path(l),this.ctx.clip()),Hn(l[0])?(c=l[0].start.x,u=l[0].start.y):(c=l[0].x,u=l[0].y),Hn(l[1])?(d=l[1].end.x,f=l[1].end.y):(d=l[1].x,f=l[1].y),a===0||a===2?p=Math.abs(c-d):p=Math.abs(u-f),this.ctx.beginPath(),s===3?this.formatPath(o):this.formatPath(l.slice(0,2)),h=r<3?r*3:r*2,m=r<3?r*2:r,s===3&&(h=r,m=r),B=!0,p<=h*2?B=!1:p<=h*2+m?(g=p/(2*h+m),h*=g,m*=g):(v=Math.floor((p+m)/(h+m)),_=(p-v*h)/(v-1),y=(p-(v+1)*h)/v,m=y<=0||Math.abs(m-_)<Math.abs(m-y)?_:y),B&&(s===3?this.ctx.setLineDash([0,h+m]):this.ctx.setLineDash([h,m])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=r):this.ctx.lineWidth=r*2+1.1,this.ctx.strokeStyle=Mt(n),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Hn(l[0])&&(w=l[3],b=l[0],this.ctx.beginPath(),this.formatPath([new q(w.end.x,w.end.y),new q(b.start.x,b.start.y)]),this.ctx.stroke()),Hn(l[1])&&(w=l[1],b=l[2],this.ctx.beginPath(),this.formatPath([new q(w.end.x,w.end.y),new q(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(n){return rn(this,void 0,void 0,function(){var r;return zt(this,function(a){switch(a.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Mt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=qee(n),[4,this.renderStack(r)];case 1:return a.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(pk),ote=function(e){return e instanceof X4||e instanceof q4?!0:e instanceof Ym&&e.type!==Uu&&e.type!==Tu},lte=function(e,t){switch(e){case 0:return Lu(t);case 2:return $ee(t);case 1:default:return Ou(t)}},cte=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},ute=["-apple-system","system-ui"],dte=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(t){return ute.indexOf(t)===-1}):e},fte=function(e){ir(t,e);function t(n,r){var a=e.call(this,n,r)||this;return a.canvas=r.canvas?r.canvas:document.createElement("canvas"),a.ctx=a.canvas.getContext("2d"),a.options=r,a.canvas.width=Math.floor(r.width*r.scale),a.canvas.height=Math.floor(r.height*r.scale),a.canvas.style.width=r.width+"px",a.canvas.style.height=r.height+"px",a.ctx.scale(a.options.scale,a.options.scale),a.ctx.translate(-r.x,-r.y),a.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+r.width+"x"+r.height+" at "+r.x+","+r.y+") with scale "+r.scale),a}return t.prototype.render=function(n){return rn(this,void 0,void 0,function(){var r,a;return zt(this,function(i){switch(i.label){case 0:return r=Ih(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,n),[4,pte(r)];case 1:return a=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Mt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(a,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(pk),pte=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(e))})},hte=function(){function e(t){var n=t.id,r=t.enabled;this.id=n,this.enabled=r,this.start=Date.now()}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ac([this.id,this.getTime()+"ms"],t))},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ac([this.id,this.getTime()+"ms"],t)):this.info.apply(this,t))},e.instances={},e}(),gte=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new hte({id:this.instanceName,enabled:t.logging}),this.cache=(r=t.cache)!==null&&r!==void 0?r:new Oee(this,t)}return e.instanceCount=1,e}(),mte=function(e,t){return t===void 0&&(t={}),vte(e,t)};typeof window<"u"&&ok.setContext(window);var vte=function(e,t){return rn(void 0,void 0,void 0,function(){var n,r,a,i,s,o,l,c,u,d,f,p,h,m,B,g,v,_,y,w,C,b,C,E,S,D,T,F,U,Y,X,j,K,oe,$,ie,ce,me,Ee,fe;return zt(this,function(re){switch(re.label){case 0:if(!e||typeof e!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(n=e.ownerDocument,!n)throw new Error("Element is not attached to a Document");if(r=n.defaultView,!r)throw new Error("Document is not attached to a Window");return a={allowTaint:(E=t.allowTaint)!==null&&E!==void 0?E:!1,imageTimeout:(S=t.imageTimeout)!==null&&S!==void 0?S:15e3,proxy:t.proxy,useCORS:(D=t.useCORS)!==null&&D!==void 0?D:!1},i=hh({logging:(T=t.logging)!==null&&T!==void 0?T:!0,cache:t.cache},a),s={windowWidth:(F=t.windowWidth)!==null&&F!==void 0?F:r.innerWidth,windowHeight:(U=t.windowHeight)!==null&&U!==void 0?U:r.innerHeight,scrollX:(Y=t.scrollX)!==null&&Y!==void 0?Y:r.pageXOffset,scrollY:(X=t.scrollY)!==null&&X!==void 0?X:r.pageYOffset},o=new Aa(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),l=new gte(i,o),c=(j=t.foreignObjectRendering)!==null&&j!==void 0?j:!1,u={allowTaint:(K=t.allowTaint)!==null&&K!==void 0?K:!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:c,copyStyles:c},l.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),d=new C2(l,e,u),f=d.clonedReferenceElement,f?[4,d.toIFrame(n,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return p=re.sent(),h=qm(f)||yee(f)?YY(f.ownerDocument):Dd(l,f),m=h.width,B=h.height,g=h.left,v=h.top,_=yte(l,f,t.backgroundColor),y={canvas:t.canvas,backgroundColor:_,scale:($=(oe=t.scale)!==null&&oe!==void 0?oe:r.devicePixelRatio)!==null&&$!==void 0?$:1,x:((ie=t.x)!==null&&ie!==void 0?ie:0)+g,y:((ce=t.y)!==null&&ce!==void 0?ce:0)+v,width:(me=t.width)!==null&&me!==void 0?me:Math.ceil(m),height:(Ee=t.height)!==null&&Ee!==void 0?Ee:Math.ceil(B)},c?(l.logger.debug("Document cloned, using foreign object rendering"),C=new fte(l,y),[4,C.render(f)]):[3,3];case 2:return w=re.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+g+","+v+" with size "+m+"x"+B+" using computed rendering"),l.logger.debug("Starting DOM parsing"),b=ek(l,f),_===b.styles.backgroundColor&&(b.styles.backgroundColor=ea.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),C=new Ate(l,y),[4,C.render(b)];case 4:w=re.sent(),re.label=5;case 5:return(!((fe=t.removeContainer)!==null&&fe!==void 0)||fe)&&(C2.destroy(p)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,w]}})})},yte=function(e,t,n){var r=t.ownerDocument,a=r.documentElement?lo(e,getComputedStyle(r.documentElement).backgroundColor):ea.TRANSPARENT,i=r.body?lo(e,getComputedStyle(r.body).backgroundColor):ea.TRANSPARENT,s=typeof n=="string"?lo(e,n):n===null?ea.TRANSPARENT:4294967295;return t===r.documentElement?Ra(a)?Ra(i)?s:i:a:s};const Bte=A.defineComponent({__name:"CaptureButton",props:jY,setup(e){const t=e,{t:n}=Z(),r=A.ref(null);A.onMounted(()=>{et(r.value,{content:n("general.captureImage"),arrow:!0})});function a(){console.log(t.element.tagName),mte(t.element,{imageTimeout:1e4,allowTaint:!0,foreignObjectRendering:!0}).then(l=>{console.log(l),i(l.toDataURL(),"file-name.png")})}function i(l,c){const u=document.createElement("a");typeof u.download!="string"?window.open(l):(u.href=l,u.download=c,o(s,u))}function s(l){l.click()}function o(l,c){document.body.appendChild(c),l(c),document.body.removeChild(c)}return(l,c)=>(A.openBlock(),A.createElementBlock("div",null,[A.createElementVNode("button",{ref_key:"button",ref:r,class:"circle-button",onClick:a},[A.createVNode(A.unref(Se),{icon:"camera"})],512)]))}});const wte=M(Bte,[["__scopeId","data-v-4b809ad3"]]),bte={class:"deck-preview no-scrollbar"},_te={class:"top"},Cte={class:"top-left"},kte={key:1,class:"buttons"},Ete={class:"buttons no-scrollbar"},Ste=A.defineComponent({__name:"DeckPreview",props:GY,emits:["click:save","click:share","click:edit-name","click:update-privacy","click:delete"],setup(e,{emit:t}){const n=e,{t:r}=Z(),a=A.ref(),i=A.ref(n.deckName??Hh(n.deckCode)),s=A.ref(!1),o=A.computed(()=>n.deck?n.deck:kt(n.deckCode)),l=A.computed(()=>n.cards?n.cards:Xt(o.value)),c=A.computed(()=>{var f;const d=(f=ta(l.value,o.value,1)[0])==null?void 0:f.cardCode;return{"--deck-summary-background":`url(${_e().callbacks.cardImageCallback(d??"",yt.Full)})`}});function u(){console.log(n.deckCode),t("click:save",{deckName:i.value,deckCode:n.deckCode,isPrivate:s.value})}return(d,f)=>(A.openBlock(),A.createElementBlock("div",bte,[A.createElementVNode("div",_te,[A.createElementVNode("div",Cte,[n.isSaving?A.withDirectives((A.openBlock(),A.createElementBlock("input",{key:0,class:"deck-name","onUpdate:modelValue":f[0]||(f[0]=p=>i.value=p)},null,512)),[[A.vModelText,i.value]]):(A.openBlock(),A.createElementBlock("div",kte,[A.createVNode(wte,{element:a.value},null,8,["element"])]))]),A.createElementVNode("div",Ete,[A.createVNode(AA,A.mergeProps(n.deckButtonsProps,{"onClick:updatePrivacy":f[1]||(f[1]=p=>t("click:update-privacy")),"onClick:editName":f[2]||(f[2]=p=>t("click:edit-name")),"onClick:delete":f[3]||(f[3]=p=>t("click:delete")),"onClick:share":f[4]||(f[4]=p=>t("click:share"))}),null,16),n.isSaving?(A.openBlock(),A.createElementBlock("div",{key:0,class:"fancy-button",onClick:u},A.toDisplayString(A.unref(r)("general.save")),1)):A.createCommentVNode("",!0)])]),A.createElementVNode("div",{class:"deck-summary-wrapper",style:A.normalizeStyle(c.value),ref_key:"deckSummary",ref:a},[A.createVNode(Fd,{deck:o.value},null,8,["deck"])],4)]))}});const Bl=M(Ste,[["__scopeId","data-v-b0ebe75e"]]),xte={cards:{type:Array,required:!1},deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},Fte={class:"deck-highlight-eye"},Ite=A.defineComponent({__name:"DeckHighlightEye",props:xte,setup(e){const t=e,n=A.ref(null),r=A.ref(null),a=A.ref(!1),i=A.ref(!1),s=A.computed(()=>t.deck?t.deck:kt(t.deckCode)),o=A.computed(()=>t.cards?t.cards:Xt(s.value));A.onMounted(()=>{var c;et((c=r.value)==null?void 0:c.$el,{content:n.value,arrow:!0,duration:0,maxWidth:"90vw",touch:!1,onShow(){a.value=!0},onCreate(u){o.value.length<1||u.popper.style.setProperty("--tippy-background",`url(${_e().callbacks.cardImageCallback(ta(o.value,s.value,1)[0].cardCode??"",yt.Full)})`)}})});function l(){i.value=!0}return(c,u)=>(A.openBlock(),A.createElementBlock("div",Fte,[A.createVNode(A.unref(Se),{ref_key:"eyeIcon",ref:r,icon:"eye",class:"icon",onClick:l},null,512),A.createElementVNode("div",{ref_key:"deckSummary",ref:n,class:"deck-summary-wrapper"},[a.value?(A.openBlock(),A.createBlock(Fd,{key:0,class:"deck-summary",deck:s.value,"cards-prop":o.value},null,8,["deck","cards-prop"])):A.createCommentVNode("",!0)],512),A.createVNode(ai,{"show-modal":i.value,"onUpdate:showModal":u[0]||(u[0]=d=>i.value=d)},{default:A.withCtx(()=>[A.createVNode(Bl,{cards:o.value,deck:s.value,"deck-code":t.deckCode,"deck-buttons-props":t.deckButtonsProps},null,8,["cards","deck","deck-code","deck-buttons-props"])]),_:1},8,["show-modal"])]))}});const Kd=M(Ite,[["__scopeId","data-v-a655bad6"]]),Tte={cards:{type:Array,required:!1},deckCode:{type:String,required:!0,default:""},deck:{type:Object,required:!1},showEye:{type:Boolean,required:!1,default:!0},deckButtonsProps:{type:Object,required:!0,default:{deckCode:"",deckId:void 0,showButtons:void 0,archetypeRouterLink:void 0,deckBuilderRouterLink:"404",deckName:void 0,showUploaded:void 0,isPrivate:void 0}}},Ute=A.defineComponent({__name:"DeckHighlight",props:Tte,setup(e){const t=e,n=A.computed(()=>t.deck?t.deck:kt(t.deckCode)),r=A.computed(()=>t.cards?t.cards:Xt(n.value)),a=A.computed(()=>Pu(r.value)),i=A.computed(()=>r.value.filter(s=>Ds(s)));return(s,o)=>(A.openBlock(),A.createElementBlock("div",{class:A.normalizeClass(["deck-highlight",t.showEye?"":"hide-eye"])},[A.createVNode(Zo,{class:"deck-highlight-regions",regions:a.value},null,8,["regions"]),A.createVNode(el,{class:"deck-highlight-cards",cards:i.value,regions:a.value},null,8,["cards","regions"]),A.createVNode(Kd,{class:"deck-highlight-eye",cards:r.value,deck:n.value,"deck-code":t.deckCode,"deck-buttons-props":t.deckButtonsProps},null,8,["cards","deck","deck-code","deck-buttons-props"])],2))}});const ei=M(Ute,[["__scopeId","data-v-02c48ced"]]),Dte={cardCodes:{type:Array,required:!0,default:[]},regions:{type:Array,required:!0,default:[]},filters:{type:Object,required:!0,default:{sampleSizeFilters:[],serverFilters:[],timeFilters:[]}}},hk=A.defineComponent({__name:"ArchetypeSidePanel",props:Dte,emits:["update:filters"],setup(e,{emit:t}){const n=e,r=A.reactive(n.filters);A.watch(r,()=>{t("update:filters",r)});function a(){for(const[,i]of Object.entries(r))i.splice(0)}return(i,s)=>(A.openBlock(),A.createBlock(eA,{"filter-object":n.filters,"onClear:filterObject":a},{default:A.withCtx(()=>[A.createVNode(td,{"card-codes":n.cardCodes,regions:n.regions},null,8,["card-codes","regions"]),A.createVNode(Js,{"filter-array":r.sampleSizeFilters,"onUpdate:filterArray":s[0]||(s[0]=o=>r.sampleSizeFilters=o)},null,8,["filter-array"]),A.createVNode(zi,{"filter-array":r.timeFilters,"onUpdate:filterArray":s[1]||(s[1]=o=>r.timeFilters=o)},null,8,["filter-array"]),A.createVNode(Zs,{"filter-array":r.serverFilters,"onUpdate:filterArray":s[2]||(s[2]=o=>r.serverFilters=o)},null,8,["filter-array"])]),_:1},8,["filter-object"]))}});const Qte={},Lte={class:"social-links"},Ote={href:"https://discord.gg/tGTSXgDFVU"},Mte={href:"https://twitter.com/LORGG__"};function Nte(e,t){const n=A.resolveComponent("FontAwesomeIcon");return A.openBlock(),A.createElementBlock("div",Lte,[A.createElementVNode("a",Ote,[A.createVNode(n,{icon:["fab","discord"],class:"social-icon"})]),A.createElementVNode("a",Mte,[A.createVNode(n,{icon:["fab","twitter"],class:"social-icon"})])])}const gk=M(Qte,[["render",Nte],["__scopeId","data-v-9de6c1ad"]]),Pte={routerLink:{type:Object,required:!0,default:"404"},archetypeRouterLink:{type:Object,required:!1,default:"404"},deckBuilderRouterLink:{type:Object,required:!0,default:"404"},showOwnerButtons:{type:Boolean,required:!1,default:!1},type:{type:String,required:!0,default:"data"},deckCode:{type:String,required:!0,default:""},index:{type:Number,required:!0,default:1},matches:{type:Number,required:!1,default:1},wins:{type:Number,required:!1,default:1},comparedDeckCode:{type:String,required:!1,default:""},isPrivate:{type:Boolean,required:!1,default:!1},id:{type:Number,required:!1,default:1},name:{type:String,required:!1,default:""},updatedAt:{type:Number,required:!1,default:1},createdAt:{type:Number,required:!1,default:1}},Hte={...Cb,difference:{type:Number,required:!0,default:1}},Rte={class:"deck-difference-item"},Vte=A.defineComponent({__name:"DeckDifferenceItem",props:Hte,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",Rte,[A.createVNode(la,{"card-code-prop":t.cardCodeProp,"card-prop":t.cardProp,regions:t.regions,"ignore-card-item":t.ignoreCardItem,"router-link":t.routerLink},null,8,["card-code-prop","card-prop","regions","ignore-card-item","router-link"]),A.createElementVNode("div",{class:A.normalizeClass(["difference",t.difference>0?"positive":"negative"])},A.toDisplayString(`${t.difference>0?"+":""}${t.difference}`),3)]))}});const Xm=M(Vte,[["__scopeId","data-v-cdadc542"]]),Kte={differences:{type:Array,required:!0,default:[]}},$te={class:"deck-differences no-scrollbar"},zte=A.defineComponent({__name:"DeckDifferences",props:Kte,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",$te,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(t.differences,a=>(A.openBlock(),A.createBlock(Xm,{key:a.cardCodeProp,"card-code-prop":a.cardCodeProp,"card-prop":a.cardProp,difference:a.difference,"ignore-card-item":a.ignoreCardItem,regions:a.regions,"router-link":a.routerLink},null,8,["card-code-prop","card-prop","difference","ignore-card-item","regions","router-link"]))),128))]))}});const Jm=M(zte,[["__scopeId","data-v-e4cddaa9"]]),Wte=e=>(A.pushScopeId("data-v-145f94e2"),e=e(),A.popScopeId(),e),Gte={class:"table-card-row-background-wrapper"},jte={class:"table-card-row-background"},Yte=Wte(()=>A.createElementVNode("div",{class:"background-card"},null,-1)),qte=[Yte],Xte={class:"decks-row wrapper"},Jte={class:"column-content"},Zte={class:"column-content"},ene={class:"column-content"},tne={class:"column-content"},nne={key:2,class:"column-content"},rne={class:"column-content cost"},ane={key:3,class:"column-content deck-differences-column"},ine=A.defineComponent({__name:"DecksRow",props:Pte,setup(e){const t=e,n=A.inject(ti),r=A.ref(!1),a=A.computed(()=>kt(t.deckCode)),i=A.computed(()=>Xt(a.value)),s=A.computed(()=>ta(i.value,a.value,2).map(c=>_e().callbacks.cardImageCallback(c.cardCode,yt.Banner))),o=A.computed(()=>({showButtons:{deleteDeck:t.type==="built"?t.showOwnerButtons:!1,updateDeckPrivacy:t.type==="built"?t.showOwnerButtons:!1,editDeckName:t.type==="built"?t.showOwnerButtons:!1,gemsCost:!1,openArchetypePage:t.type!=="built",simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.type==="built"?void 0:t.archetypeRouterLink,deckId:t.type==="built"?t.id:void 0,deckName:t.type==="built"?t.name:void 0,isPrivate:t.type==="built"?t.isPrivate:void 0})),l=A.computed(()=>{const c=[];if(t.type!=="similar")return c;const u=kt(t.comparedDeckCode);for(const[d,f]of Object.entries(a.value))f!==u[d]&&c.push({cardCodeProp:d,difference:f-(u[d]??0),ignoreCardItem:!1,routerLink:_e().callbacks.cardCodeRouterLinkCallback(d)});for(const[d,f]of Object.entries(u))f===a.value[d]||c.some(p=>p.cardCodeProp===d)||c.push({cardCodeProp:d,difference:(a.value[d]??0)-f,ignoreCardItem:!1,routerLink:_e().callbacks.cardCodeRouterLinkCallback(d)});return c});return(c,u)=>{const d=A.resolveComponent("RouterLink");return A.openBlock(),A.createBlock(d,{to:t.routerLink,class:"wrapper"},{default:A.withCtx(()=>{var f;return[A.createElementVNode("div",{class:"decks-row-wrapper wrapper",style:A.normalizeStyle({"--index":t.index})},[A.createElementVNode("div",Gte,[A.createElementVNode("div",jte,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(s.value,p=>(A.openBlock(),A.createElementBlock("div",{key:p,class:"background-card-wrapper",style:A.normalizeStyle({"--background-image":`url(${p})`})},qte,4))),128))])]),A.createElementVNode("div",Xte,[A.createElementVNode("div",{class:"column-content deck-highlight-wrapper",onClick:u[0]||(u[0]=A.withModifiers(()=>{},["stop","prevent"]))},[A.createVNode(ei,{"deck-code":t.deckCode,deck:a.value,cards:i.value,"deck-buttons-props":{...o.value,showButtons:{...o.value.showButtons,gemsCost:!0,shareDeck:!0}}},null,8,["deck-code","deck","cards","deck-buttons-props"])]),t.type==="data"||t.type==="similar"?(A.openBlock(),A.createElementBlock(A.Fragment,{key:0},[A.createElementVNode("div",Jte,A.toDisplayString(A.unref(Qe)(t.matches)),1),A.createElementVNode("div",{class:"column-content",style:A.normalizeStyle({color:`var(${A.unref(er)(t.wins/t.matches)})`})},A.toDisplayString(A.unref(Qe)(t.wins/t.matches*100,1,3))+"% ",5)],64)):t.type==="built"?(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[A.createElementVNode("div",Zte,A.toDisplayString(t.name),1),A.createElementVNode("div",ene,A.toDisplayString(A.unref(n)(t.updatedAt).fromNow()),1),A.createElementVNode("div",tne,A.toDisplayString(A.unref(n)(t.createdAt).fromNow()),1)],64)):A.createCommentVNode("",!0),t.type!=="similar"?(A.openBlock(),A.createElementBlock("div",nne,[A.createVNode(gl,{class:"mana-curve-chart","deck-code":t.deckCode,"padding-top":0,"show-data-labels":!1,"data-labels-offset":0,"tooltips-enabled":!1,"display-x-scale":!1,animation:!1},null,8,["deck-code"])])):A.createCommentVNode("",!0),A.createElementVNode("div",rne,A.toDisplayString((f=A.unref(Xc)(a.value,!0)??A.unref(Xc)(a.value,!1))==null?void 0:f.toLocaleString()),1),t.type==="similar"?(A.openBlock(),A.createElementBlock("div",ane,[A.createVNode(Jm,{differences:l.value},null,8,["differences"])])):A.createCommentVNode("",!0),A.createElementVNode("div",{class:A.normalizeClass(["column-content options-button",r.value?"show":"hide"]),onClick:u[2]||(u[2]=A.withModifiers(p=>r.value=!r.value,["stop","prevent"]))},[A.createVNode(AA,A.mergeProps({onClick:u[1]||(u[1]=A.withModifiers(()=>{},["stop","prevent"])),class:"deck-buttons"},o.value),null,16),A.createVNode(A.unref(Se),{icon:"ellipsis-v"})],2)])],4)]}),_:1},8,["to"])}}});const wl=M(ine,[["__scopeId","data-v-145f94e2"]]),sne={},Ane={class:"icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 172 172"},one=A.createStaticVNode('<g fill="none" stroke-miterlimit="10" style="mix-blend-mode:normal;"><g stroke="var(--color-primary-2)" stroke-width="20" stroke-linejoin="round"><path d="M86 157.277c-39.302 0-71.277-31.975-71.277-71.277S46.698 14.723 86 14.723 157.277 46.698 157.277 86 125.302 157.277 86 157.277z" fill="var(--color-primary)" stroke-width="17.92"></path><path d="M86 16.65C47.761 16.65 16.65 47.76 16.65 86c0 38.239 31.111 69.35 69.35 69.35 38.239 0 69.35-31.111 69.35-69.35 0-38.239-31.111-69.35-69.35-69.35m0-3.853c40.427 0 73.203 32.776 73.203 73.203S126.427 159.203 86 159.203 12.797 126.427 12.797 86 45.573 12.797 86 12.797z" fill="var(--color-primary)" stroke-width="17.92"></path><path d="M93.706 55.178a7.706 7.706 0 1 1-15.412 0 7.706 7.706 0 0 1 15.412 0zM97.558 120.675v3.853H74.442v-3.853h3.852v-42.38h-3.852v-3.853h19.264v46.233z" fill="var(--color-primary-2)" stroke-width="17.92"></path></g><path d="M8.944 163.056V8.944h154.112v154.112z"></path><g stroke-width="1" stroke-linejoin="miter"><path d="M86 157.277c-39.302 0-71.277-31.975-71.277-71.277S46.698 14.723 86 14.723 157.277 46.698 157.277 86 125.302 157.277 86 157.277z" fill="var(--color-background-1)"></path><path d="M86 16.65c38.239 0 69.35 31.111 69.35 69.35 0 38.239-31.111 69.35-69.35 69.35-38.239 0-69.35-31.111-69.35-69.35 0-38.239 31.111-69.35 69.35-69.35m0-3.853c-40.427 0-73.203 32.776-73.203 73.203S45.573 159.203 86 159.203 159.203 126.427 159.203 86 126.427 12.797 86 12.797z" fill="var(--color-background-1)"></path><path d="M86 47.472a7.706 7.706 0 1 0 0 15.411 7.706 7.706 0 0 0 0-15.411zM93.706 120.675V74.442H74.442v3.852h3.852v42.381h-3.852v3.853h23.116v-3.853z" fill="var(--color-primary-2)"></path></g></g>',1),lne=[one];function cne(e,t){return A.openBlock(),A.createElementBlock("svg",Ane,lne)}const Zm=M(sne,[["render",cne]]),une={...hb,routerLink:{type:Object,required:!0,default:{path:"/404"}}},dne={class:"card-item-link-wrapper"},fne={key:0,class:"card-item-wrapper"},pne={key:1,class:"card-item-wrapper"},hne={class:"link-icon"},gne=A.defineComponent({__name:"CardItemLinkWrapper",props:une,setup(e){const t=e;return(n,r)=>{const a=A.resolveComponent("RouterLink");return A.openBlock(),A.createElementBlock("div",dne,[n.isDeckBuilder?(A.openBlock(),A.createElementBlock("div",pne,[A.createVNode(Ga,A.normalizeProps(A.guardReactiveProps(t)),null,16),A.createVNode(a,{class:"link-icon-link",to:t.routerLink},{default:A.withCtx(()=>[A.createElementVNode("div",hne,[A.createVNode(Zm)])]),_:1},8,["to"])])):(A.openBlock(),A.createElementBlock("div",fne,[A.createVNode(a,{to:t.routerLink},{default:A.withCtx(()=>[A.createVNode(Ga,A.normalizeProps(A.guardReactiveProps(t)),null,16)]),_:1},8,["to"])]))])}}});const e1=M(gne,[["__scopeId","data-v-89823586"]]),mne={name:{type:String,required:!0,default:""}},vne={class:"profile-dropdown-wrapper"},yne=A.defineComponent({__name:"ProfileDropdown",props:mne,setup(e){const t=e,n=A.ref(),r=A.ref();return A.onMounted(()=>{et(n.value,{content:r.value,arrow:!0,interactive:!0,interactiveBorder:10})}),(a,i)=>(A.openBlock(),A.createElementBlock("div",vne,[A.createElementVNode("div",{ref_key:"profile",ref:n,class:"profile-dropdown"},A.toDisplayString(t.name),513),A.createElementVNode("div",{ref_key:"dropdown",ref:r,class:"slider-wrapper"},"Test",512)]))}});const t1=M(yne,[["__scopeId","data-v-1c516824"]]),Bne={class:"navigation-top-desktop"},wne={class:"left content"},bne={class:"right content"},_ne={key:1,class:"fancy-button"},Cne=A.defineComponent({__name:"NavigationTopDesktop",props:gb,setup(e){const t=e,{t:n}=Z();return(r,a)=>{var i;return A.openBlock(),A.createElementBlock("div",Bne,[A.createElementVNode("div",wne,[A.createVNode(Xu,{"fetch-seach-result":t.fetchSeachResult,class:"search-bar"},null,8,["fetch-seach-result"]),A.renderSlot(r.$slots,"default",{},void 0,!0)]),A.createElementVNode("div",bne,[A.createVNode(yg,{class:"social-links"}),A.createVNode(Lg,{class:"language-selection"}),A.unref(zr)().user?(A.openBlock(),A.createBlock(t1,{key:0,name:(i=A.unref(zr)().user)==null?void 0:i.name},null,8,["name"])):(A.openBlock(),A.createElementBlock("div",_ne,A.toDisplayString(A.unref(n)("general.signIn")),1))])])}}});const n1=M(Cne,[["__scopeId","data-v-2142e0e0"]]),kne={card:{type:Object,required:!0,default:{associatedCardRefs:["06NX013T1"],regionRefs:["Noxus","06RU002"],attack:1,cost:2,health:1,description:"<link=keyword.PlaySkillMark><sprite name=SkillMark><style=Keyword>Play</style></link>: <link=keyword.Stun><sprite name=Stunned><style=Keyword>Stun</style></link> an enemy or if it's already <link=keyword.Stun><sprite name=Stunned><style=Keyword>Stunned</style></link> deal 2 to it instead.",descriptionRaw:"Play: Stun an enemy or if it's already Stunned deal 2 to it instead.",levelupDescription:"",levelupDescriptionRaw:"",flavorText:`"Student: Sydell Kythera
|
|
876
876
|
Teacher: J. Willough
|
|
877
877
|
Report: I am spiderbit on left forearm. Sydell claims a misunderstanding, but his smirk belies his innocence. He is ordered to two weeks additional chores (refectory)."
|
|
878
878
|
- Ravenbloom discipline card`,artistName:"Polar Engine",name:"Spell Slinger",cardCode:"06NX013",keywords:["Fearsome"],keywordRefs:["Fearsome"],spellSpeedRef:"",rarityRef:"Common",subtypes:["SPIDER"],subtypeRefs:["SPIDER"],supertype:"",typeRef:"Unit",collectible:!0,set:"Set6",createdAt:"2022-09-09",updatedAt:"2022-09-14"}}},Ene={class:"card-similar-cards"},Sne=A.defineComponent({__name:"CardSimilarCards",props:kne,setup(e){const t=e;function n(a,i,s){if(a.length===10&&s<a[0].points)return;let o=0;for(;o<a.length&&a[o].points<s;)o++;a.splice(o,0,{cardCode:i,points:s}),a.length>10&&a.splice(0,1)}const r=A.computed(()=>{const a=[],i=qt().cardJsonObject;let s=0;for(const o in i){if(o===t.card.cardCode||t.card.collectible&&!i[o].collectible)continue;s=0;const l=i[o];for(const c of l.regionRefs)for(const u of t.card.regionRefs)c===u&&(s+=2);for(const c of l.subtypes)for(const u of t.card.subtypes)c===u&&(s+=2);for(const c of l.keywordRefs)for(const u of t.card.keywordRefs)c===u&&(s+=1);l.typeRef===t.card.typeRef&&(s+=3),l.rarityRef!=="None"&&l.rarityRef===t.card.rarityRef&&(s+=1),l.typeRef==="Unit"&&t.card.typeRef==="Unit"&&(s+=(9-Math.abs(l.attack-t.card.attack))/3,s+=(9-Math.abs(l.health-t.card.health))/3),s+=(12-Math.abs(l.cost-t.card.cost))/3,n(a,o,s)}return a.reverse().map(o=>qt().cardJsonObject[o.cardCode])});return(a,i)=>(A.openBlock(),A.createElementBlock("div",Ene,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(r.value,s=>(A.openBlock(),A.createBlock(A.unref(e1),{key:s.cardCode,"card-prop":s,"is-root":!0,"router-link":A.unref(_e)().callbacks.cardCodeRouterLinkCallback(s.cardCode)},null,8,["card-prop","router-link"]))),128))]))}});const mk=M(Sne,[["__scopeId","data-v-4db54a8d"]]),xne={logoType:{type:String,required:!0,default:"logo-and-text"}},vk=e=>(A.pushScopeId("data-v-bb0b24b5"),e=e(),A.popScopeId(),e),Fne={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 862.33 136.654"},Ine=A.createStaticVNode('<path d="M0 2.947h18.418V115.29h77.35v18.416H0Z" data-v-bb0b24b5></path><path d="M205.729 0a68.327 68.327 0 1 1-68.326 68.331A68.3 68.3 0 0 1 205.729 0Zm0 118.236a49.908 49.908 0 1 0-49.909-49.909 49.948 49.948 0 0 0 49.909 49.904Z" data-v-bb0b24b5></path><path d="M396.538 2.947a42.211 42.211 0 0 1 41.991 41.991 41.554 41.554 0 0 1-32.046 40.7l29.1 48.067H414.22l-28.363-46.962h-32.046v46.962h-18.416V68.326h39.413l-39.413-65.38Zm0 65.38a23.481 23.481 0 1 0 0-46.962h-28.73l28.363 46.962Z" data-v-bb0b24b5></path><path d="M495.266 115.291h18.418v18.416h-18.418Z" data-v-bb0b24b5></path><path d="M685.517 60.778v72.928h-18.418v-6.443a68.378 68.378 0 1 1 12.894-107.926l-12.894 13.076a49.909 49.909 0 1 0 0 71.827V79.192h-49.726V60.779Z" data-v-bb0b24b5></path><path d="M862.33 60.778v72.928h-18.417v-6.443a68.379 68.379 0 1 1 12.89-107.926l-12.89 13.076a49.909 49.909 0 1 0 0 71.827V79.192H794.19V60.779Z" data-v-bb0b24b5></path>',6),Tne=[Ine],Une={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 926.43 201.096"},Dne=A.createStaticVNode('<path d="M251.125 49.347h14.423v87.978h60.574v14.422h-75Z" data-v-bb0b24b5></path><path d="M412.235 47.039a53.507 53.507 0 1 1-53.508 53.507 53.487 53.487 0 0 1 53.508-53.507Zm0 92.592a39.084 39.084 0 1 0-39.085-39.084 39.115 39.115 0 0 0 39.085 39.084Z" data-v-bb0b24b5></path><path d="M561.66 49.347a33.056 33.056 0 0 1 32.884 32.884 32.542 32.542 0 0 1-25.1 31.873l22.787 37.642h-16.729l-22.212-36.777h-25.1v36.777h-14.422v-51.2h30.865l-30.865-51.2Zm0 51.2a18.388 18.388 0 1 0 0-36.776h-22.5l22.211 36.776Z" data-v-bb0b24b5></path><path d="M638.976 137.325h14.423v14.422h-14.423Z" data-v-bb0b24b5></path><path d="M787.964 94.635v57.111h-14.422V146.7a53.547 53.547 0 1 1 10.1-84.518l-10.1 10.24a39.084 39.084 0 1 0 0 56.248v-19.616h-38.939v-14.42Z" data-v-bb0b24b5></path><path d="M926.429 94.635v57.111h-14.423V146.7A53.548 53.548 0 1 1 922.1 62.182l-10.094 10.24a39.084 39.084 0 1 0 0 56.248v-19.616h-38.939v-14.42Z" data-v-bb0b24b5></path><path d="M100.548 0A100.548 100.548 0 0 1 201.1 100.548a98.177 98.177 0 0 1-3.633 26.46c-.011-.011-17.535 0-17.535 0s5.292-19.211 5.292-26.46a84.672 84.672 0 0 0-169.344 0c0 46.782 39.667 84.672 84.672 84.672s73.348-43.16 73.348-43.16h18.252A100.558 100.558 0 1 1 100.548 0Z" data-v-bb0b24b5></path><path d="M108.72 45.643c19.711 0 36.623 15.51 36.623 34.994 0 16.991-12.308 31.253-28.078 34.994l15.87 25.34h59.707s-4 7.623-11.509 11.243-18.271 3.238-18.271 3.238h-38.473l-24.415-39.821H72.097v39.821h-15.87V99.945h34.182l-34.182-54.3Zm0 54.3c11.2 0 20.753-8.242 20.753-19.307s-9.557-19.307-20.753-19.307H84.304l24.416 38.614Z" data-v-bb0b24b5></path>',8),Qne=[Dne],Lne={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 201.1 201.12"},One=vk(()=>A.createElementVNode("path",{d:"M100.548 0A100.548 100.548 0 0 1 201.1 100.548a98.177 98.177 0 0 1-3.633 26.46c-.011-.011-17.535 0-17.535 0s5.292-19.211 5.292-26.46a84.672 84.672 0 0 0-169.344 0c0 46.782 39.667 84.672 84.672 84.672s73.348-43.16 73.348-43.16h18.252A100.558 100.558 0 1 1 100.548 0Z"},null,-1)),Mne=vk(()=>A.createElementVNode("path",{d:"M108.72 45.643c19.711 0 36.623 15.51 36.623 34.994 0 16.991-12.308 31.253-28.078 34.994l15.87 25.34h59.707s-4 7.623-11.509 11.243-18.271 3.238-18.271 3.238h-38.473l-24.415-39.821H72.097v39.821h-15.87V99.945h34.182l-34.182-54.3Zm0 54.3c11.2 0 20.753-8.242 20.753-19.307s-9.557-19.307-20.753-19.307H84.304l24.416 38.614Z"},null,-1)),Nne=[One,Mne],Pne=A.defineComponent({__name:"LogoIcon",props:xne,setup(e){const t=e;return(n,r)=>t.logoType==="text-only"?(A.openBlock(),A.createElementBlock("svg",Fne,Tne)):t.logoType==="logo-and-text"?(A.openBlock(),A.createElementBlock("svg",Une,Qne)):(A.openBlock(),A.createElementBlock("svg",Lne,Nne))}});const qs=M(Pne,[["__scopeId","data-v-bb0b24b5"]]),Hne={class:"dashboard-sign-up"},Rne={class:"top"},Vne={class:"subtitle"},Kne={class:"fancy-button"},$ne=A.defineComponent({__name:"DashboardSignUp",setup(e){const{t}=Z();return(n,r)=>(A.openBlock(),A.createElementBlock("div",Hne,[A.createElementVNode("div",Rne,[A.createVNode(qs,{"logo-type":"text-only",class:"logo-icon"}),A.createElementVNode("div",Vne,A.toDisplayString(A.unref(t)("general.becomeTheMaster")),1)]),A.createElementVNode("div",Kne,A.toDisplayString(A.unref(t)("general.signIn")),1)]))}});const yk=M($ne,[["__scopeId","data-v-a8d77f09"]]),zne={deckCode:{type:String,required:!0,default:""},gameMode:{type:String,required:!0,default:""},gameType:{type:String,required:!0,default:""},isAttackingFirst:{type:Boolean,required:!0,default:!0},isVictory:{type:Boolean,required:!0,default:""},opponentDeckCode:{type:String,required:!0,default:""},opponentName:{type:String,required:!0,default:""},playedAt:{type:Date,required:!0,default:new Date},opponentRouterLink:{type:Object,required:!0,default:""},archetypeRouterLink:{type:Object,required:!0,default:""},deckBuilderRouterLink:{type:Object,required:!0,default:""},opponentArchetypeRouterLink:{type:Object,required:!0,default:""},opponentDeckBuilderRouterLink:{type:Object,required:!0,default:""}},Wne=e=>(A.pushScopeId("data-v-ded4c38a"),e=e(),A.popScopeId(),e),Gne={class:"match-item"},jne=Wne(()=>A.createElementVNode("div",{class:"background-card"},null,-1)),Yne=[jne],qne={class:"details"},Xne={class:"match-details"},Jne={class:"game-type"},Zne={class:"time"},ere={class:"main"},tre={class:"container"},nre={class:"container"},rre=A.defineComponent({__name:"MatchItem",props:zne,setup(e){const t=e,{t:n}=Z(),r=A.inject(ti),a=A.computed(()=>kt(t.deckCode)),i=A.computed(()=>kt(t.opponentDeckCode)),s=A.computed(()=>[ta(Xt(a.value),a.value,1)[0],ta(Xt(i.value),i.value,1)[0]].map(c=>_e().callbacks.cardImageCallback(c.cardCode,yt.Banner))),o=A.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!0,openArchetypePage:!0,simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!0},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.archetypeRouterLink})),l=A.computed(()=>({showButtons:{deleteDeck:!1,updateDeckPrivacy:!1,editDeckName:!1,gemsCost:!0,openArchetypePage:!0,simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!0},deckCode:t.opponentDeckCode,deckBuilderRouterLink:t.opponentDeckBuilderRouterLink,archetypeRouterLink:t.opponentArchetypeRouterLink}));return(c,u)=>{const d=A.resolveComponent("RouterLink");return A.openBlock(),A.createElementBlock("div",Gne,[A.createElementVNode("div",{class:"background",style:A.normalizeStyle({"--background-image":`url(${s.value[0]})`})},[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(s.value,f=>(A.openBlock(),A.createElementBlock("div",{key:f,class:"background-card-wrapper",style:A.normalizeStyle({"--background-image":`url(${f})`})},Yne,4))),128))],4),A.createElementVNode("div",qne,[A.createElementVNode("div",Xne,[A.createElementVNode("div",Jne,A.toDisplayString(t.gameType)+" - "+A.toDisplayString(t.gameMode),1),A.createElementVNode("div",Zne,A.toDisplayString(A.unref(r)(t.playedAt).fromNow()),1)]),A.createVNode(d,{to:t.opponentRouterLink,class:"opponent-details"},{default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(t.opponentName),1)]),_:1},8,["to"])]),A.createElementVNode("div",ere,[A.createElementVNode("div",tre,[A.createVNode(ei,{class:"deck-highlight",deck:a.value,"deck-code":t.deckCode,"deck-buttons-props":o.value},null,8,["deck","deck-code","deck-buttons-props"])]),A.createElementVNode("div",{class:"container results",style:A.normalizeStyle({color:t.isVictory?"var(--color-good)":"var(--color-bad)"})},A.toDisplayString(t.isVictory?A.unref(n)("general.victory"):A.unref(n)("general.defeat")),5),A.createElementVNode("div",nre,[A.createVNode(ei,{class:"deck-highlight opponent",deck:i.value,"deck-code":t.opponentDeckCode,"deck-buttons-props":l.value},null,8,["deck","deck-code","deck-buttons-props"])])])])}}});const Bk=M(rre,[["__scopeId","data-v-ded4c38a"]]),are={players:{type:Array,required:!0,default:[]}},ire={class:"leaderboard-top-10-region"},sre=A.defineComponent({__name:"LeaderboardTop10Region",props:are,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",ire,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(t.players,a=>(A.openBlock(),A.createBlock(pn,{key:`${a.name}${a.rank}`,"card-code-prop":a.selected_banner_card??void 0,color:a.selected_banner_color??"var(--color-background-2-rgb)","mana-number":a.rank,name:a.name,"quantity-number":a.lp,"ignore-card-item":!0,"router-link":A.unref(_e)().callbacks.playerRouterLinkCallback(a)},null,8,["card-code-prop","color","mana-number","name","quantity-number","router-link"]))),128))]))}});const r1=M(sre,[["__scopeId","data-v-41d779ee"]]),Are={routerLink:{type:Object,required:!0,default:{path:"/404"}},index:{type:Number,required:!0,default:0},change:{type:Number,required:!0,default:null},favorite_deck:{type:String,required:!0,default:null},lp:{type:Number,required:!0,default:0},matches:{type:Number,required:!0,default:null},name:{type:String,required:!0,default:""},rank:{type:Number,required:!0,default:0},selected_banner_card:{type:String,required:!1,default:null},selected_banner_color:{type:String,required:!1,default:null},server:{type:String,required:!0,default:"americas"},updated_at:{type:String,required:!0,default:""},user_id:{type:Number,required:!0,default:null},wins:{type:Number,required:!0,default:null},shownColumns:{type:Object,required:!0,default:{player:!0,lp:!0,change:!0,wins:!0,matches:!0,winrate:!0,deck:!0}}},ore={class:"leaderboard-detail-row-background-wrapper"},lre={class:"leaderboard-detail-row-background"},cre={class:"leaderboard-detail-row wrapper"},ure={key:1,class:"column-content"},dre={key:3,class:"column-content"},fre={key:4,class:"column-content"},pre={key:6,class:"column-content deck-highlight-wrapper"},hre={key:1},gre=A.defineComponent({__name:"LeaderboardDetailRow",props:Are,setup(e){const t=e,n=A.computed(()=>t.selected_banner_card?["",_e().callbacks.cardImageCallback(t.selected_banner_card,yt.Banner)]:[]),r=A.computed(()=>t.change===null||t.change===void 0?[]:t.change===0?["neutral"]:[t.change>0?"good":"bad"]);return(a,i)=>{const s=A.resolveComponent("RouterLink");return A.openBlock(),A.createBlock(s,{to:t.routerLink,class:"wrapper"},{default:A.withCtx(()=>[A.createElementVNode("div",{class:"leaderboard-detail-row-wrapper wrapper",style:A.normalizeStyle({"--index":t.index})},[A.createElementVNode("div",ore,[A.createElementVNode("div",lre,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(n.value,o=>(A.openBlock(),A.createElementBlock("div",{key:o,class:"background-card",style:A.normalizeStyle({"--background-image":`url(${o})`})},null,4))),128))])]),A.createElementVNode("div",cre,[t.shownColumns.player?(A.openBlock(),A.createElementBlock("div",{key:0,class:"column-content card-wrapper",onClick:i[0]||(i[0]=A.withModifiers(()=>{},["stop","prevent"]))},[A.createVNode(pn,{class:"card-slice-item","card-code-prop":t.selected_banner_card??void 0,color:t.selected_banner_color??"var(--color-background-2-rgb)","ignore-card-item":!0,"mana-number":t.rank,name:t.name,"maintain-aspect-ratio":!1,"router-link":t.routerLink},null,8,["card-code-prop","color","mana-number","name","router-link"])])):A.createCommentVNode("",!0),t.shownColumns.lp?(A.openBlock(),A.createElementBlock("div",ure,A.toDisplayString(A.unref(Qe)(t.lp)),1)):A.createCommentVNode("",!0),t.shownColumns.change?(A.openBlock(),A.createElementBlock("div",{key:2,class:A.normalizeClass(["column-content change",r.value])},[t.change!==null?(A.openBlock(),A.createElementBlock(A.Fragment,{key:0},[A.createVNode(A.unref(Se),{class:"icon",icon:"fa-chevron-down"}),A.createElementVNode("span",null,A.toDisplayString(t.change?A.unref(Qe)(Math.abs(t.change)):""),1)],64)):(A.openBlock(),A.createElementBlock(A.Fragment,{key:1},[],64))],2)):A.createCommentVNode("",!0),t.shownColumns.wins?(A.openBlock(),A.createElementBlock("div",dre,A.toDisplayString(A.unref(Qe)(t.wins)),1)):A.createCommentVNode("",!0),t.shownColumns.matches?(A.openBlock(),A.createElementBlock("div",fre,A.toDisplayString(A.unref(Qe)(t.matches)),1)):A.createCommentVNode("",!0),t.shownColumns.winrate?(A.openBlock(),A.createElementBlock("div",{key:5,class:"column-content",style:A.normalizeStyle({color:t.wins===null||t.matches===null?"var(--color-primary-2)":`var(${A.unref(er)(t.wins/t.matches)})`})},A.toDisplayString(t.matches===null||t.wins===null?"-":A.unref(Qe)(t.wins/t.matches*100,1,3)+"%"),5)):A.createCommentVNode("",!0),t.shownColumns.deck?(A.openBlock(),A.createElementBlock("div",pre,[t.favorite_deck?(A.openBlock(),A.createBlock(ei,{key:0,"deck-code":t.favorite_deck},null,8,["deck-code"])):(A.openBlock(),A.createElementBlock("span",hre,"-"))])):A.createCommentVNode("",!0)])],4)]),_:1},8,["to"])}}});const a1=M(gre,[["__scopeId","data-v-fa1dba25"]]),mre={routerLink:{type:Object,required:!0,default:{path:"/404"}},playerRouterLink:{type:Object,required:!1,default:{path:"/404"}},deckCode:{type:String,required:!0,default:""},type:{type:String,required:!0,default:"built"},wins:{type:Number,required:!1,default:0},matches:{type:Number,required:!1,default:0},deckId:{type:Number,required:!1,default:0},userName:{type:String,required:!1,default:""},userId:{type:Number,required:!1,default:0},deckName:{type:String,required:!1,default:""},updatedAt:{type:Date,required:!1,default:new Date},archetypeRouterLink:{type:Object,required:!1,default:void 0},deckBuilderRouterLink:{type:Object,required:!0,default:"404"},showOwnerButtons:{type:Boolean,required:!1,default:!1},isPrivate:{type:Boolean,required:!1,default:!1}};const vre={},yre=e=>(A.pushScopeId("data-v-5b8e191d"),e=e(),A.popScopeId(),e),Bre={xmlns:"http://www.w3.org/2000/svg",viewBox:"25.21 66.56 353.98 269.42"},wre=yre(()=>A.createElementVNode("path",{"fill-rule":"evenodd",d:"M95 67.249c-9.442 3.237-27.165 14.29-35.055 21.862-11.985 11.504-13.495 17.449-8.521 33.553 2.884 9.338 3.125 12.31 1.653 20.336-.565 3.08-1.282 7.497-1.593 9.816-.654 4.859-1.507 6.968-3.167 7.827-3.347 1.731-6.07-.959-12.46-12.308-3.227-5.732-5.32-5.733-7.478-.002-2.901 7.705-4.229 34.074-2.178 43.267 2.612 11.708 12.146 22.248 23.887 26.408 8.91 3.158 11.435 5.049 14.233 10.662 8.79 17.627 7.541 23.49-4.121 19.348-1.98-.704-5.67-2.014-8.2-2.912-14.356-5.094-16.5 2.124-5.514 18.561 11.421 17.088 27.745 24.899 44.255 21.178 8.934-2.013 10.069-1.524 24.2 10.428 6.649 5.624 4.594 9.455-6.606 12.316-12.406 3.169-15.535 4.779-15.535 7.993 0 5.469 18.596 14.356 38.74 18.513l8.26 1.705 9.6-.008c15.176-.013 24.599-3.381 27.766-9.923 3.23-6.671-3.138-11.752-20.405-16.279-12.779-3.351-30.021-11.869-38.294-18.917-1.247-1.063-3.897-3.157-5.888-4.655-4.364-3.282-4.942-3.837-11.668-11.218-11.085-12.163-22.048-27.835-28.466-40.688-3.51-7.033-9.477-26.526-11.236-36.712-.456-2.64-1.19-6.571-1.631-8.736-2.292-11.243-2.558-44.967-.409-51.864 1.238-3.974 3.331-7.113 8.743-13.113 5.167-5.728 14.42-17.676 17.042-22.003C102.408 72.867 105.053 63.804 95 67.249m208.422.186c-3.908 3.908 15.994 38.934 31.232 54.965 10.996 11.569 10.723 10.583 10.696 38.6-.019 19.623-.295 24.066-1.963 31.6-.536 2.42-1.261 5.93-1.612 7.8-2.746 14.637-10.641 36.205-16.189 44.223-.904 1.308-3.281 4.807-5.282 7.777-10.021 14.873-21.298 27.434-32.304 35.985-8.729 6.78-14.267 10.233-24.2 15.088-5.783 2.826-8.281 3.691-18.309 6.339-18.029 4.761-23.977 11.711-16.463 19.235 10.208 10.222 41.826 8.98 67.937-2.669 18.937-8.448 18.603-13.956-1.126-18.585-11.879-2.787-13.761-6.768-6.284-13.29 10.684-9.318 15.331-11.406 22.045-9.904 19.751 4.416 38.64-5.948 49.204-26.999 7.093-14.133 2.492-17.531-14.547-10.743-14.009 5.581-15.808 2.355-8.334-14.948 3.515-8.137 5.055-9.639 13.261-12.938 12.256-4.926 18.075-9.526 22.289-17.62 5.112-9.82 6.884-21.96 4.955-33.951-.425-2.64-.978-6.6-1.229-8.8-1.713-15.016-5.073-17.902-10.183-8.747-8.477 15.19-14.387 14.824-15.445-.955-.217-3.244-.773-7.942-1.234-10.441-1.032-5.581-.845-7.054 2.093-16.489 4.123-13.244 3.044-19.481-4.99-28.827-11.239-13.075-39.907-29.817-44.018-25.706M154.939 85.232c-3.352.569-6.053 1.748-19.923 8.695-19.225 9.629-19.157 9.528-16.851 24.998.866 5.807 1.256 10.746 2.045 25.875.132 2.53.594 6.94 1.026 9.8.433 2.86 1.057 8.516 1.389 12.568.904 11.063 1.161 11.837 5.636 16.979 4.078 4.685 5.623 6.898 6.554 9.385 3.192 8.532 2.461 17.086-2.219 25.952-4.076 7.723-4.323 11.769-1.59 26.116.523 2.75 1.15 7.416 1.392 10.369.858 10.47 1.649 11.962 8.002 15.115 3.337 1.656 44.33 18.375 56 22.839 5.951 2.277 6.046 2.253 32.8-8.361 37.31-14.801 37.429-14.853 39.694-17.327 1.98-2.162 3.87-11.183 4.91-23.435.346-4.07.906-9.11 1.245-11.2.888-5.479.613-6.76-3.053-14.2-6.949-14.101-6.029-23.115 3.597-35.251 5.448-6.868 6.466-11.089 7.811-32.387.335-5.301.967-11.781 1.404-14.4.437-2.619.971-7.732 1.186-11.362.214-3.63.597-9.435.85-12.9.575-7.874.303-9.161-2.449-11.613-2.137-1.902-25.779-13.911-30.595-15.54L251 85l-47-.059c-25.85-.032-47.928.099-49.061.291m58.368 27.111c31.052 5.446 39.083 34.191 18.288 65.457-6.499 9.772-6.864 11.713-3.691 19.6.885 2.2 4.129 10.93 7.209 19.4 6.148 16.906 11.122 29.697 12.978 33.378C252.452 258.825 249.46 261 233.2 261c-15.701 0-17.591-1.169-15.554-9.621 1.257-5.212-1.044-13.36-9.338-33.066-3.593-8.535-8.291-9.515-11.759-2.453l-1.149 2.34v27.6l1.543 4.506c3.059 8.927 1.215 10.438-13.143 10.775-17.559.412-20.099-1.187-16.9-10.64l1.3-3.841V131l-1.322-3.6c-4.295-11.694-3.493-14.57 4.276-15.338 4.722-.467 39.199-.237 42.153.281m-15.188 22.413c-2.764 1.746-2.719 1.382-2.719 21.844 0 17.841.025 18.442.822 19.799 1.436 2.445 3.249 2.141 6.676-1.119 11.294-10.747 15.557-31.235 7.868-37.817-3.234-2.768-10.192-4.257-12.647-2.707"},null,-1)),bre=[wre];function _re(e,t){return A.openBlock(),A.createElementBlock("svg",Bre,bre)}const i1=M(vre,[["render",_re],["__scopeId","data-v-5b8e191d"]]);const Cre={},kre=e=>(A.pushScopeId("data-v-5b6f3d5e"),e=e(),A.popScopeId(),e),Ere={xmlns:"http://www.w3.org/2000/svg",viewBox:"58.93 70.36 282.28 264.88"},Sre=kre(()=>A.createElementVNode("path",{"fill-rule":"evenodd",d:"M74.274 70.98C70.143 72.453 70 73.187 70 92.989c0 21.375-.191 20.705 7.953 27.937 2.556 2.269 6.54 5.914 8.854 8.1 2.315 2.186 5.915 5.497 8 7.359 2.086 1.861 5.953 5.468 8.593 8.015 2.64 2.547 6.42 5.963 8.4 7.591 1.98 1.628 5.94 5.133 8.8 7.788 2.86 2.654 7 6.432 9.2 8.395 2.2 1.962 5.98 5.503 8.4 7.868s6.59 6.158 9.268 8.429c4.882 4.142 12.716 11.282 23.838 21.729 3.28 3.08 7.792 7.123 10.028 8.985 2.236 1.861 5.776 5.021 7.866 7.021s5.69 5.329 8 7.396c2.31 2.068 6.81 6.22 10 9.226 3.19 3.007 7.69 7.081 10 9.053 21.285 18.171 21.513 18.953 9.193 31.537-11.486 11.732-11.469 11.443-1.589 26.173 10.712 15.973 10.896 15.947 20.619-2.991 11.834-23.052 13.416-25.365 25.434-37.203 11.725-11.549 16.26-14.348 43.754-26.997 11.527-5.303 11.173-7.25-3.018-16.595-15.492-10.2-15.171-10.208-26.226.594-13.433 13.125-12.533 13.445-37.919-13.489-3.986-4.229-12.558-13.143-19.048-19.807-6.49-6.665-13.69-14.274-16-16.909-2.31-2.635-9.78-10.466-16.6-17.402-6.82-6.936-15.279-15.667-18.799-19.402-3.519-3.734-11.46-11.95-17.645-18.256-6.186-6.306-13.297-13.768-15.802-16.581-20.002-22.467-26.5-28.126-33.898-29.522-4.553-.859-33.002-.901-35.382-.051m216.926.059c-7.757 1.18-15.308 7.452-32.457 26.961-2.998 3.41-10.947 11.813-17.664 18.674-18.498 18.89-18.283 16.816-3.329 32.126 5.05 5.17 11.341 11.83 13.981 14.8 10.629 11.958 10.819 11.943 25.898-2.122 3.206-2.991 7.616-6.926 9.8-8.745 2.184-1.819 6.041-5.312 8.571-7.763 4.366-4.231 7.244-6.886 21.639-19.97 13.379-12.161 12.447-9.635 12.278-33.282-.166-23.132 1.735-21.089-19.717-21.188-11.529-.052-16.118.07-19 .509M100.353 214.552c-2.773.991-20.47 12.72-22.081 14.635-1.619 1.924-1.444 3.394.643 5.394 1.846 1.768 16.397 9.364 26.085 13.616 11.889 5.218 13.609 6.491 26.829 19.866 11.076 11.206 10.481 10.327 20.611 30.449 11.967 23.77 11.22 23.54 22.788 7.024 10.227-14.603 10.258-13.976-1.248-25.724-10.551-10.773-10.909-12.12-5.142-19.314 4.67-5.824 3.236-8.817-9.202-19.218-2.55-2.132-6.976-6.088-9.836-8.791-8.553-8.083-10.094-8.421-16.842-3.693-6.031 4.224-8.258 3.44-18.406-6.477-8.442-8.25-10.183-9.202-14.199-7.767m-3.956 64.232c-2.342.689-4.018 2.019-10.527 8.355-3.778 3.678-8.94 8.499-11.47 10.715-7.557 6.617-12.117 11.625-13.871 15.235-4.825 9.931 1.8 21.016 12.924 21.628 6.239.343 9.298-1.455 19.527-11.475 3.971-3.89 9.903-9.585 13.182-12.657 13.369-12.524 13.444-13.102 3.039-23.437-7.544-7.493-10.098-9.161-12.804-8.364m203.369.571c-2.737 1.275-13.946 12.139-15.534 15.057-2.288 4.204-1.446 5.641 9.351 15.954 4.28 4.089 10.49 10.054 13.8 13.257 13.601 13.162 21.004 14.833 29.242 6.6 8.552-8.547 5.312-18.062-11.025-32.369-2.53-2.215-7.718-7.063-11.529-10.773-8.942-8.704-10.453-9.52-14.305-7.726"},null,-1)),xre=[Sre];function Fre(e,t){return A.openBlock(),A.createElementBlock("svg",Ere,xre)}const s1=M(Cre,[["render",Fre],["__scopeId","data-v-5b6f3d5e"]]);const Ire={},Tre=e=>(A.pushScopeId("data-v-81223df9"),e=e(),A.popScopeId(),e),Ure={xmlns:"http://www.w3.org/2000/svg",viewBox:"5.25 32.41 384.35 392.23"},Dre=Tre(()=>A.createElementVNode("path",{"fill-rule":"evenodd",d:"M196.56 32.706c-.242.162-.643.68-.891 1.151-.464.882-6.181 23.37-7.663 30.143-2.029 9.277-13.207 54.007-16.187 64.776-2.401 8.677-2.227 10.411 1.102 11.036 2.465.462 8.894-4.762 13.798-11.212 1.004-1.32 2.566-3.21 3.473-4.2.906-.99 2.417-2.935 3.358-4.322 2.851-4.205 4.112-4.166 7.292.224.916 1.264 2.6 3.288 3.743 4.498 1.142 1.21 3.257 3.64 4.698 5.401 6.387 7.801 10.008 10.411 12.645 9.115 2.896-1.422 3.516 2.259-6.28-37.316-2.423-9.79-4.945-20.05-5.603-22.8-8.63-36.06-11.562-46.819-12.753-46.794-.161.003-.49.138-.732.3m-77.835 9.868c-4.03 2.43-9.532 6.24-14.703 10.181-9.024 6.878-10.169 7.804-13.417 10.853-1.763 1.654-4.015 3.621-5.005 4.371-.99.75-3.702 3.177-6.026 5.393-2.324 2.215-5.474 5.198-7 6.628-3.458 3.241-9.993 10.614-12.232 13.8-.928 1.32-2.79 3.75-4.139 5.4-1.349 1.65-3.548 4.53-4.888 6.4-1.34 1.87-2.926 3.85-3.524 4.4-.599.55-2.45 2.8-4.113 5-1.663 2.2-3.953 5.08-5.087 6.4-1.134 1.32-3.261 4.11-4.725 6.2-1.464 2.09-3.443 4.88-4.399 6.2-8.17 11.289-23.812 36.82-24.163 39.441-.282 2.099.484 2.895 3.842 3.991 24.399 7.967 28.64 32.858 8.613 50.547-4.2 3.71-4.802 4.749-4.005 6.917 1.139 3.094 4.592 10.511 5.944 12.767.771 1.285 2.411 4.317 3.645 6.737s3.462 6.311 4.95 8.646c1.489 2.336 3.697 5.821 4.907 7.746 7.683 12.222 15.624 23.335 21.97 30.748 1.666 1.947 4.165 4.917 5.552 6.6 3.393 4.116 18.291 19.067 22.278 22.357 1.76 1.452 4.28 3.669 5.6 4.926 3.052 2.907 14.983 11.823 22.898 17.112 3.353 2.241 7.313 5.202 8.8 6.581 1.486 1.378 4.005 3.554 5.597 4.836 1.592 1.282 3.752 3.43 4.8 4.774 1.048 1.344 3.54 4.161 5.538 6.259 5.088 5.343 11.547 13.615 14.195 18.181 5.189 8.946 7.369 7.129 5.539-4.618-.458-2.942-.98-6.518-1.161-7.948-.906-7.167-3.701-21.63-4.87-25.2-4.277-13.062-8.002-19.195-11.662-19.199-2.363-.002-5.716-2.286-11.474-7.815-1.65-1.585-4.08-3.663-5.4-4.619-3.099-2.244-19.447-18.69-23.229-23.367-1.601-1.98-4.093-4.95-5.536-6.6-7.749-8.854-11.713-14.165-20.9-28-2.557-3.85-5.634-8.44-6.837-10.2-5.081-7.431-6.634-10.061-11.099-18.794-2.586-5.056-5.616-10.546-6.735-12.2-2.255-3.333-6.408-12.086-7.014-14.781-.886-3.942 4.505-17.812 11.748-30.225 1.155-1.98 3.322-5.76 4.815-8.4 3.088-5.461 12.353-19.487 14.344-21.717.729-.816 2.922-3.643 4.874-6.283 4.239-5.731 12.608-16.065 16.623-20.525 2.06-2.289 2.639-4.032 4.337-13.06 1.059-5.628 4.403-17.624 6.027-21.615.626-1.54 2.075-5.23 3.219-8.2 1.145-2.97 2.752-6.75 3.572-8.4.82-1.65 2.428-5.16 3.571-7.8 1.144-2.64 2.587-5.61 3.206-6.6.619-.99 2.405-4.315 3.97-7.388 4.164-8.182 3.716-10.062-1.631-6.838m152.701-1.017c-.394.638.802 3.336 6.061 13.68 7.714 15.171 14.334 30.793 16.444 38.805.428 1.627 1.251 4.578 1.828 6.558.577 1.98 1.741 6.957 2.586 11.061 1.741 8.459 1.616 8.201 7.055 14.569 3.573 4.183 5.806 6.933 12.8 15.763 17.7 22.344 38.646 60.307 37.177 67.379-.676 3.251-8.705 20.112-15.157 31.828-5.617 10.199-23.977 36.675-29.818 43-.813.88-2.297 2.68-3.298 4-1.001 1.32-2.399 2.94-3.107 3.6-.707.66-2.331 2.55-3.608 4.2-2.713 3.505-27.938 28.771-31.236 31.286-1.235.943-3.395 2.69-4.8 3.883-3.642 3.095-5.699 4.303-7.862 4.618-2.822.411-3.4.977-5.808 5.693-5.426 10.628-7.737 19.106-9.9 36.32-.194 1.54-.629 4.211-.968 5.935-.693 3.535-.813 9.292-.225 10.839.813 2.137 2.274 1.116 6.546-4.574 1.239-1.65 3.164-4.08 4.277-5.4 1.114-1.32 3.412-4.11 5.106-6.2 7.458-9.199 18.47-19.652 26.23-24.899 20.895-14.128 42.028-32.329 55.15-47.501 1.998-2.31 4.673-5.28 5.945-6.6 3.106-3.225 9.323-11.242 16.556-21.349 10.726-14.987 23-38.069 23-43.251 0-1.421-.265-1.773-3.657-4.866-13.765-12.547-17.154-26-10.012-39.734 2.918-5.61 7.799-9.456 15.469-12.187 3.788-1.349 5.4-2.597 5.4-4.181 0-2.486-15.591-29.304-21.703-37.33-.964-1.266-2.992-4.102-4.507-6.302-3.233-4.697-12.836-17.271-16.037-21-1.228-1.43-5.14-5.903-8.693-9.939-3.553-4.037-7.9-9.063-9.66-11.17-6.962-8.333-21.833-22.69-29.55-28.528-2.007-1.519-6.922-5.237-10.921-8.262-11.116-8.41-16.153-11.28-17.103-9.744M179.2 51.341c-.55.296-3.07 1.762-5.6 3.259-2.53 1.498-7.39 4.339-10.8 6.313-3.41 1.975-7.46 4.406-9 5.403-1.54.997-6.847 4.239-11.794 7.206-15.808 9.481-31.025 19.992-33.345 23.033-1.987 2.605-3.944 11.726-2.958 13.789 1.055 2.209 2.118 1.698 11.097-5.333 19.356-15.157 31.76-23.788 34.211-23.805 1.433-.01 2.574 1.182 4.172 4.361 3.175 6.314 4.208 6.746 8.866 3.708 1.623-1.058 4.259-2.7 5.857-3.649 4.495-2.667 4.798-3.169 6.895-11.426.447-1.76 1.8-7.035 3.006-11.723 2.901-11.276 2.809-12.968-.607-11.136m34.667.526c-1.284 1.284 5.221 27.239 7.638 30.478.938 1.256 7.903 6.113 11.489 8.011 3.101 1.642 4.066 1.08 6.79-3.956 3.49-6.451 3.98-6.45 13.616.006 7.527 5.044 20.023 14.489 26.751 20.221 9.473 8.07 11.523 7.245 8.835-3.555-1.659-6.668-2.042-7.168-10.078-13.136-6.485-4.816-28.683-18.844-36.308-22.944-1.98-1.065-5.329-2.973-7.442-4.24-2.113-1.267-5.623-3.289-7.8-4.492-2.177-1.203-5.758-3.194-7.958-4.424-3.846-2.15-4.957-2.545-5.533-1.969m-66.528 42.131c-.473.191-2.293 1.395-4.044 2.675-1.75 1.28-5.216 3.767-7.702 5.527-15.252 10.8-20.061 14.74-30.518 25-7.651 7.506-10.953 11.189-16.78 18.709-1.488 1.92-3.502 4.491-4.476 5.713-1.563 1.962-6.305 8.602-12.875 18.026-8.992 12.898-21.491 35.511-21.525 38.94-.019 2.036 3.141 9.239 6.762 15.412.709 1.21 2.606 4.63 4.214 7.6 11.397 21.048 20.971 33.763 39.005 51.803 19.754 19.761 24.958 24.424 43.868 39.309 9.849 7.752 9.183 9.072 9.042-17.927-.125-24.038.191-22.035-3.762-23.789-1.495-.662-4.107-2.852-9.61-8.053-4.156-3.929-9.331-8.762-11.501-10.742-4.157-3.792-11.026-11.294-14.652-16.001-1.186-1.54-2.888-3.63-3.782-4.644-.894-1.015-2.767-3.535-4.162-5.6-1.86-2.755-3.274-4.326-5.305-5.893-5.021-3.876-15.634-18.493-17.185-23.669-1.028-3.43 6.996-14.13 20.767-27.694 7.562-7.448 8.393-7.601 12.523-2.294.939 1.207 3.069 3.647 4.733 5.422 1.664 1.775 3.892 4.25 4.951 5.5 2.585 3.051 3.779 3.1 7.712.317 4.055-2.87 16.785-15.892 17.142-17.536.331-1.521.569-.625-3.411-12.797-4.73-14.467-6.033-11.772 12.572-26.006 4.48-3.426 4.785-3.849 4.555-6.302-.189-2.012-4.81-13.623-7.882-19.804-.82-1.65-2.009-4.335-2.641-5.966-1.772-4.57-3.648-6.198-6.033-5.236m96.668.395c-.807.807-2.36 3.975-4.415 9.007-.629 1.54-2.336 5.5-3.793 8.8-6.848 15.511-6.888 14.52.812 19.977 8.955 6.347 14.589 11.497 14.589 13.337-.001.946-3.853 12.713-6.344 19.376-1.908 5.104-1.758 5.362 9.369 16.04 11.414 10.953 11.327 10.936 17.454 3.294 1.565-1.952 8.193-9.257 9.696-10.687 2.159-2.052 4.75-.516 12.425 7.366 14.713 15.111 20.166 22.564 19.029 26.01-.732 2.216-7.044 12.21-9.14 14.469-1.679 1.811-4.565 5.349-11.089 13.6-8.574 10.841-41.872 43.429-47.041 46.036-3.976 2.006-3.759.609-3.759 24.2 0 22.706-.039 22.382 2.721 22.382 1.569 0 2.82-.883 13.163-9.293 1.696-1.379 4.396-3.568 6-4.864 1.604-1.297 4.176-3.562 5.716-5.034 1.54-1.471 3.97-3.592 5.4-4.712 1.43-1.121 3.86-3.33 5.4-4.911 1.54-1.58 3.7-3.585 4.8-4.454 3.3-2.61 18.909-17.902 21.546-21.109 1.35-1.642 3.464-4.074 4.698-5.404 2.215-2.389 3.163-3.563 8.898-11.019 7.577-9.85 14.393-21.081 21.886-36.056 5.889-11.771 5.957-12.57 1.607-18.893-.659-.959-2.706-4.332-4.548-7.497-7.471-12.836-15.422-25.234-21.131-32.954-13.902-18.797-15.65-20.983-22.616-28.278-7.44-7.792-13.149-13.243-18.142-17.322-7.348-6.003-18.73-14.447-28.138-20.874-2.216-1.514-3.895-1.691-5.053-.533m-48.324 38.234c-.492.345-1.784 1.944-2.871 3.555-2.76 4.091-6.753 8.511-10.568 11.697-1.784 1.491-9.814 9.219-17.844 17.174-8.03 7.954-15.767 15.427-17.193 16.605-1.426 1.178-6.663 6.102-11.637 10.942-4.975 4.84-14.224 13.736-20.555 19.769-12.119 11.549-13.028 12.587-12.985 14.831.042 2.222.386 2.728 5.306 7.8 2.561 2.64 6.154 6.375 7.986 8.3 5.068 5.328 4.972 5.368 18.52-7.778 5.647-5.48 6.33-5.384 13.358 1.876 1.43 1.478 6.38 6.205 11 10.506s14.823 14.086 22.674 21.744c17.648 17.215 15.94 16.543 23.171 9.12 2.555-2.623 5.293-5.283 6.085-5.912 1.798-1.43 21.471-20.066 26.871-25.456 7.915-7.901 16.576-15.779 17.64-16.046 1.759-.441 3.27.704 10.693 8.098 8.234 8.203 9.025 8.556 11.835 5.279.787-.919 2.988-3.304 4.891-5.3 11.519-12.086 11.901-13.498 5.206-19.285-1.686-1.458-10.356-9.712-19.266-18.343-8.91-8.631-17.28-16.642-18.6-17.803-1.32-1.16-5.756-5.46-9.857-9.555-13.461-13.439-19.294-19.065-22.743-21.936-4.84-4.029-11.755-11.258-15.099-15.785-3.522-4.767-4.303-5.299-6.018-4.097m2.802 27.673c.335.385 1.442 2.328 2.46 4.318 1.977 3.863 6.153 8.307 16.146 17.182 2.23 1.98 5.461 5.196 7.181 7.146 1.721 1.951 4.658 4.92 6.528 6.597 13.563 12.168 15.184 14.028 14.195 16.285-.513 1.169-10.056 10.824-15.845 16.029-1.677 1.509-8.247 7.714-14.6 13.789-15.23 14.565-15.45 14.754-17.166 14.754-1.572 0-2.598-.881-16.275-13.988-4.24-4.063-12.901-12.339-19.247-18.392-11.302-10.781-12.662-12.29-12.662-14.049 0-.61 3.353-4.137 11.3-11.884 6.215-6.059 13.19-12.935 15.5-15.281 2.31-2.346 5.763-5.566 7.674-7.157 5.063-4.214 8.072-7.596 9.55-10.734 2.323-4.934 3.832-6.258 5.261-4.615m-2.368 9.95c-.265.113-1.38 1.408-2.476 2.878-1.977 2.648-14.1 14.843-18.559 18.667-1.275 1.094-5.46 5.272-9.3 9.285-7.641 7.986-7.921 8.488-6.192 11.11 1.133 1.72 37.333 37.449 37.81 37.319 1.004-.273 37.7-37.781 37.942-38.781.143-.59.087-1.526-.124-2.08-.428-1.128-12.115-13.671-14.262-15.309-.758-.578-6.175-6.02-12.038-12.095-10.112-10.476-11.405-11.586-12.801-10.994m2.203 16.313c1.773.925 21.6 21.18 21.9 22.373.147.585.144 1.553-.006 2.15-.348 1.389-22.144 23.394-23.007 23.23-.334-.064-5.602-5.183-11.707-11.376-14.563-14.772-14.98-10.815 3.09-29.282 7.377-7.538 8.003-7.995 9.73-7.095m-16.023 95.832c-1.603 1.261-15.227 23.557-15.633 25.583-.163.818.3 3.34 1.382 7.526.895 3.463 2.229 8.906 2.966 12.096 1.606 6.958 7.686 30.805 12.085 47.4 1.75 6.6 3.462 13.17 3.805 14.6 2.478 10.341 6.74 26.114 7.411 27.429.446.875 1.034 2.724 1.307 4.11.889 4.517 2.575 4.686 3.753.378.379-1.385 1.284-4.407 2.012-6.717.727-2.31 1.728-6 2.222-8.2.495-2.2 1.149-4.99 1.455-6.2 2.792-11.062 9.84-38.585 11.933-46.6 1.437-5.5 3.071-11.98 3.632-14.4.56-2.42 1.807-7.37 2.77-11 2.989-11.267 4.603-18.241 4.603-19.885 0-2.163-.932-3.846-9.589-17.315-1.485-2.31-3.156-5.01-3.714-6-2.806-4.983-5.381-4.588-10.137 1.555-2.771 3.579-3.209 4.54-3.962 8.681-2.699 14.846-3.756 15.117-6.183 1.582-1.658-9.245-8.484-17.481-12.118-14.623"},null,-1)),Qre=[Dre];function Lre(e,t){return A.openBlock(),A.createElementBlock("svg",Ure,Qre)}const A1=M(Ire,[["render",Lre],["__scopeId","data-v-81223df9"]]),Ore=e=>(A.pushScopeId("data-v-111e6ff9"),e=e(),A.popScopeId(),e),Mre=Ore(()=>A.createElementVNode("div",{class:"background"},null,-1)),Nre={class:"content"},Pre={class:"format"},Hre={class:"format-text"},Rre={key:0,class:"details built"},Vre={class:"title"},Kre={class:"extra-info"},$re={class:"info-time"},zre={key:1,class:"details stats"},Wre={class:"stat-column"},Gre={class:"descriptor"},jre={class:"stat-column"},Yre={class:"number"},qre={class:"descriptor"},Xre=A.defineComponent({__name:"DeckBlock",props:mre,setup(e){const t=e,{t:n}=Z(),r=A.inject(ti),a=A.ref(!1),i=A.computed(()=>kt(t.deckCode)),s=A.computed(()=>Xt(i.value)),o=A.computed(()=>Pu(s.value)),l=A.computed(()=>s.value.filter(p=>Ds(p))),c=A.computed(()=>{var h;const p=(h=ta(s.value,i.value,1)[0])==null?void 0:h.cardCode;return{"--background-image":`url(${_e().callbacks.cardImageCallback(p??"",yt.Full)})`}}),u=A.computed(()=>S3(s.value)),d=A.computed(()=>u.value.map(p=>we().dataJson.formats[p]).filter(p=>p!==void 0).sort((p,h)=>p.order-h.order)[0]),f=A.computed(()=>({showButtons:{deleteDeck:t.type==="built"?t.showOwnerButtons:!1,updateDeckPrivacy:t.type==="built"?t.showOwnerButtons:!1,editDeckName:t.type==="built"?t.showOwnerButtons:!1,gemsCost:!1,openArchetypePage:t.type!=="built",simulateMulligan:!0,openInDeckBuilder:!0,copyDeckCode:!0,uploadDeckToLor:!0,shareDeck:!1},deckCode:t.deckCode,deckBuilderRouterLink:t.deckBuilderRouterLink,archetypeRouterLink:t.type==="built"?void 0:t.archetypeRouterLink,deckId:t.type==="built"?t.deckId:void 0,deckName:t.type==="built"?t.deckName:void 0,isPrivate:t.type==="built"?t.isPrivate:void 0}));return(p,h)=>{const m=A.resolveComponent("RouterLink");return A.openBlock(),A.createBlock(m,{to:t.routerLink},{default:A.withCtx(()=>{var B,g,v;return[A.createElementVNode("div",{class:A.normalizeClass(["built-deck-preview",a.value?"show":"hide"]),style:A.normalizeStyle(c.value)},[Mre,A.createVNode(Kd,{class:"deck-highlight-eye icon","deck-code":t.deckCode,onClick:h[0]||(h[0]=A.withModifiers(()=>{},["stop","prevent"])),"deck-buttons-props":{...f.value,showButtons:{...f.value.showButtons,gemsCost:!0,shareDeck:!0}}},null,8,["deck-code","deck-buttons-props"]),A.createElementVNode("div",{class:"options-button icon",onClick:h[1]||(h[1]=A.withModifiers(_=>a.value=!a.value,["stop","prevent"]))},[A.createVNode(A.unref(Se),{icon:"ellipsis-v"})]),A.createVNode(AA,A.mergeProps({onClick:h[2]||(h[2]=A.withModifiers(()=>{},["stop","prevent"])),class:"deck-buttons"},f.value),null,16),A.createVNode(Zo,{class:"deck-highlight-regions deck-highlight-section",regions:o.value},null,8,["regions"]),A.createElementVNode("div",Nre,[A.createElementVNode("div",Pre,[((B=d.value)==null?void 0:B.nameRef)===A.unref(Kr).Eternal?(A.openBlock(),A.createBlock(i1,{key:0,class:"format-icon"})):((g=d.value)==null?void 0:g.nameRef)===A.unref(Kr).Standard?(A.openBlock(),A.createBlock(s1,{key:1,class:"format-icon"})):(A.openBlock(),A.createBlock(A1,{key:2,class:"format-icon"})),A.createElementVNode("span",Hre,A.toDisplayString((v=d.value)==null?void 0:v.name),1)]),A.createVNode(el,{class:"deck-highlight-cards deck-highlight-section",cards:l.value},null,8,["cards"])]),t.type==="built"?(A.openBlock(),A.createElementBlock("div",Rre,[A.createElementVNode("div",Vre,A.toDisplayString(t.deckName),1),A.createElementVNode("div",Kre,[A.createElementVNode("div",{class:"info-user",onClick:h[3]||(h[3]=A.withModifiers(()=>{},["stop","prevent"]))},[A.createVNode(m,{to:t.playerRouterLink},{default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(t.userName),1)]),_:1},8,["to"])]),A.createElementVNode("div",$re,A.toDisplayString(A.unref(r)(t.updatedAt).fromNow()),1)])])):A.createCommentVNode("",!0),t.type==="stats"?(A.openBlock(),A.createElementBlock("div",zre,[A.createElementVNode("div",Wre,[A.createElementVNode("div",{class:"number",style:A.normalizeStyle({color:`var(${A.unref(er)(t.wins/t.matches)})`})},A.toDisplayString(A.unref(Qe)(t.wins/t.matches*100,1,3))+"% ",5),A.createElementVNode("div",Gre,A.toDisplayString(A.unref(n)("general.winrate")),1)]),A.createElementVNode("div",jre,[A.createElementVNode("div",Yre,A.toDisplayString(A.unref(Qe)(t.matches,0,10)),1),A.createElementVNode("div",qre,A.toDisplayString(A.unref(n)("general.matches")),1)])])):A.createCommentVNode("",!0)],6)]}),_:1},8,["to"])}}});const wk=M(Xre,[["__scopeId","data-v-111e6ff9"]]),Jre={headingItems:{type:Array,required:!0,default:[]}},Zre={class:"table-wrapper"},eae={class:"table no-scrollbar"},tae={class:"heading wrapper"},nae=A.defineComponent({__name:"SmallTable",props:Jre,setup(e){const t=e;return(n,r)=>(A.openBlock(),A.createElementBlock("div",Zre,[A.createElementVNode("div",eae,[A.createElementVNode("div",tae,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(t.headingItems,a=>(A.openBlock(),A.createElementBlock("div",{key:a.title,class:"heading-cell column-content"},[A.createElementVNode("div",null,A.toDisplayString(a.title),1)]))),128)),A.renderSlot(n.$slots,"heading",{},void 0,!0)]),A.renderSlot(n.$slots,"default",{},void 0,!0)])]))}});const Zi=M(nae,[["__scopeId","data-v-20cc8387"]]),rae={players:{type:Array,required:!0,default:[]}},aae=e=>(A.pushScopeId("data-v-48a25357"),e=e(),A.popScopeId(),e),iae={class:"leaderboard-top"},sae=aae(()=>A.createElementVNode("div",{class:"heading-background"},null,-1)),Aae={class:"heading-wrapper"},oae=A.defineComponent({__name:"LeaderboardTop",props:rae,setup(e){const t=e,n=A.computed(()=>we().dataJson.servers.map(r=>t.players.filter(a=>a.server===r.nameRef).sort((a,i)=>a.rank-i.rank).slice(0,10)));return(r,a)=>(A.openBlock(),A.createElementBlock("div",iae,[sae,A.createElementVNode("div",Aae,[(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(A.unref(we)().dataJson.servers,i=>(A.openBlock(),A.createElementBlock("div",{key:i.nameRef,class:"heading"},A.toDisplayString(i.name),1))),128))]),(A.openBlock(!0),A.createElementBlock(A.Fragment,null,A.renderList(n.value,(i,s)=>(A.openBlock(),A.createElementBlock("div",{key:s,class:"top-10"},[A.createVNode(r1,{players:i},null,8,["players"])]))),128))]))}});const bk=M(oae,[["__scopeId","data-v-48a25357"]]),lae={flipped:{type:Boolean,required:!0,default:!0},cardCode:{type:String,required:!0,default:"01IO001"}},cae={class:"card-item-3d"},uae=A.defineComponent({__name:"CardItem3d",props:lae,setup(e){const t=e,n={ShadowIsles:"https://static.wikia.nocookie.net/leagueoflegends/images/b/bb/LoR_Shadow_Isles_Card_Back.png",BandleCity:"https://static.wikia.nocookie.net/leagueoflegends/images/c/c4/LoR_Bandle_City_Card_Back.png",Bilgewater:"https://static.wikia.nocookie.net/leagueoflegends/images/2/24/LoR_Bilgewater_Card_Back.png",Demacia:"https://static.wikia.nocookie.net/leagueoflegends/images/6/62/LoR_Demacia_Card_Back.png",Freljord:"https://static.wikia.nocookie.net/leagueoflegends/images/5/5e/LoR_Freljord_Card_Back.png",Ionia:"https://static.wikia.nocookie.net/leagueoflegends/images/3/3d/LoR_Ionia_Card_Back.png",Noxus:"https://static.wikia.nocookie.net/leagueoflegends/images/5/50/LoR_Noxus_Card_Back.png",PiltoverZaun:"https://static.wikia.nocookie.net/leagueoflegends/images/5/57/LoR_Piltover_Card_Back.png",Shurima:"https://static.wikia.nocookie.net/leagueoflegends/images/0/0c/LoR_Shurima_Card_Back.png",Targon:"https://static.wikia.nocookie.net/leagueoflegends/images/a/a6/LoR_Targon_Card_Back.png"},r=A.computed(()=>{const s=Ko(void 0,t.cardCode,!0);if(s.value===void 0)return{};const o=s.value.regionRefs[0];return{content:`url(${n[o]??"https://static.wikia.nocookie.net/leagueoflegends/images/2/2d/LoR_Summoner%27s_Rift_Order_Card_Back.png"})`}}),a=A.computed(()=>({"background-image":`url("${_e().callbacks.cardImageCallback(t.cardCode,yt.Card)}")`,"background-size":"cover"})),i=A.computed(()=>t.flipped?["flipped"]:[]);return(s,o)=>(A.openBlock(),A.createElementBlock("div",cae,[A.createElementVNode("div",{class:A.normalizeClass(["card",i.value])},[A.createElementVNode("div",{class:"front face",style:A.normalizeStyle(r.value)},null,4),A.createElementVNode("div",{class:"back face",style:A.normalizeStyle(a.value)},null,4)],2)]))}});const o1=M(uae,[["__scopeId","data-v-c707fbfe"]]),dae=e=>(A.pushScopeId("data-v-689d131c"),e=e(),A.popScopeId(),e),fae={class:"card-lottery"},pae={class:"cards-container"},hae={key:0,class:"bottom"},gae={class:"slice"},mae={class:"circle-slice-item-wrapper"},vae={class:"options"},yae={class:"primary-button"},Bae={class:"primary-button"},wae=dae(()=>A.createElementVNode("span",null," (23) ",-1)),bae={class:"icon"},_ae={class:"circle-card-item-wrapper"},Cae=A.defineComponent({__name:"CardLottery",setup(e){const t=Object.keys(qt().cardJsonObject),n=[],r=A.ref(null),a=A.computed(()=>r.value?{background:`url(${_e().callbacks.cardImageCallback(r.value,yt.Full)})`,"background-position":"center","background-size":"cover"}:{});function i(o){r.value=o.cardCode.value,o.flipped.value=!0;for(const l of n)o!==l&&setTimeout(()=>{l.display.value=!1},1e3)}function s(){r.value=null,n.splice(0);for(let o=0;o<3;o++)n.push({flipped:A.ref(!1),display:A.ref(!0),cardCode:A.ref(t[Math.floor(Math.random()*t.length)])})}return s(),(o,l)=>{const c=A.resolveDirective("t");return A.openBlock(),A.createElementBlock("div",fae,[A.createElementVNode("div",{class:"card-lottery-background",style:A.normalizeStyle(a.value)},null,4),A.createElementVNode("div",pae,[(A.openBlock(),A.createElementBlock(A.Fragment,null,A.renderList(n,(u,d)=>A.createElementVNode("div",{key:d,class:A.normalizeClass(["card-item-3d-wrapper",u.display.value?null:"hide"])},[A.createVNode(o1,{flipped:u.flipped.value,"card-code":u.cardCode.value,onClick:f=>i(u)},null,8,["flipped","card-code","onClick"])],2)),64))]),r.value?(A.openBlock(),A.createElementBlock("div",hae,[A.createElementVNode("div",gae,[A.createElementVNode("div",mae,[A.createVNode(pn,{color:"133, 133, 133",name:"Player","card-code-prop":r.value,"ignore-card-item":!0},null,8,["card-code-prop"])])]),A.createElementVNode("div",vae,[A.withDirectives(A.createElementVNode("button",yae,null,512),[[c,"cardLottery.setBanner"]]),A.withDirectives(A.createElementVNode("button",Bae,null,512),[[c,"cardLottery.setIcon"]]),A.createElementVNode("button",{class:"primary-button",onClick:s},[A.withDirectives(A.createElementVNode("span",null,null,512),[[c,"cardLottery.openAnother"]]),wae])]),A.createElementVNode("div",bae,[A.createElementVNode("div",_ae,[A.createVNode(la,{color:"133, 133, 133","card-code-prop":r.value,"ignore-card-item":!0,"router-link":""},null,8,["card-code-prop"])])])])):A.createCommentVNode("",!0)])}}});const _k=M(Cae,[["__scopeId","data-v-689d131c"]]),kae={bannerCardCode:{type:String,required:!0,default:""},bannerColor:{type:String,required:!0,default:""},iconCardCode:{type:String,required:!0,default:""},name:{type:String,required:!0,default:""},server:{type:String,required:!0,default:""},matches:{type:Number,required:!0,default:1},wins:{type:Number,required:!0,default:1},premiumExpiration:{type:Date,required:!1,default:null},isPremiumRenewing:{type:Boolean,required:!0,default:!1},routerLink:{type:Object,required:!0,default:""},premiumLink:{type:Object,required:!0,default:""}},Eae={wins:{type:Number,required:!0,default:1},matches:{type:Number,required:!0,default:2},cutout:{type:Number,required:!1,default:145}},l1=A.defineComponent({__name:"WinrateDoughnutChart",props:Eae,setup(e){const t=e,n=A.ref(null);Oe.register(...kr);const r=A.computed(()=>({labels:["Wins","Losses"],datasets:[{data:[t.wins,t.matches-t.wins],backgroundColor:["#00adff","#ff5153"]}]})),a={cutout:t.cutout,elements:{arc:{borderWidth:0}},plugins:{legend:{display:!1},datalabels:{display:!1}}},i=[{id:"text",beforeDraw:function(s){const o=s.chartArea.width,l=s.chartArea.height,c=s.ctx;c.restore();const u=(l/100).toFixed(2);c.font=`bold ${u}em sans-serif`,c.textBaseline="middle";const d=s.data.datasets[0].data[0],f=s.data.datasets[0].data[1],p=(d/(d+f)*100).toFixed(2)+"%",h=Math.round((o-c.measureText(p).width)/2),m=l/2;d>f?c.fillStyle="#00adff":d<f?c.fillStyle="#ff5153":c.fillStyle="#ffffff",c.fillText(p,h,m),c.save()}}];return(s,o)=>(A.openBlock(),A.createBlock(A.unref(ud),{ref_key:"chart",ref:n,"chart-data":r.value,options:a,plugins:i},null,8,["chart-data"]))}}),Sae={class:"dashboard-profile"},xae={class:"profile-banner"},Fae=["src"],Iae={class:"edit-banner"},Tae={class:"profile-text"},Uae={class:"profile-region"},Dae={class:"profile-tiles"},Qae={class:"profile-tile"},Lae={class:"tile-content"},Oae={class:"games-text"},Mae={class:"tile-text"},Nae={class:"profile-tile"},Pae={class:"chart-container"},Hae={class:"tile-content"},Rae={class:"tile-text"},Vae={key:0,class:"profile-premium-expiration"},Kae={class:"profile-premium-expiration-time"},$ae=A.defineComponent({__name:"DashboardProfile",props:kae,setup(e){const t=e,{t:n}=Z(),r=A.inject(ti);return(a,i)=>{const s=A.resolveComponent("RouterLink");return A.openBlock(),A.createElementBlock("div",Sae,[A.createElementVNode("div",xae,[A.createElementVNode("img",{alt:"Profile Banner",src:A.unref(_e)().callbacks.cardImageCallback(t.bannerCardCode??"05BC160",A.unref(yt).Banner),class:"profile-banner-img"},null,8,Fae),A.createVNode(la,{"card-code-prop":t.iconCardCode??"05BC160","ignore-card-item":!0,"color-override":t.bannerColor,"router-link":t.routerLink},null,8,["card-code-prop","color-override","router-link"]),A.createElementVNode("div",Iae,[A.createVNode(A.unref(Se),{icon:"pencil-alt"})])]),A.createElementVNode("div",Tae,[A.createVNode(s,{to:t.routerLink,class:"profile-name"},{default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(t.name),1)]),_:1},8,["to"]),A.createElementVNode("div",Uae,A.toDisplayString(t.server),1)]),A.createElementVNode("div",Dae,[A.createElementVNode("div",Qae,[A.createElementVNode("div",Lae,[A.createElementVNode("div",Oae,A.toDisplayString(A.unref(Qe)(t.matches,0,10)),1)]),A.createElementVNode("div",Mae,A.toDisplayString(A.unref(n)("general.gamesPlayed")),1)]),A.createElementVNode("div",Nae,[A.createElementVNode("div",Pae,[A.createElementVNode("div",Hae,[A.createVNode(l1,{matches:t.matches,wins:t.wins,cutout:30},null,8,["matches","wins"])])]),A.createElementVNode("div",Rae,A.toDisplayString(A.unref(n)("general.winrate")),1)])]),t.premiumExpiration?(A.openBlock(),A.createElementBlock("div",Vae,[A.createTextVNode(A.toDisplayString(A.unref(n)("general.premium"))+" "+A.toDisplayString(t.isPremiumRenewing?A.unref(n)("general.renews"):A.unref(n)("general.expires"))+" ",1),A.createElementVNode("b",Kae,A.toDisplayString(A.unref(r)(t.premiumExpiration).fromNow()),1)])):(A.openBlock(),A.createBlock(s,{key:1,to:t.premiumLink,class:"profile-premium fancy-button"},{default:A.withCtx(()=>[A.createTextVNode(A.toDisplayString(A.unref(n)("general.getPremium")),1)]),_:1},8,["to"]))])}}});const Ck=M($ae,[["__scopeId","data-v-592eac82"]]),zae={data:{type:Array,required:!0,default:[]},type:{type:String,required:!0,default:"totalPlayers"},server:{type:String,required:!1}};function Wae(e,t){const{t:n}=Z();Oe.register(Ji),e.plugins||(e.plugins={}),e.plugins.annotation||(e.plugins.annotation={}),e.plugins.annotation.annotations=[];let r=new Date("1972-01-01"),a=new Date("3000-12-01");for(const s of t)s>r&&(r=s),s<a&&(a=s);const i=[];for(const s of Object.values(we().dataJson.patches))new Date(s.startTime)<=r&&new Date(s.startTime)>=a&&i.push(s);for(const s of i)e.plugins.annotation.annotations.push({type:"line",xMin:s.startTime,xMax:s.startTime,borderColor:"rgba(255, 255, 255, 0.1)",borderDash:[10,5],borderWidth:1,label:{content:`${n("general.patch")} ${s.name}`,display:!0,position:"start",font:{weight:"normal"},backgroundColor:"rgba(0,0,0,0.2)"}})}const kk=A.defineComponent({__name:"LeaderboardChart",props:zae,setup(e){const t=e,n=A.ref();Oe.register(...kr),Oe.register(Ji);const r=A.computed(()=>t.data.slice().sort((s,o)=>+s.date-+o.date)),a=A.computed(()=>{let s;return t.type==="totalPlayers"?s=we().dataJson.servers.filter(o=>t.server===null?!0:o.nameRef===t.server).map(o=>({label:o.name,borderColor:I1(o.nameRef),data:r.value.filter(l=>l.server===o.nameRef).map(l=>l.players),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"})):s=r.value.reduce((o,l)=>o.includes(l.name)?o:[...o,l.name],[]).map(o=>({label:o,borderColor:I1(o),data:r.value.filter(l=>l.name===o).map(l=>t.type==="lp"?l.lp:l.rank),pointBackgroundColor:"rgba(255, 255, 255, 0.25)"})),{labels:r.value.map(o=>o.date).filter((o,l,c)=>c.findIndex(u=>u.getTime()===o.getTime())===l),datasets:s}}),i={plugins:{legend:{display:!0},tooltip:{mode:"nearest",position:"nearest",axis:"x",intersect:!1},annotation:{annotations:[]},datalabels:{display:!1}},elements:{line:{tension:.25}},scales:{x:{type:"time",time:{unit:"day",displayFormats:{day:"MMM D"},tooltipFormat:"MMM D"}}}};return Wae(i,t.data.map(s=>s.date)),(s,o)=>(A.openBlock(),A.createBlock(A.unref(W_),{ref_key:"chart",ref:n,"chart-data":a.value,options:i},null,8,["chart-data"]))}}),Gae={data:{type:Array,required:!0,default:[]},type:{type:Object,required:!0,default:"winrate"},baseline:{type:Number,required:!1,default:50}},Ek=A.defineComponent({__name:"CardQuantityBarChart",props:Gae,setup(e){const t=e,{t:n}=Z(),r=A.ref();Oe.register(...kr),Oe.register(Ji),Oe.register(Cd);const a=A.computed(()=>({labels:t.data.map(s=>s.quantity),datasets:[{backgroundColor:t.data.map(s=>s.wins*2>=s.matches?"rgba(0, 173, 255, 0.5)":"rgba(255, 81, 83, 0.5)"),borderWidth:0,borderRadius:9999,data:t.data.map(s=>t.type==="winrate"?s.wins/s.matches*100-t.baseline:s.matches)}]})),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{title(s){return`${n("general.quantity")}: ${s[0].label}`},label(s){return t.type==="winrate"?(s.dataset.data[s.dataIndex]+t.baseline).toFixed(2)+"%":s.dataset.data[s.dataIndex].toString()},footer(s){return[`${n("general.matches")}: ${t.data[s[0].dataIndex].matches}`,`${n("general.wins")}: ${t.data[s[0].dataIndex].wins}`]}}},datalabels:{display:!1}},scales:{y:{title:{display:!0,text:t.type==="winrate"?n("general.winrate"):n("general.matches")},ticks:{callback(s){return t.type==="winrate"?s+t.baseline+"%":s}}},x:{title:{display:!0,text:n("general.quantity")}}}};return(s,o)=>(A.openBlock(),A.createBlock(A.unref(cd),{ref_key:"chart",ref:r,"chart-data":a.value,options:i},null,8,["chart-data"]))}}),jae={data:{type:Array,required:!0,default:""}},Sk=A.defineComponent({__name:"WinsLossesBarChart",props:jae,setup(e){const t=e,{t:n}=Z(),r=A.ref();Oe.register(...kr),Oe.register(Ji),Oe.register(Cd);const a=A.computed(()=>t.data.length===0?!1:typeof t.data[0].column!="string"),i=A.computed(()=>a.value?t.data.slice().sort((u,d)=>u.column.getTime()-d.column.getTime()):t.data),s=A.computed(()=>[...new Set(i.value.map(u=>u.column))]),o=A.computed(()=>({losses:i.value.map(u=>u.matches-u.wins),wins:i.value.map(u=>u.wins)})),l=A.computed(()=>({labels:s.value,datasets:Object.entries(o.value).map((u,d)=>({backgroundColor:u[0]==="wins"?`rgba(${Va("--color-good-rgb")}, 0.5)`:`rgba(${Va("--color-bad-rgb")}, 0.5)`,data:u[1],borderRadius:d===0?{topLeft:0,topRight:0,bottomLeft:10,bottomRight:10}:{topLeft:10,topRight:10,bottomLeft:0,bottomRight:0},borderSkipped:!1,label:n(`general.${u[0]}`),barPercentage:.5}))})),c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{enabled:!0,mode:"index",intersect:!1,callbacks:{footer(u){if(u.length===0)return"";let d=0;const f=u[0].chart.data.datasets[1].data[u[0].dataIndex];for(let p=0;p<u[0].chart.data.datasets.length;p++)d+=u[0].chart.data.datasets[p].data[u[0].dataIndex];return`${n("general.total")}: ${d}
|