algomintx 2.0.0

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.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see algomintx.js.LICENSE.txt */
2
+ (()=>{var __webpack_modules__={251:(t,e)=>{e.read=function(t,e,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,c=l>>1,h=-7,d=n?r-1:0,u=n?-1:1,p=t[e+d];for(d+=u,a=p&(1<<-h)-1,p>>=-h,h+=s;h>0;a=256*a+t[e+d],d+=u,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=i;h>0;o=256*o+t[e+d],d+=u,h-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),a-=c}return(p?-1:1)*o*Math.pow(2,a-i)},e.write=function(t,e,n,i,r,a){var o,s,l,c=8*a-r-1,h=(1<<c)-1,d=h>>1,u=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:a-1,m=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+d>=1?u/l:u*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=h?(s=0,o=h):o+d>=1?(s=(e*l-1)*Math.pow(2,r),o+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;t[n+p]=255&s,p+=m,s/=256,r-=8);for(o=o<<r|s,c+=r;c>0;t[n+p]=255&o,p+=m,o/=256,c-=8);t[n+p-m]|=128*g}},454:t=>{"use strict";var e="%[a-f0-9]{2}",n=new RegExp("("+e+")|([^%]+?)","gi"),i=new RegExp("("+e+")+","gi");function r(t,e){try{return[decodeURIComponent(t.join(""))]}catch(t){}if(1===t.length)return t;e=e||1;var n=t.slice(0,e),i=t.slice(e);return Array.prototype.concat.call([],r(n),r(i))}function a(t){try{return decodeURIComponent(t)}catch(a){for(var e=t.match(n)||[],i=1;i<e.length;i++)e=(t=r(e,i).join("")).match(n)||[];return t}}t.exports=function(t){if("string"!=typeof t)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof t+"`");try{return t=t.replace(/\+/g," "),decodeURIComponent(t)}catch(e){return function(t){for(var e={"%FE%FF":"��","%FF%FE":"��"},n=i.exec(t);n;){try{e[n[0]]=decodeURIComponent(n[0])}catch(t){var r=a(n[0]);r!==n[0]&&(e[n[0]]=r)}n=i.exec(t)}e["%C2"]="�";for(var o=Object.keys(e),s=0;s<o.length;s++){var l=o[s];t=t.replace(new RegExp(l,"g"),e[l])}return t}(t)}}},494:(t,e,n)=>{var i,r;"undefined"!=typeof navigator&&(r=window||{},void 0===(i=function(){return function(t){"use strict";var e,n="",i=-999999,r=!1,a=!0,o="",s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),l=Math.pow,c=Math.sqrt,h=Math.floor,d=(Math.max,Math.min),u={};(function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],n=e.length;for(t=0;t<n;t+=1)u[e[t]]=Math[e[t]]})(),u.random=Math.random,u.abs=function(t){if("object"==typeof t&&t.length){var e,n=L(t.length),i=t.length;for(e=0;e<i;e+=1)n[e]=Math.abs(t[e]);return n}return Math.abs(t)};var p=150,m=Math.PI/180,g=.5519;function f(t){t&&Math.round}function y(t,e,n,i){this.type=t,this.currentTime=e,this.totalTime=n,this.direction=i<0?-1:1}function v(t,e){this.type=t,this.direction=e<0?-1:1}function w(t,e,n,i){this.type=t,this.currentLoop=n,this.totalLoops=e,this.direction=i<0?-1:1}function b(t,e,n){this.type=t,this.firstFrame=e,this.totalFrames=n}function x(t,e){this.type=t,this.target=e}function S(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function A(t){this.type="configError",this.nativeError=t}f(!1);var C,k=(C=0,function(){return o+"__lottie_element_"+(C+=1)});function I(t,e,n){var i,r,a,o,s,l,c,h;switch(l=n*(1-e),c=n*(1-(s=6*t-(o=Math.floor(6*t)))*e),h=n*(1-(1-s)*e),o%6){case 0:i=n,r=h,a=l;break;case 1:i=c,r=n,a=l;break;case 2:i=l,r=n,a=h;break;case 3:i=l,r=c,a=n;break;case 4:i=h,r=l,a=n;break;case 5:i=n,r=l,a=c}return[i,r,a]}function E(t,e,n){var i,r=Math.max(t,e,n),a=Math.min(t,e,n),o=r-a,s=0===r?0:o/r,l=r/255;switch(r){case a:i=0;break;case t:i=e-n+o*(e<n?6:0),i/=6*o;break;case e:i=n-t+2*o,i/=6*o;break;case n:i=t-e+4*o,i/=6*o}return[i,s,l]}function _(t,e){var n=E(255*t[0],255*t[1],255*t[2]);return n[1]+=e,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),I(n[0],n[1],n[2])}function M(t,e){var n=E(255*t[0],255*t[1],255*t[2]);return n[2]+=e,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),I(n[0],n[1],n[2])}function D(t,e){var n=E(255*t[0],255*t[1],255*t[2]);return n[0]+=e/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),I(n[0],n[1],n[2])}!function(){var t,e,n=[];for(t=0;t<256;t+=1)e=t.toString(16),n[t]=1===e.length?"0"+e:e}();function P(){}P.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var n=this._cbs[t],i=0;i<n.length;i+=1)n[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var n=0,i=this._cbs[t].length;n<i;)this._cbs[t][n]===e&&(this._cbs[t].splice(n,1),n-=1,i-=1),n+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var T=function(){function t(t,e){var n,i=0,r=[];switch(t){case"int16":case"uint8c":n=1;break;default:n=1.1}for(i=0;i<e;i+=1)r.push(n);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,n){return"float32"===e?new Float32Array(n):"int16"===e?new Int16Array(n):"uint8c"===e?new Uint8ClampedArray(n):t(e,n)}:t}();function L(t){return Array.apply(null,{length:t})}function B(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function F(t){return document.createElement(t)}function R(){}R.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var N,V=(N={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return N[t]||""}),z={1:"butt",2:"round",3:"square"},G={1:"miter",2:"round",3:"bevel"},W=function(){var t=Math.cos,e=Math.sin,n=Math.tan,i=Math.round;function r(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function o(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(1,0,0,0,0,i,-r,0,0,r,i,0,0,0,0,1)}function s(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,0,r,0,0,1,0,0,-r,0,i,0,0,0,0,1)}function l(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function c(t,e){return this._t(1,e,t,1,0,0)}function h(t,e){return this.shear(n(t),n(e))}function d(i,r){var a=t(r),o=e(r);return this._t(a,o,0,0,-o,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(i),1,0,0,0,0,1,0,0,0,0,1)._t(a,-o,0,0,o,a,0,0,0,0,1,0,0,0,0,1)}function u(t,e,n){return n||0===n||(n=1),1===t&&1===e&&1===n?this:this._t(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1)}function p(t,e,n,i,r,a,o,s,l,c,h,d,u,p,m,g){return this.props[0]=t,this.props[1]=e,this.props[2]=n,this.props[3]=i,this.props[4]=r,this.props[5]=a,this.props[6]=o,this.props[7]=s,this.props[8]=l,this.props[9]=c,this.props[10]=h,this.props[11]=d,this.props[12]=u,this.props[13]=p,this.props[14]=m,this.props[15]=g,this}function m(t,e,n){return n=n||0,0!==t||0!==e||0!==n?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1):this}function g(t,e,n,i,r,a,o,s,l,c,h,d,u,p,m,g){var f=this.props;if(1===t&&0===e&&0===n&&0===i&&0===r&&1===a&&0===o&&0===s&&0===l&&0===c&&1===h&&0===d)return f[12]=f[12]*t+f[15]*u,f[13]=f[13]*a+f[15]*p,f[14]=f[14]*h+f[15]*m,f[15]*=g,this._identityCalculated=!1,this;var y=f[0],v=f[1],w=f[2],b=f[3],x=f[4],S=f[5],A=f[6],C=f[7],k=f[8],I=f[9],E=f[10],_=f[11],M=f[12],D=f[13],P=f[14],T=f[15];return f[0]=y*t+v*r+w*l+b*u,f[1]=y*e+v*a+w*c+b*p,f[2]=y*n+v*o+w*h+b*m,f[3]=y*i+v*s+w*d+b*g,f[4]=x*t+S*r+A*l+C*u,f[5]=x*e+S*a+A*c+C*p,f[6]=x*n+S*o+A*h+C*m,f[7]=x*i+S*s+A*d+C*g,f[8]=k*t+I*r+E*l+_*u,f[9]=k*e+I*a+E*c+_*p,f[10]=k*n+I*o+E*h+_*m,f[11]=k*i+I*s+E*d+_*g,f[12]=M*t+D*r+P*l+T*u,f[13]=M*e+D*a+P*c+T*p,f[14]=M*n+D*o+P*h+T*m,f[15]=M*i+D*s+P*d+T*g,this._identityCalculated=!1,this}function f(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function y(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function v(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function w(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function b(t,e,n){return{x:t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]}}function x(t,e,n){return t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12]}function S(t,e,n){return t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13]}function A(t,e,n){return t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]}function C(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,n=-this.props[1]/t,i=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,s=new W;return s.props[0]=e,s.props[1]=n,s.props[4]=i,s.props[5]=r,s.props[12]=a,s.props[13]=o,s}function k(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function I(t){var e,n=t.length,i=[];for(e=0;e<n;e+=1)i[e]=k(t[e]);return i}function E(t,e,n){var i=T("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=n[0],i[5]=n[1];else{var r=this.props[0],a=this.props[1],o=this.props[4],s=this.props[5],l=this.props[12],c=this.props[13];i[0]=t[0]*r+t[1]*o+l,i[1]=t[0]*a+t[1]*s+c,i[2]=e[0]*r+e[1]*o+l,i[3]=e[0]*a+e[1]*s+c,i[4]=n[0]*r+n[1]*o+l,i[5]=n[0]*a+n[1]*s+c}return i}function _(t,e,n){return this.isIdentity()?[t,e,n]:[t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]]}function M(t,e){if(this.isIdentity())return t+","+e;var n=this.props;return Math.round(100*(t*n[0]+e*n[4]+n[12]))/100+","+Math.round(100*(t*n[1]+e*n[5]+n[13]))/100}function D(){for(var t=0,e=this.props,n="matrix3d(";t<16;)n+=i(1e4*e[t])/1e4,n+=15===t?")":",",t+=1;return n}function P(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function L(){var t=this.props;return"matrix("+P(t[0])+","+P(t[1])+","+P(t[4])+","+P(t[5])+","+P(t[12])+","+P(t[13])+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=o,this.rotateY=s,this.rotateZ=l,this.skew=h,this.skewFromAxis=d,this.shear=c,this.scale=u,this.setTransform=p,this.translate=m,this.transform=g,this.applyToPoint=b,this.applyToX=x,this.applyToY=S,this.applyToZ=A,this.applyToPointArray=_,this.applyToTriplePoints=E,this.applyToPointStringified=M,this.toCSS=D,this.to2dCSS=L,this.clone=v,this.cloneFromProps=w,this.equals=y,this.inversePoints=I,this.inversePoint=k,this.getInverseMatrix=C,this._t=this.transform,this.isIdentity=f,this._identity=!0,this._identityCalculated=!1,this.props=T("float32",16),this.reset()}}();!function(t,e){var n,i=this,r=256,a="random",o=e.pow(r,6),s=e.pow(2,52),l=2*s,c=255;function h(t){var e,n=t.length,i=this,a=0,o=i.i=i.j=0,s=i.S=[];for(n||(t=[n++]);a<r;)s[a]=a++;for(a=0;a<r;a++)s[a]=s[o=c&o+t[a%n]+(e=s[a])],s[o]=e;i.g=function(t){for(var e,n=0,a=i.i,o=i.j,s=i.S;t--;)e=s[a=c&a+1],n=n*r+s[c&(s[a]=s[o=c&o+e])+(s[o]=e)];return i.i=a,i.j=o,n}}function d(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function u(t,e){var n,i=[],r=typeof t;if(e&&"object"==r)for(n in t)try{i.push(u(t[n],e-1))}catch(t){}return i.length?i:"string"==r?t:t+"\0"}function p(t,e){for(var n,i=t+"",r=0;r<i.length;)e[c&r]=c&(n^=19*e[c&r])+i.charCodeAt(r++);return m(e)}function m(t){return String.fromCharCode.apply(0,t)}e["seed"+a]=function(c,g,f){var y=[],v=p(u((g=!0===g?{entropy:!0}:g||{}).entropy?[c,m(t)]:null===c?function(){try{n;var e=new Uint8Array(r);return(i.crypto||i.msCrypto).getRandomValues(e),m(e)}catch(e){var a=i.navigator,o=a&&a.plugins;return[+new Date,i,o,i.screen,m(t)]}}():c,3),y),w=new h(y),b=function(){for(var t=w.g(6),e=o,n=0;t<s;)t=(t+n)*r,e*=r,n=w.g(1);for(;t>=l;)t/=2,e/=2,n>>>=1;return(t+n)/e};return b.int32=function(){return 0|w.g(4)},b.quick=function(){return w.g(4)/4294967296},b.double=b,p(m(w.S),t),(g.pass||f||function(t,n,i,r){return r&&(r.S&&d(r,w),t.state=function(){return d(w,{})}),i?(e[a]=t,n):t})(b,v,"global"in g?g.global:this==e,g.state)},p(e.random(),t)}([],u);var O=function(){var t={getBezierEasing:function(t,n,i,r,a){var o=a||("bez_"+t+"_"+n+"_"+i+"_"+r).replace(/\./g,"p");if(e[o])return e[o];var s=new h([t,n,i,r]);return e[o]=s,s}},e={};var n=11,i=1/(n-1),r="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function o(t,e){return 3*e-6*t}function s(t){return 3*t}function l(t,e,n){return((a(e,n)*t+o(e,n))*t+s(e))*t}function c(t,e,n){return 3*a(e,n)*t*t+2*o(e,n)*t+s(e)}function h(t){this._p=t,this._mSampleValues=r?new Float32Array(n):new Array(n),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],n=this._p[1],i=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===n&&i===r?t:0===t?0:1===t?1:l(this._getTForX(t),n,r)},_precompute:function(){var t=this._p[0],e=this._p[1],n=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&n===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<n;++r)this._mSampleValues[r]=l(r*i,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],a=this._mSampleValues,o=0,s=1,h=n-1;s!==h&&a[s]<=t;++s)o+=i;var d=o+(t-a[--s])/(a[s+1]-a[s])*i,u=c(d,e,r);return u>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var a=c(e,n,i);if(0===a)return e;e-=(l(e,n,i)-t)/a}return e}(t,d,e,r):0===u?d:function(t,e,n,i,r){var a,o,s=0;do{(a=l(o=e+(n-e)/2,i,r)-t)>0?n=o:e=o}while(Math.abs(a)>1e-7&&++s<10);return o}(t,o,o+i,e,r)}},t}();function Z(t,e){var n,i,r=t.length;for(n=0;n<r;n+=1)for(var a in i=t[n].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}!function(){for(var e=0,n=["ms","moz","webkit","o"],i=0;i<n.length&&!t.requestAnimationFrame;++i)t.requestAnimationFrame=t[n[i]+"RequestAnimationFrame"],t.cancelAnimationFrame=t[n[i]+"CancelAnimationFrame"]||t[n[i]+"CancelRequestAnimationFrame"];t.requestAnimationFrame||(t.requestAnimationFrame=function(t){var n=(new Date).getTime(),i=Math.max(0,16-(n-e)),r=setTimeout((function(){t(n+i)}),i);return e=n+i,r}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){clearTimeout(t)})}();var Y=function(){var t=Math;function e(t,e,n,i,r,a){var o=t*i+e*r+n*a-r*i-a*t-n*e;return o>-.001&&o<.001}var n=function(t,e,n,i){var r,a,o,s,h,d,u=p,m=0,g=[],f=[],y=kt.newElement();for(o=n.length,r=0;r<u;r+=1){for(h=r/(u-1),d=0,a=0;a<o;a+=1)s=l(1-h,3)*t[a]+3*l(1-h,2)*h*n[a]+3*(1-h)*l(h,2)*i[a]+l(h,3)*e[a],g[a]=s,null!==f[a]&&(d+=l(g[a]-f[a],2)),f[a]=g[a];d&&(m+=d=c(d)),y.percents[r]=h,y.lengths[r]=m}return y.addedLength=m,y};function i(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}var a,o=(a={},function(t,n,o,s){var h=(t[0]+"_"+t[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]+"_"+s[0]+"_"+s[1]).replace(/\./g,"p");if(!a[h]){var d,u,m,g,f,y,v,w=p,b=0,x=null;2===t.length&&(t[0]!==n[0]||t[1]!==n[1])&&e(t[0],t[1],n[0],n[1],t[0]+o[0],t[1]+o[1])&&e(t[0],t[1],n[0],n[1],n[0]+s[0],n[1]+s[1])&&(w=2);var S=new i(w);for(m=o.length,d=0;d<w;d+=1){for(v=L(m),f=d/(w-1),y=0,u=0;u<m;u+=1)g=l(1-f,3)*t[u]+3*l(1-f,2)*f*(t[u]+o[u])+3*(1-f)*l(f,2)*(n[u]+s[u])+l(f,3)*n[u],v[u]=g,null!==x&&(y+=l(v[u]-x[u],2));b+=y=c(y),S.points[d]=new r(y,v),x=v}S.segmentLength=b,a[h]=S}return a[h]});function s(t,e){var n=e.percents,i=e.lengths,r=n.length,a=h((r-1)*t),o=t*e.addedLength,s=0;if(a===r-1||0===a||o===i[a])return n[a];for(var l=i[a]>o?-1:1,c=!0;c;)if(i[a]<=o&&i[a+1]>o?(s=(o-i[a])/(i[a+1]-i[a]),c=!1):a+=l,a<0||a>=r-1){if(a===r-1)return n[a];c=!1}return n[a]+(n[a+1]-n[a])*s}var d=T("float32",8);return{getSegmentsLength:function(t){var e,i=Ct.newElement(),r=t.c,a=t.v,o=t.o,s=t.i,l=t._length,c=i.lengths,h=0;for(e=0;e<l-1;e+=1)c[e]=n(a[e],a[e+1],o[e],s[e+1]),h+=c[e].addedLength;return r&&l&&(c[e]=n(a[e],a[0],o[e],s[0]),h+=c[e].addedLength),i.totalLength=h,i},getNewSegment:function(e,n,i,r,a,o,l){a<0?a=0:a>1&&(a=1);var c,h=s(a,l),u=s(o=o>1?1:o,l),p=e.length,m=1-h,g=1-u,f=m*m*m,y=h*m*m*3,v=h*h*m*3,w=h*h*h,b=m*m*g,x=h*m*g+m*h*g+m*m*u,S=h*h*g+m*h*u+h*m*u,A=h*h*u,C=m*g*g,k=h*g*g+m*u*g+m*g*u,I=h*u*g+m*u*u+h*g*u,E=h*u*u,_=g*g*g,M=u*g*g+g*u*g+g*g*u,D=u*u*g+g*u*u+u*g*u,P=u*u*u;for(c=0;c<p;c+=1)d[4*c]=t.round(1e3*(f*e[c]+y*i[c]+v*r[c]+w*n[c]))/1e3,d[4*c+1]=t.round(1e3*(b*e[c]+x*i[c]+S*r[c]+A*n[c]))/1e3,d[4*c+2]=t.round(1e3*(C*e[c]+k*i[c]+I*r[c]+E*n[c]))/1e3,d[4*c+3]=t.round(1e3*(_*e[c]+M*i[c]+D*r[c]+P*n[c]))/1e3;return d},getPointInSegment:function(e,n,i,r,a,o){var l=s(a,o),c=1-l;return[t.round(1e3*(c*c*c*e[0]+(l*c*c+c*l*c+c*c*l)*i[0]+(l*l*c+c*l*l+l*c*l)*r[0]+l*l*l*n[0]))/1e3,t.round(1e3*(c*c*c*e[1]+(l*c*c+c*l*c+c*c*l)*i[1]+(l*l*c+c*l*l+l*c*l)*r[1]+l*l*l*n[1]))/1e3]},buildBezierData:o,pointOnLine2D:e,pointOnLine3D:function(n,i,r,a,o,s,l,c,h){if(0===r&&0===s&&0===h)return e(n,i,a,o,l,c);var d,u=t.sqrt(t.pow(a-n,2)+t.pow(o-i,2)+t.pow(s-r,2)),p=t.sqrt(t.pow(l-n,2)+t.pow(c-i,2)+t.pow(h-r,2)),m=t.sqrt(t.pow(l-a,2)+t.pow(c-o,2)+t.pow(h-s,2));return(d=u>p?u>m?u-p-m:m-p-u:m>p?m-p-u:p-u-m)>-1e-4&&d<1e-4}}}(),H=function(){var e,n,i=1,a=[],o={onmessage:function(){},postMessage:function(t){e({data:t})}},s={postMessage:function(t){o.onmessage({data:t})}};function l(){n||(n=function(n){if(t.Worker&&t.Blob&&r){var i=new Blob(["var _workerSelf = self; self.onmessage = ",n.toString()],{type:"text/javascript"}),a=URL.createObjectURL(i);return new Worker(a)}return e=n,o}((function(t){if(s.dataManager||(s.dataManager=function(){function t(r,a){var o,s,l,c,h,d,u,p=r.length;for(s=0;s<p;s+=1)if("ks"in(o=r[s])&&!o.completed){if(o.completed=!0,o.tt&&(r[s-1].td=o.tt),o.hasMask){var m=o.masksProperties;for(c=m.length,l=0;l<c;l+=1)if(m[l].pt.k.i)i(m[l].pt.k);else for(d=m[l].pt.k.length,h=0;h<d;h+=1)m[l].pt.k[h].s&&i(m[l].pt.k[h].s[0]),m[l].pt.k[h].e&&i(m[l].pt.k[h].e[0])}0===o.ty?(o.layers=e(o.refId,a),t(o.layers,a)):4===o.ty?n(o.shapes):5===o.ty&&(0!==(u=o).t.a.length||"m"in u.t.p||(u.singleShape=!0))}}function e(t,e){for(var n=0,i=e.length;n<i;){if(e[n].id===t)return e[n].layers.__used?JSON.parse(JSON.stringify(e[n].layers)):(e[n].layers.__used=!0,e[n].layers);n+=1}return null}function n(t){var e,r,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;r<a;r+=1)t[e].ks.k[r].s&&i(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&i(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&n(t[e].it)}function i(t){var e,n=t.i.length;for(e=0;e<n;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var n=e?e.split("."):[100,100,100];return t[0]>n[0]||!(n[0]>t[0])&&(t[1]>n[1]||!(n[1]>t[1])&&(t[2]>n[2]||!(n[2]>t[2])&&null))}var a,o=function(){var t=[4,4,14];function e(t){var e,n,i,r=t.length;for(e=0;e<r;e+=1)5===t[e].ty&&(n=t[e],i=void 0,i=n.t.d,n.t.d={k:[{s:i,t:0}]})}return function(n){if(r(t,n.v)&&(e(n.layers),n.assets)){var i,a=n.assets.length;for(i=0;i<a;i+=1)n.assets[i].layers&&e(n.assets[i].layers)}}}(),s=(a=[4,7,99],function(t){if(t.chars&&!r(a,t.v)){var e,n,o,s,l,c=t.chars.length;for(e=0;e<c;e+=1)if(t.chars[e].data&&t.chars[e].data.shapes)for(o=(l=t.chars[e].data.shapes[0].it).length,n=0;n<o;n+=1)(s=l[n].ks.k).__converted||(i(l[n].ks.k),s.__converted=!0)}}),l=function(){var t=[5,7,15];function e(t){var e,n,i,r=t.length;for(e=0;e<r;e+=1)5===t[e].ty&&(n=t[e],i=void 0,"number"==typeof(i=n.t.p).a&&(i.a={a:0,k:i.a}),"number"==typeof i.p&&(i.p={a:0,k:i.p}),"number"==typeof i.r&&(i.r={a:0,k:i.r}))}return function(n){if(r(t,n.v)&&(e(n.layers),n.assets)){var i,a=n.assets.length;for(i=0;i<a;i+=1)n.assets[i].layers&&e(n.assets[i].layers)}}}(),c=function(){var t=[4,1,9];function e(t){var n,i,r,a=t.length;for(n=0;n<a;n+=1)if("gr"===t[n].ty)e(t[n].it);else if("fl"===t[n].ty||"st"===t[n].ty)if(t[n].c.k&&t[n].c.k[0].i)for(r=t[n].c.k.length,i=0;i<r;i+=1)t[n].c.k[i].s&&(t[n].c.k[i].s[0]/=255,t[n].c.k[i].s[1]/=255,t[n].c.k[i].s[2]/=255,t[n].c.k[i].s[3]/=255),t[n].c.k[i].e&&(t[n].c.k[i].e[0]/=255,t[n].c.k[i].e[1]/=255,t[n].c.k[i].e[2]/=255,t[n].c.k[i].e[3]/=255);else t[n].c.k[0]/=255,t[n].c.k[1]/=255,t[n].c.k[2]/=255,t[n].c.k[3]/=255}function n(t){var n,i=t.length;for(n=0;n<i;n+=1)4===t[n].ty&&e(t[n].shapes)}return function(e){if(r(t,e.v)&&(n(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&n(e.assets[i].layers)}}}(),h=function(){var t=[4,4,18];function e(t){var n,i,r;for(n=t.length-1;n>=0;n-=1)if("sh"===t[n].ty)if(t[n].ks.k.i)t[n].ks.k.c=t[n].closed;else for(r=t[n].ks.k.length,i=0;i<r;i+=1)t[n].ks.k[i].s&&(t[n].ks.k[i].s[0].c=t[n].closed),t[n].ks.k[i].e&&(t[n].ks.k[i].e[0].c=t[n].closed);else"gr"===t[n].ty&&e(t[n].it)}function n(t){var n,i,r,a,o,s,l=t.length;for(i=0;i<l;i+=1){if((n=t[i]).hasMask){var c=n.masksProperties;for(a=c.length,r=0;r<a;r+=1)if(c[r].pt.k.i)c[r].pt.k.c=c[r].cl;else for(s=c[r].pt.k.length,o=0;o<s;o+=1)c[r].pt.k[o].s&&(c[r].pt.k[o].s[0].c=c[r].cl),c[r].pt.k[o].e&&(c[r].pt.k[o].e[0].c=c[r].cl)}4===n.ty&&e(n.shapes)}}return function(e){if(r(t,e.v)&&(n(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&n(e.assets[i].layers)}}}(),d={completeData:function(e){e.__complete||(c(e),o(e),s(e),l(e),h(e),t(e.layers,e.assets),e.__complete=!0)}};return d.checkColors=c,d.checkChars=s,d.checkPathProperties=l,d.checkShapes=h,d.completeLayers=t,d}()),s.assetLoader||(s.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,n,i,r){var a,o=new XMLHttpRequest;try{o.responseType="json"}catch(t){}o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)a=t(o),i(a);else try{a=t(o),i(a)}catch(t){r&&r(t)}};try{o.open("GET",e,!0)}catch(t){o.open("GET",n+"/"+e,!0)}o.send()}}}()),"loadAnimation"===t.data.type)s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&s.assetLoader.load(t.data.path,t.data.fullPath,(function(e){s.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){s.postMessage({id:t.data.id,status:"error"})}))})),n.onmessage=function(t){var e=t.data,n=e.id,i=a[n];a[n]=null,"success"===e.status?i.onComplete(e.payload):i.onError&&i.onError()})}function c(t,e){var n="processId_"+(i+=1);return a[n]={onComplete:t,onError:e},n}return{loadAnimation:function(e,i,r){l();var a=c(i,r);n.postMessage({type:"loadAnimation",path:e,fullPath:t.location.origin+t.location.pathname,id:a})},loadData:function(e,i,r){l();var a=c(i,r);n.postMessage({type:"loadData",path:e,fullPath:t.location.origin+t.location.pathname,id:a})},completeAnimation:function(t,e,i){l();var r=c(e,i);n.postMessage({type:"complete",animation:t,id:r})}}}();function j(t){for(var e=t.fStyle?t.fStyle.split(" "):[],n="normal",i="normal",r=e.length,a=0;a<r;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":n="700";break;case"black":n="900";break;case"medium":n="500";break;case"regular":case"normal":n="400";break;case"light":case"thin":n="200"}return{style:i,weight:t.fWeight||n}}var X=function(){var t={w:0,size:0,shapes:[]},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],i=[65039,8205];function r(t,e){var n=F("span");n.setAttribute("aria-hidden",!0),n.style.fontFamily=e;var i=F("span");i.innerText="giItT1WQy@!-/#",n.style.position="absolute",n.style.left="-10000px",n.style.top="-10000px",n.style.fontSize="300px",n.style.fontVariant="normal",n.style.fontStyle="normal",n.style.fontWeight="normal",n.style.letterSpacing="0",n.appendChild(i),document.body.appendChild(n);var r=i.offsetWidth;return i.style.fontFamily=function(t){var e,n=t.split(","),i=n.length,r=[];for(e=0;e<i;e+=1)"sans-serif"!==n[e]&&"monospace"!==n[e]&&r.push(n[e]);return r.join(",")}(t)+", "+e,{node:i,w:r,parent:n}}function a(t,e){var n=B("text");n.style.fontSize="100px";var i=j(e);return n.setAttribute("font-family",e.fFamily),n.setAttribute("font-style",i.style),n.setAttribute("font-weight",i.weight),n.textContent="1",e.fClass?(n.style.fontFamily="inherit",n.setAttribute("class",e.fClass)):n.style.fontFamily=e.fFamily,t.appendChild(n),F("canvas").getContext("2d").font=e.fWeight+" "+e.fStyle+" 100px "+e.fFamily,n}var o=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return o.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==n.indexOf(i)},o.isZeroWidthJoiner=function(t,e){return e?t===i[0]&&e===i[1]:t===i[1]},o.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},o.prototype={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var n,i,r=t.length,a=this.chars.length;for(e=0;e<r;e+=1){for(n=0,i=!1;n<a;)this.chars[n].style===t[e].style&&this.chars[n].fFamily===t[e].fFamily&&this.chars[n].ch===t[e].ch&&(i=!0),n+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);var n,i=t.list,o=i.length,s=o;for(n=0;n<o;n+=1){var l,c,h=!0;if(i[n].loaded=!1,i[n].monoCase=r(i[n].fFamily,"monospace"),i[n].sansCase=r(i[n].fFamily,"sans-serif"),i[n].fPath){if("p"===i[n].fOrigin||3===i[n].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[n].fFamily+'"], style[f-origin="3"][f-family="'+i[n].fFamily+'"]')).length>0&&(h=!1),h){var d=F("style");d.setAttribute("f-forigin",i[n].fOrigin),d.setAttribute("f-origin",i[n].origin),d.setAttribute("f-family",i[n].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+i[n].fFamily+"; font-style: normal; src: url('"+i[n].fPath+"');}",e.appendChild(d)}}else if("g"===i[n].fOrigin||1===i[n].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(i[n].fPath)&&(h=!1);if(h){var u=F("link");u.setAttribute("f-forigin",i[n].fOrigin),u.setAttribute("f-origin",i[n].origin),u.type="text/css",u.rel="stylesheet",u.href=i[n].fPath,document.body.appendChild(u)}}else if("t"===i[n].fOrigin||2===i[n].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)i[n].fPath===l[c].src&&(h=!1);if(h){var p=F("link");p.setAttribute("f-forigin",i[n].fOrigin),p.setAttribute("f-origin",i[n].origin),p.setAttribute("rel","stylesheet"),p.setAttribute("href",i[n].fPath),e.appendChild(p)}}}else i[n].loaded=!0,s-=1;i[n].helper=a(e,i[n]),i[n].cache={},this.fonts.push(i[n])}0===s?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,n,i){for(var r=0,a=this.chars.length;r<a;){if(this.chars[r].ch===e&&this.chars[r].style===n&&this.chars[r].fFamily===i)return this.chars[r];r+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,n,i)),t},getFontByName:function(t){for(var e=0,n=this.fonts.length;e<n;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,n){var i=this.getFontByName(e),r=t.charCodeAt(0);if(!i.cache[r+1]){var a=i.helper;if(" "===t){a.textContent="|"+t+"|";var o=a.getComputedTextLength();a.textContent="||";var s=a.getComputedTextLength();i.cache[r+1]=(o-s)/100}else a.textContent=t,i.cache[r+1]=a.getComputedTextLength()/100}return i.cache[r+1]*n},checkLoadedFonts:function(){var t,e,n,i=this.fonts.length,r=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?r-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,n=this.fonts[t].monoCase.w,e.offsetWidth!==n?(r-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,n=this.fonts[t].sansCase.w,e.offsetWidth!==n&&(r-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}},o}(),U=function(){var t=i,e=Math.abs;function n(t,e){var n,i=this.offsetTime;"multidimensional"===this.propType&&(n=T("float32",this.pv.length));for(var a,o,s,l,c,h,d,u,p,g=e.lastIndex,f=g,y=this.keyframes.length-1,v=!0;v;){if(a=this.keyframes[f],o=this.keyframes[f+1],f===y-1&&t>=o.t-i){a.h&&(a=o),g=0;break}if(o.t-i>t){g=f;break}f<y-1?f+=1:(g=0,v=!1)}s=this.keyframesMetadata[f]||{};var w,b,x,S,A,C,k,I,E,_,M,D,P,L,B,F,R,N,V=o.t-i,z=a.t-i;if(a.to){s.bezierData||(s.bezierData=Y.buildBezierData(a.s,o.s||a.e,a.to,a.ti));var G=s.bezierData;if(t>=V||t<z){var W=t>=V?G.points.length-1:0;for(c=G.points[W].point.length,l=0;l<c;l+=1)n[l]=G.points[W].point[l]}else{s.__fnct?p=s.__fnct:(p=O.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,s.__fnct=p),h=p((t-z)/(V-z));var Z,H=G.segmentLength*h,j=e.lastFrame<t&&e._lastKeyframeIndex===f?e._lastAddedLength:0;for(u=e.lastFrame<t&&e._lastKeyframeIndex===f?e._lastPoint:0,v=!0,d=G.points.length;v;){if(j+=G.points[u].partialLength,0===H||0===h||u===G.points.length-1){for(c=G.points[u].point.length,l=0;l<c;l+=1)n[l]=G.points[u].point[l];break}if(H>=j&&H<j+G.points[u+1].partialLength){for(Z=(H-j)/G.points[u+1].partialLength,c=G.points[u].point.length,l=0;l<c;l+=1)n[l]=G.points[u].point[l]+(G.points[u+1].point[l]-G.points[u].point[l])*Z;break}u<d-1?u+=1:v=!1}e._lastPoint=u,e._lastAddedLength=j-G.points[u].partialLength,e._lastKeyframeIndex=f}}else{var X,U,K,J,q;if(y=a.s.length,w=o.s||a.e,this.sh&&1!==a.h)t>=V?(n[0]=w[0],n[1]=w[1],n[2]=w[2]):t<=z?(n[0]=a.s[0],n[1]=a.s[1],n[2]=a.s[2]):function(t,e){var n=e[0],i=e[1],r=e[2],a=e[3],o=Math.atan2(2*i*a-2*n*r,1-2*i*i-2*r*r),s=Math.asin(2*n*i+2*r*a),l=Math.atan2(2*n*a-2*i*r,1-2*n*n-2*r*r);t[0]=o/m,t[1]=s/m,t[2]=l/m}(n,(b=r(a.s),x=r(w),S=(t-z)/(V-z),_=[],M=b[0],D=b[1],P=b[2],L=b[3],B=x[0],F=x[1],R=x[2],N=x[3],(C=M*B+D*F+P*R+L*N)<0&&(C=-C,B=-B,F=-F,R=-R,N=-N),1-C>1e-6?(A=Math.acos(C),k=Math.sin(A),I=Math.sin((1-S)*A)/k,E=Math.sin(S*A)/k):(I=1-S,E=S),_[0]=I*M+E*B,_[1]=I*D+E*F,_[2]=I*P+E*R,_[3]=I*L+E*N,_));else for(f=0;f<y;f+=1)1!==a.h&&(t>=V?h=1:t<z?h=0:(a.o.x.constructor===Array?(s.__fnct||(s.__fnct=[]),s.__fnct[f]?p=s.__fnct[f]:(X=void 0===a.o.x[f]?a.o.x[0]:a.o.x[f],U=void 0===a.o.y[f]?a.o.y[0]:a.o.y[f],K=void 0===a.i.x[f]?a.i.x[0]:a.i.x[f],J=void 0===a.i.y[f]?a.i.y[0]:a.i.y[f],p=O.getBezierEasing(X,U,K,J).get,s.__fnct[f]=p)):s.__fnct?p=s.__fnct:(X=a.o.x,U=a.o.y,K=a.i.x,J=a.i.y,p=O.getBezierEasing(X,U,K,J).get,a.keyframeMetadata=p),h=p((t-z)/(V-z)))),w=o.s||a.e,q=1===a.h?a.s[f]:a.s[f]+(w[f]-a.s[f])*h,"multidimensional"===this.propType?n[f]=q:n=q}return e.lastIndex=g,n}function r(t){var e=t[0]*m,n=t[1]*m,i=t[2]*m,r=Math.cos(e/2),a=Math.cos(n/2),o=Math.cos(i/2),s=Math.sin(e/2),l=Math.sin(n/2),c=Math.sin(i/2);return[s*l*o+r*a*c,s*a*o+r*l*c,r*l*o-s*a*c,r*a*o-s*l*c]}function a(){var e=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==t&&(this._caching.lastFrame>=i&&e>=i||this._caching.lastFrame<n&&e<n))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function o(t){var n;if("unidimensional"===this.propType)n=t*this.mult,e(this.v-n)>1e-5&&(this.v=n,this._mdf=!0);else for(var i=0,r=this.v.length;i<r;)n=t[i]*this.mult,e(this.v[i]-n)>1e-5&&(this.v[i]=n,this._mdf=!0),i+=1}function s(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)n=this.effectsSequence[t](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function l(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function c(t,e,n,i){this.propType="unidimensional",this.mult=n||1,this.data=e,this.v=n?e.k*n:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=s,this.setVValue=o,this.addEffect=l}function h(t,e,n,i){var r;this.propType="multidimensional",this.mult=n||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=T("float32",a),this.pv=T("float32",a),this.vel=T("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=s,this.setVValue=o,this.addEffect=l}function d(e,i,r,c){this.propType="unidimensional",this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:t,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=r||1,this.elem=e,this.container=c,this.comp=e.comp,this.v=t,this.pv=t,this._isFirstFrame=!0,this.getValue=s,this.setVValue=o,this.interpolateValue=n,this.effectsSequence=[a.bind(this)],this.addEffect=l}function u(e,i,r,c){var h;this.propType="multidimensional";var d,u,p,m,g=i.k.length;for(h=0;h<g-1;h+=1)i.k[h].to&&i.k[h].s&&i.k[h+1]&&i.k[h+1].s&&(d=i.k[h].s,u=i.k[h+1].s,p=i.k[h].to,m=i.k[h].ti,(2===d.length&&(d[0]!==u[0]||d[1]!==u[1])&&Y.pointOnLine2D(d[0],d[1],u[0],u[1],d[0]+p[0],d[1]+p[1])&&Y.pointOnLine2D(d[0],d[1],u[0],u[1],u[0]+m[0],u[1]+m[1])||3===d.length&&(d[0]!==u[0]||d[1]!==u[1]||d[2]!==u[2])&&Y.pointOnLine3D(d[0],d[1],d[2],u[0],u[1],u[2],d[0]+p[0],d[1]+p[1],d[2]+p[2])&&Y.pointOnLine3D(d[0],d[1],d[2],u[0],u[1],u[2],u[0]+m[0],u[1]+m[1],u[2]+m[2]))&&(i.k[h].to=null,i.k[h].ti=null),d[0]===u[0]&&d[1]===u[1]&&0===p[0]&&0===p[1]&&0===m[0]&&0===m[1]&&(2===d.length||d[2]===u[2]&&0===p[2]&&0===m[2])&&(i.k[h].to=null,i.k[h].ti=null));this.effectsSequence=[a.bind(this)],this.data=i,this.keyframes=i.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=c,this.comp=e.comp,this.getValue=s,this.setVValue=o,this.interpolateValue=n,this.frameId=-1;var f=i.k[0].s.length;for(this.v=T("float32",f),this.pv=T("float32",f),h=0;h<f;h+=1)this.v[h]=t,this.pv[h]=t;this._caching={lastFrame:t,lastIndex:0,value:T("float32",f)},this.addEffect=l}return{getProp:function(t,e,n,i,r){var a;if(e.k.length)if("number"==typeof e.k[0])a=new h(t,e,i,r);else switch(n){case 0:a=new d(t,e,i,r);break;case 1:a=new u(t,e,i,r)}else a=new c(t,e,i,r);return a.effectsSequence.length&&r.addDynamicProperty(a),a}}}(),K=function(){var t=[0,0];function e(t,e,n){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new W,this.pre=new W,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||t),e.p&&e.p.s?(this.px=U.getProp(t,e.p.x,0,0,this),this.py=U.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=U.getProp(t,e.p.z,0,0,this))):this.p=U.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=U.getProp(t,e.rx,0,m,this),this.ry=U.getProp(t,e.ry,0,m,this),this.rz=U.getProp(t,e.rz,0,m,this),e.or.k[0].ti){var i,r=e.or.k.length;for(i=0;i<r;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=U.getProp(t,e.or,1,m,this),this.or.sh=!0}else this.r=U.getProp(t,e.r||{k:0},0,m,this);e.sk&&(this.sk=U.getProp(t,e.sk,0,m,this),this.sa=U.getProp(t,e.sa,0,m,this)),this.a=U.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=U.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=U.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var n;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var i,r;if(n=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/n,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/n,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(i=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],r=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),i[1]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),r[0]=a.getValueAtTime(a.keyframes[0].t/n,0),r[1]=o.getValueAtTime(o.keyframes[0].t/n,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),i[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),r[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0),r[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0)):(i=[a.pv,o.pv],r[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime),r[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime))}else i=r=t;this.v.rotate(-Math.atan2(i[1]-r[1],i[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},Z([R],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=R.prototype.addDynamicProperty,{getTransformProperty:function(t,n,i){return new e(t,n,i)}}}();function J(){this.c=!1,this._length=0,this._maxLength=8,this.v=L(this._maxLength),this.o=L(this._maxLength),this.i=L(this._maxLength)}J.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var n=0;n<e;)this.v[n]=xt.newElement(),this.o[n]=xt.newElement(),this.i[n]=xt.newElement(),n+=1},J.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},J.prototype.doubleArrayLength=function(){this.v=this.v.concat(L(this._maxLength)),this.i=this.i.concat(L(this._maxLength)),this.o=this.o.concat(L(this._maxLength)),this._maxLength*=2},J.prototype.setXYAt=function(t,e,n,i,r){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!r)&&(a[i]=xt.newElement()),a[i][0]=t,a[i][1]=e},J.prototype.setTripleAt=function(t,e,n,i,r,a,o,s){this.setXYAt(t,e,"v",o,s),this.setXYAt(n,i,"o",o,s),this.setXYAt(r,a,"i",o,s)},J.prototype.reverse=function(){var t=new J;t.setPathData(this.c,this._length);var e=this.v,n=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),r=1);var a,o=this._length-1,s=this._length;for(a=r;a<s;a+=1)t.setTripleAt(e[o][0],e[o][1],i[o][0],i[o][1],n[o][0],n[o][1],a,!1),o-=1;return t};var q=function(){var t=-999999;function e(t,e,n){var i,r,a,o,s,l,c,h,d,u=n.lastIndex,p=this.keyframes;if(t<p[0].t-this.offsetTime)i=p[0].s[0],a=!0,u=0;else if(t>=p[p.length-1].t-this.offsetTime)i=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],a=!0;else{for(var m,g,f,y=u,v=p.length-1,w=!0;w&&(m=p[y],!((g=p[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:w=!1;if(f=this.keyframesMetadata[y]||{},u=y,!(a=1===m.h)){if(t>=g.t-this.offsetTime)h=1;else if(t<m.t-this.offsetTime)h=0;else{var b;f.__fnct?b=f.__fnct:(b=O.getBezierEasing(m.o.x,m.o.y,m.i.x,m.i.y).get,f.__fnct=b),h=b((t-(m.t-this.offsetTime))/(g.t-this.offsetTime-(m.t-this.offsetTime)))}r=g.s?g.s[0]:m.e[0]}i=m.s[0]}for(l=e._length,c=i.i[0].length,n.lastIndex=u,o=0;o<l;o+=1)for(s=0;s<c;s+=1)d=a?i.i[o][s]:i.i[o][s]+(r.i[o][s]-i.i[o][s])*h,e.i[o][s]=d,d=a?i.o[o][s]:i.o[o][s]+(r.o[o][s]-i.o[o][s])*h,e.o[o][s]=d,d=a?i.v[o][s]:i.v[o][s]+(r.v[o][s]-i.v[o][s])*h,e.v[o][s]=d}function n(){var e=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==t&&(r<n&&e<n||r>i&&e>i)||(this._caching.lastIndex=r<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function r(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var n,i=t._length;for(n=0;n<i;n+=1)if(t.v[n][0]!==e.v[n][0]||t.v[n][1]!==e.v[n][1]||t.o[n][0]!==e.o[n][0]||t.o[n][1]!==e.o[n][1]||t.i[n][0]!==e.i[n][0]||t.i[n][1]!==e.i[n][1])return!1;return!0})(this.v,t)||(this.v=St.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function a(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var n=this.effectsSequence.length;for(e=0;e<n;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function o(t,e,n){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===n?e.pt.k:e.ks.k;this.v=St.clone(r),this.pv=St.clone(this.v),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function s(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,r,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var o=this.keyframes[0].s[0].i.length;this.v=St.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,o),this.pv=St.clone(this.v),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[n.bind(this)]}o.prototype.interpolateShape=e,o.prototype.getValue=a,o.prototype.setVValue=r,o.prototype.addEffect=s,l.prototype.getValue=a,l.prototype.interpolateShape=e,l.prototype.setVValue=r,l.prototype.addEffect=s;var c=function(){var t=g;function e(t,e){this.v=St.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=At.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=U.getProp(t,e.p,1,0,this),this.s=U.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],n=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,a=3!==this.d,o=this.v;o.v[0][0]=e,o.v[0][1]=n-r,o.v[1][0]=a?e+i:e-i,o.v[1][1]=n,o.v[2][0]=e,o.v[2][1]=n+r,o.v[3][0]=a?e-i:e+i,o.v[3][1]=n,o.i[0][0]=a?e-i*t:e+i*t,o.i[0][1]=n-r,o.i[1][0]=a?e+i:e-i,o.i[1][1]=n-r*t,o.i[2][0]=a?e+i*t:e-i*t,o.i[2][1]=n+r,o.i[3][0]=a?e-i:e+i,o.i[3][1]=n+r*t,o.o[0][0]=a?e+i*t:e-i*t,o.o[0][1]=n-r,o.o[1][0]=a?e+i:e-i,o.o[1][1]=n+r*t,o.o[2][0]=a?e-i*t:e+i*t,o.o[2][1]=n+r,o.o[3][0]=a?e-i:e+i,o.o[3][1]=n-r*t}},Z([R],e),e}(),h=function(){function t(t,e){this.v=St.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=U.getProp(t,e.ir,0,0,this),this.is=U.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=U.getProp(t,e.pt,0,0,this),this.p=U.getProp(t,e.p,1,0,this),this.r=U.getProp(t,e.r,0,m,this),this.or=U.getProp(t,e.or,0,0,this),this.os=U.getProp(t,e.os,0,.01,this),this.localShapeCollection=At.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,n,i,r=2*Math.floor(this.pt.v),a=2*Math.PI/r,o=!0,s=this.or.v,l=this.ir.v,c=this.os.v,h=this.is.v,d=2*Math.PI*s/(2*r),u=2*Math.PI*l/(2*r),p=-Math.PI/2;p+=this.r.v;var m=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<r;t+=1){n=o?c:h,i=o?d:u;var g=(e=o?s:l)*Math.cos(p),f=e*Math.sin(p),y=0===g&&0===f?0:f/Math.sqrt(g*g+f*f),v=0===g&&0===f?0:-g/Math.sqrt(g*g+f*f);g+=+this.p.v[0],f+=+this.p.v[1],this.v.setTripleAt(g,f,g-y*i*n*m,f-v*i*n*m,g+y*i*n*m,f+v*i*n*m,t,!0),o=!o,p+=a*m}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),n=2*Math.PI/e,i=this.or.v,r=this.os.v,a=2*Math.PI*i/(4*e),o=.5*-Math.PI,s=3===this.data.d?-1:1;for(o+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var l=i*Math.cos(o),c=i*Math.sin(o),h=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),d=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-h*a*r*s,c-d*a*r*s,l+h*a*r*s,c+d*a*r*s,t,!0),o+=n*s}this.paths.length=0,this.paths[0]=this.v}},Z([R],t),t}(),u=function(){function t(t,e){this.v=St.newElement(),this.v.c=!0,this.localShapeCollection=At.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=U.getProp(t,e.p,1,0,this),this.s=U.getProp(t,e.s,1,0,this),this.r=U.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],n=this.s.v[0]/2,i=this.s.v[1]/2,r=d(n,i,this.r.v),a=r*(1-g);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+n,e-i+r,t+n,e-i+r,t+n,e-i+a,0,!0),this.v.setTripleAt(t+n,e+i-r,t+n,e+i-a,t+n,e+i-r,1,!0),0!==r?(this.v.setTripleAt(t+n-r,e+i,t+n-r,e+i,t+n-a,e+i,2,!0),this.v.setTripleAt(t-n+r,e+i,t-n+a,e+i,t-n+r,e+i,3,!0),this.v.setTripleAt(t-n,e+i-r,t-n,e+i-r,t-n,e+i-a,4,!0),this.v.setTripleAt(t-n,e-i+r,t-n,e-i+a,t-n,e-i+r,5,!0),this.v.setTripleAt(t-n+r,e-i,t-n+r,e-i,t-n+a,e-i,6,!0),this.v.setTripleAt(t+n-r,e-i,t+n-a,e-i,t+n-r,e-i,7,!0)):(this.v.setTripleAt(t-n,e+i,t-n+a,e+i,t-n,e+i,2),this.v.setTripleAt(t-n,e-i,t-n,e-i+a,t-n,e-i,3))):(this.v.setTripleAt(t+n,e-i+r,t+n,e-i+a,t+n,e-i+r,0,!0),0!==r?(this.v.setTripleAt(t+n-r,e-i,t+n-r,e-i,t+n-a,e-i,1,!0),this.v.setTripleAt(t-n+r,e-i,t-n+a,e-i,t-n+r,e-i,2,!0),this.v.setTripleAt(t-n,e-i+r,t-n,e-i+r,t-n,e-i+a,3,!0),this.v.setTripleAt(t-n,e+i-r,t-n,e+i-a,t-n,e+i-r,4,!0),this.v.setTripleAt(t-n+r,e+i,t-n+r,e+i,t-n+a,e+i,5,!0),this.v.setTripleAt(t+n-r,e+i,t+n-a,e+i,t+n-r,e+i,6,!0),this.v.setTripleAt(t+n,e+i-r,t+n,e+i-r,t+n,e+i-a,7,!0)):(this.v.setTripleAt(t-n,e-i,t-n+a,e-i,t-n,e-i,1,!0),this.v.setTripleAt(t-n,e+i,t-n,e+i-a,t-n,e+i,2,!0),this.v.setTripleAt(t+n,e+i,t+n-a,e+i,t+n,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},Z([R],t),t}();var p={getShapeProp:function(t,e,n){var i;return 3===n||4===n?i=(3===n?e.pt:e.ks).k.length?new l(t,e,n):new o(t,e,n):5===n?i=new u(t,e):6===n?i=new c(t,e):7===n&&(i=new h(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return l}};return p}(),$=function(){var t={},e={};return t.registerModifier=function(t,n){e[t]||(e[t]=n)},t.getModifier=function(t,n,i){return new e[t](n,i)},t}();function Q(){}function tt(){}function et(){}function nt(){}function it(){}function rt(){this._length=0,this._maxLength=4,this.shapes=L(this._maxLength)}function at(t,e,n,i){var r;this.elem=t,this.frameId=-1,this.dataProps=L(e.length),this.renderer=n,this.k=!1,this.dashStr="",this.dashArray=T("float32",e.length?e.length-1:0),this.dashoffset=T("float32",1),this.initDynamicPropertyContainer(i);var a,o=e.length||0;for(r=0;r<o;r+=1)a=U.getProp(t,e[r].v,0,0,this),this.k=a.k||this.k,this.dataProps[r]={n:e[r].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function ot(t,e,n){this.data=e,this.c=T("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=T("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(n),this.prop=U.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}Q.prototype.initModifierProperties=function(){},Q.prototype.addShapeToModifier=function(){},Q.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:At.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},Q.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=i,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Q.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},Z([R],Q),Z([Q],tt),tt.prototype.initModifierProperties=function(t,e){this.s=U.getProp(t,e.s,0,.01,this),this.e=U.getProp(t,e.e,0,.01,this),this.o=U.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},tt.prototype.addShapeToModifier=function(t){t.pathsData=[]},tt.prototype.calculateShapeEdges=function(t,e,n,i,r){var a=[];e<=1?a.push({s:t,e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var o,s,l=[],c=a.length;for(o=0;o<c;o+=1){var h,d;(s=a[o]).e*r<i||s.s*r>i+n||(h=s.s*r<=i?0:(s.s*r-i)/n,d=s.e*r>=i+n?1:(s.e*r-i)/n,l.push([h,d]))}return l.length||l.push([0,0]),l},tt.prototype.releasePathsData=function(t){var e,n=t.length;for(e=0;e<n;e+=1)Ct.release(t[e]);return t.length=0,t},tt.prototype.processShapes=function(t){var e,n,i,r;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(n=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var o=e;e=n,n=o}e=1e-4*Math.round(1e4*e),n=1e-4*Math.round(1e4*n),this.sValue=e,this.eValue=n}else e=this.sValue,n=this.eValue;var s,l,c,h,d,u=this.shapes.length,p=0;if(n===e)for(r=0;r<u;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===n&&0===e||0===n&&1===e){if(this._mdf)for(r=0;r<u;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var m,g,f=[];for(r=0;r<u;r+=1)if((m=this.shapes[r]).shape._mdf||this._mdf||t||2===this.m){if(l=(i=m.shape.paths)._length,d=0,!m.shape._mdf&&m.pathsData.length)d=m.totalShapeLength;else{for(c=this.releasePathsData(m.pathsData),s=0;s<l;s+=1)h=Y.getSegmentsLength(i.shapes[s]),c.push(h),d+=h.totalLength;m.totalShapeLength=d,m.pathsData=c}p+=d,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var y,v=e,w=n,b=0;for(r=u-1;r>=0;r-=1)if((m=this.shapes[r]).shape._mdf){for((g=m.localShapeCollection).releaseShapes(),2===this.m&&u>1?(y=this.calculateShapeEdges(e,n,m.totalShapeLength,b,p),b+=m.totalShapeLength):y=[[v,w]],l=y.length,s=0;s<l;s+=1){v=y[s][0],w=y[s][1],f.length=0,w<=1?f.push({s:m.totalShapeLength*v,e:m.totalShapeLength*w}):v>=1?f.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(w-1)}):(f.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),f.push({s:0,e:m.totalShapeLength*(w-1)}));var x=this.addShapes(m,f[0]);if(f[0].s!==f[0].e){if(f.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var S=x.pop();this.addPaths(x,g),x=this.addShapes(m,f[1],S)}else this.addPaths(x,g),x=this.addShapes(m,f[1]);this.addPaths(x,g)}}m.shape.paths=g}}},tt.prototype.addPaths=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)e.addShape(t[n])},tt.prototype.addSegment=function(t,e,n,i,r,a,o){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(n[0],n[1],"i",a+1),o&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(i[0],i[1],"v",a+1)},tt.prototype.addSegmentFromArray=function(t,e,n,i){e.setXYAt(t[1],t[5],"o",n),e.setXYAt(t[2],t[6],"i",n+1),i&&e.setXYAt(t[0],t[4],"v",n),e.setXYAt(t[3],t[7],"v",n+1)},tt.prototype.addShapes=function(t,e,n){var i,r,a,o,s,l,c,h,d=t.pathsData,u=t.shape.paths.shapes,p=t.shape.paths._length,m=0,g=[],f=!0;for(n?(s=n._length,h=n._length):(n=St.newElement(),s=0,h=0),g.push(n),i=0;i<p;i+=1){for(l=d[i].lengths,n.c=u[i].c,a=u[i].c?l.length:l.length+1,r=1;r<a;r+=1)if(m+(o=l[r-1]).addedLength<e.s)m+=o.addedLength,n.c=!1;else{if(m>e.e){n.c=!1;break}e.s<=m&&e.e>=m+o.addedLength?(this.addSegment(u[i].v[r-1],u[i].o[r-1],u[i].i[r],u[i].v[r],n,s,f),f=!1):(c=Y.getNewSegment(u[i].v[r-1],u[i].v[r],u[i].o[r-1],u[i].i[r],(e.s-m)/o.addedLength,(e.e-m)/o.addedLength,l[r-1]),this.addSegmentFromArray(c,n,s,f),f=!1,n.c=!1),m+=o.addedLength,s+=1}if(u[i].c&&l.length){if(o=l[r-1],m<=e.e){var y=l[r-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(u[i].v[r-1],u[i].o[r-1],u[i].i[0],u[i].v[0],n,s,f),f=!1):(c=Y.getNewSegment(u[i].v[r-1],u[i].v[0],u[i].o[r-1],u[i].i[0],(e.s-m)/y,(e.e-m)/y,l[r-1]),this.addSegmentFromArray(c,n,s,f),f=!1,n.c=!1)}else n.c=!1;m+=o.addedLength,s+=1}if(n._length&&(n.setXYAt(n.v[h][0],n.v[h][1],"i",h),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),m>e.e)break;i<p-1&&(n=St.newElement(),f=!0,g.push(n),s=0)}return g},$.registerModifier("tm",tt),Z([Q],et),et.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=U.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},et.prototype.processPath=function(t,e){var n,i=St.newElement();i.c=t.c;var r,a,o,s,l,c,h,d,u,p,m,f,y=t._length,v=0;for(n=0;n<y;n+=1)r=t.v[n],o=t.o[n],a=t.i[n],r[0]===o[0]&&r[1]===o[1]&&r[0]===a[0]&&r[1]===a[1]?0!==n&&n!==y-1||t.c?(s=0===n?t.v[y-1]:t.v[n-1],c=(l=Math.sqrt(Math.pow(r[0]-s[0],2)+Math.pow(r[1]-s[1],2)))?Math.min(l/2,e)/l:0,h=m=r[0]+(s[0]-r[0])*c,d=f=r[1]-(r[1]-s[1])*c,u=h-(h-r[0])*g,p=d-(d-r[1])*g,i.setTripleAt(h,d,u,p,m,f,v),v+=1,s=n===y-1?t.v[0]:t.v[n+1],c=(l=Math.sqrt(Math.pow(r[0]-s[0],2)+Math.pow(r[1]-s[1],2)))?Math.min(l/2,e)/l:0,h=u=r[0]+(s[0]-r[0])*c,d=p=r[1]+(s[1]-r[1])*c,m=h-(h-r[0])*g,f=d-(d-r[1])*g,i.setTripleAt(h,d,u,p,m,f,v),v+=1):(i.setTripleAt(r[0],r[1],o[0],o[1],a[0],a[1],v),v+=1):(i.setTripleAt(t.v[n][0],t.v[n][1],t.o[n][0],t.o[n][1],t.i[n][0],t.i[n][1],v),v+=1);return i},et.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.rd.v;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},$.registerModifier("rd",et),Z([Q],nt),nt.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=U.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},nt.prototype.processPath=function(t,e){var n=e/100,i=[0,0],r=t._length,a=0;for(a=0;a<r;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=r,i[1]/=r;var o,s,l,c,h,d,u=St.newElement();for(u.c=t.c,a=0;a<r;a+=1)o=t.v[a][0]+(i[0]-t.v[a][0])*n,s=t.v[a][1]+(i[1]-t.v[a][1])*n,l=t.o[a][0]+(i[0]-t.o[a][0])*-n,c=t.o[a][1]+(i[1]-t.o[a][1])*-n,h=t.i[a][0]+(i[0]-t.i[a][0])*-n,d=t.i[a][1]+(i[1]-t.i[a][1])*-n,u.setTripleAt(o,s,l,c,h,d,a);return u},nt.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.amount.v;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},$.registerModifier("pb",nt),Z([Q],it),it.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=U.getProp(t,e.c,0,null,this),this.o=U.getProp(t,e.o,0,null,this),this.tr=K.getTransformProperty(t,e.tr,this),this.so=U.getProp(t,e.tr.so,0,.01,this),this.eo=U.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new W,this.rMatrix=new W,this.sMatrix=new W,this.tMatrix=new W,this.matrix=new W},it.prototype.applyTransforms=function(t,e,n,i,r,a){var o=a?-1:1,s=i.s.v[0]+(1-i.s.v[0])*(1-r),l=i.s.v[1]+(1-i.s.v[1])*(1-r);t.translate(i.p.v[0]*o*r,i.p.v[1]*o*r,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*o*r),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),n.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),n.scale(a?1/s:s,a?1/l:l),n.translate(i.a.v[0],i.a.v[1],i.a.v[2])},it.prototype.init=function(t,e,n,i){for(this.elem=t,this.arr=e,this.pos=n,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[n]);n>0;)n-=1,this._elements.unshift(e[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},it.prototype.resetElements=function(t){var e,n=t.length;for(e=0;e<n;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},it.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},it.prototype.changeGroupRender=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)t[n]._render=e,"gr"===t[n].ty&&this.changeGroupRender(t[n].it,e)},it.prototype.processShapes=function(t){var e,n,i,r,a,o=!1;if(this._mdf||t){var s,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}for(a=0,i=0;i<=this._groups.length-1;i+=1){if(s=a<l,this._groups[i]._render=s,this.changeGroupRender(this._groups[i].it,s),!s){var h=this.elemsData[i].it,d=h[h.length-1];0!==d.transform.op.v?(d.transform.op._mdf=!0,d.transform.op.v=0):d.transform.op._mdf=!1}a+=1}this._currentCopies=l;var u=this.o.v,p=u%1,m=u>0?Math.floor(u):Math.ceil(u),g=this.pMatrix.props,f=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,w,b=0;if(u>0){for(;b<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),b+=p)}else if(u<0){for(;b>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),b-=p)}for(i=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,a=this._currentCopies;a;){if(w=(n=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===r||i!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),v=0;v<w;v+=1)n[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<w;v+=1)n[v]=this.matrix.props[v];b+=1,a-=1,i+=r}}else for(a=this._currentCopies,i=0,r=1;a;)n=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=r;return o},it.prototype.addShape=function(){},$.registerModifier("rp",it),rt.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(L(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},rt.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)St.release(this.shapes[t]);this._length=0},at.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,n=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<n;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},Z([R],at),ot.prototype.comparePoints=function(t,e){for(var n=0,i=this.o.length/2;n<i;){if(Math.abs(t[4*n]-t[4*e+2*n])>.01)return!1;n+=1}return!0},ot.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},ot.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,n,i,r=4*this.data.p;for(e=0;e<r;e+=1)n=e%4==0?100:255,i=Math.round(this.prop.v[e]*n),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=4*this.data.p;e<r;e+=1)n=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},Z([R],ot);var st,lt=function(t,e,n,i){if(0===e)return"";var r,a=t.o,o=t.i,s=t.v,l=" M"+i.applyToPointStringified(s[0][0],s[0][1]);for(r=1;r<e;r+=1)l+=" C"+i.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+i.applyToPointStringified(o[r][0],o[r][1])+" "+i.applyToPointStringified(s[r][0],s[r][1]);return n&&e&&(l+=" C"+i.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+i.applyToPointStringified(o[0][0],o[0][1])+" "+i.applyToPointStringified(s[0][0],s[0][1]),l+="z"),l},ct=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,n=this.audios.length;for(e=0;e<n;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ht=function(){var t=function(){var t=F("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,n){var i="";if(t.e)i=t.p;else if(e){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),i=e+r}else i=n,i+=t.u?t.u:"",i+=t.p;return i}function r(t){var e=0,n=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(n)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},n=i(t,this.assetsPath,this.path);return H.loadData(n,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var n;this.imagesLoadedCb=e;var i=t.length;for(n=0;n<i;n+=1)t[n].layers||(t[n].t&&"seq"!==t[n].t?3===t[n].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[n]))):(this.totalImages+=1,this.images.push(this._createImageData(t[n]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,n=this.images.length;e<n;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var n=i(e,this.assetsPath,this.path),r=F("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.src=n;var a={img:r,assetData:e};return a},createImageData:function(e){var n=i(e,this.assetsPath,this.path),r=B("image");s?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",n),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var a={img:r,assetData:e};return a},imageLoaded:e,footageLoaded:n,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},o}(),dt=(st={maskType:!0},(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(st.maskType=!1),st),ut=function(){var t={};return t.createFilter=function(t,e){var n=B("filter");return n.setAttribute("id",t),!0!==e&&(n.setAttribute("filterUnits","objectBoundingBox"),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%")),n},t.createAlphaToLuminanceFilter=function(){var t=B("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}();function pt(t,e,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=n,this._animatorsData=L(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function mt(t,e,n){var i={propType:!1},r=U.getProp,a=e.a;this.a={r:a.r?r(t,a.r,0,m,n):i,rx:a.rx?r(t,a.rx,0,m,n):i,ry:a.ry?r(t,a.ry,0,m,n):i,sk:a.sk?r(t,a.sk,0,m,n):i,sa:a.sa?r(t,a.sa,0,m,n):i,s:a.s?r(t,a.s,1,.01,n):i,a:a.a?r(t,a.a,1,0,n):i,o:a.o?r(t,a.o,0,.01,n):i,p:a.p?r(t,a.p,1,0,n):i,sw:a.sw?r(t,a.sw,0,0,n):i,sc:a.sc?r(t,a.sc,1,0,n):i,fc:a.fc?r(t,a.fc,1,0,n):i,fh:a.fh?r(t,a.fh,0,0,n):i,fs:a.fs?r(t,a.fs,0,.01,n):i,fb:a.fb?r(t,a.fb,0,.01,n):i,t:a.t?r(t,a.t,0,0,n):i},this.s=vt.getTextSelectorProp(t,e.s,n),this.s.t=e.s.t}function gt(t,e,n,i,r,a){this.o=t,this.sw=e,this.sc=n,this.fc=i,this.m=r,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!n,fc:!!i,m:!0,p:!0}}function ft(t,e){this._frameId=i,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}pt.prototype.searchProperties=function(){var t,e,n=this._textData.a.length,i=U.getProp;for(t=0;t<n;t+=1)e=this._textData.a[t],this._animatorsData[t]=new mt(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},pt.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var n,i,r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b,x=this._moreOptions.alignment.v,S=this._animatorsData,A=this._textData,C=this.mHelper,k=this._renderType,I=this.renderedLetters.length,E=t.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var P,T=b.v;for(this._pathData.r.v&&(T=T.reverse()),o={tLength:0,segments:[]},a=T._length-1,y=0,r=0;r<a;r+=1)P=Y.buildBezierData(T.v[r],T.v[r+1],[T.o[r][0]-T.v[r][0],T.o[r][1]-T.v[r][1]],[T.i[r+1][0]-T.v[r+1][0],T.i[r+1][1]-T.v[r+1][1]]),o.tLength+=P.segmentLength,o.segments.push(P),y+=P.segmentLength;r=a,b.v.c&&(P=Y.buildBezierData(T.v[r],T.v[0],[T.o[r][0]-T.v[r][0],T.o[r][1]-T.v[r][1]],[T.i[0][0]-T.v[0][0],T.i[0][1]-T.v[0][1]]),o.tLength+=P.segmentLength,o.segments.push(P),y+=P.segmentLength),this._pathData.pi=o}if(o=this._pathData.pi,s=this._pathData.f.v,u=0,d=1,c=0,h=!0,g=o.segments,s<0&&b.v.c)for(o.tLength<Math.abs(s)&&(s=-Math.abs(s)%o.tLength),d=(m=g[u=g.length-1].points).length-1;s<0;)s+=m[d].partialLength,(d-=1)<0&&(d=(m=g[u-=1].points).length-1);p=(m=g[u].points)[d-1],f=(l=m[d]).partialLength}a=E.length,n=0,i=0;var L,B,F,R,N,V=1.2*t.finalSize*.714,z=!0;F=S.length;var G,W,O,Z,H,j,X,U,K,J,q,$,Q=-1,tt=s,et=u,nt=d,it=-1,rt="",at=this.defaultPropsArray;if(2===t.j||1===t.j){var ot=0,st=0,lt=2===t.j?-.5:-1,ct=0,ht=!0;for(r=0;r<a;r+=1)if(E[r].n){for(ot&&(ot+=st);ct<r;)E[ct].animatorJustifyOffset=ot,ct+=1;ot=0,ht=!0}else{for(B=0;B<F;B+=1)(L=S[B].a).t.propType&&(ht&&2===t.j&&(st+=L.t.v*lt),(N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars)).length?ot+=L.t.v*N[0]*lt:ot+=L.t.v*N*lt);ht=!1}for(ot&&(ot+=st);ct<r;)E[ct].animatorJustifyOffset=ot,ct+=1}for(r=0;r<a;r+=1){if(C.reset(),Z=1,E[r].n)n=0,i+=t.yOffset,i+=z?1:0,s=tt,z=!1,this._hasMaskedPath&&(d=nt,p=(m=g[u=et].points)[d-1],f=(l=m[d]).partialLength,c=0),rt="",q="",K="",$="",at=this.defaultPropsArray;else{if(this._hasMaskedPath){if(it!==E[r].line){switch(t.j){case 1:s+=y-t.lineWidths[E[r].line];break;case 2:s+=(y-t.lineWidths[E[r].line])/2}it=E[r].line}Q!==E[r].ind&&(E[Q]&&(s+=E[Q].extra),s+=E[r].an/2,Q=E[r].ind),s+=x[0]*E[r].an*.005;var dt=0;for(B=0;B<F;B+=1)(L=S[B].a).p.propType&&((N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars)).length?dt+=L.p.v[0]*N[0]:dt+=L.p.v[0]*N),L.a.propType&&((N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars)).length?dt+=L.a.v[0]*N[0]:dt+=L.a.v[0]*N);for(h=!0,this._pathData.a.v&&(s=.5*E[0].an+(y-this._pathData.f.v-.5*E[0].an-.5*E[E.length-1].an)*Q/(a-1),s+=this._pathData.f.v);h;)c+f>=s+dt||!m?(v=(s+dt-c)/l.partialLength,W=p.point[0]+(l.point[0]-p.point[0])*v,O=p.point[1]+(l.point[1]-p.point[1])*v,C.translate(-x[0]*E[r].an*.005,-x[1]*V*.01),h=!1):m&&(c+=l.partialLength,(d+=1)>=m.length&&(d=0,g[u+=1]?m=g[u].points:b.v.c?(d=0,m=g[u=0].points):(c-=l.partialLength,m=null)),m&&(p=l,f=(l=m[d]).partialLength));G=E[r].an/2-E[r].add,C.translate(-G,0,0)}else G=E[r].an/2-E[r].add,C.translate(-G,0,0),C.translate(-x[0]*E[r].an*.005,-x[1]*V*.01,0);for(B=0;B<F;B+=1)(L=S[B].a).t.propType&&(N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars),0===n&&0===t.j||(this._hasMaskedPath?N.length?s+=L.t.v*N[0]:s+=L.t.v*N:N.length?n+=L.t.v*N[0]:n+=L.t.v*N));for(t.strokeWidthAnim&&(j=t.sw||0),t.strokeColorAnim&&(H=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(X=[t.fc[0],t.fc[1],t.fc[2]]),B=0;B<F;B+=1)(L=S[B].a).a.propType&&((N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars)).length?C.translate(-L.a.v[0]*N[0],-L.a.v[1]*N[1],L.a.v[2]*N[2]):C.translate(-L.a.v[0]*N,-L.a.v[1]*N,L.a.v[2]*N));for(B=0;B<F;B+=1)(L=S[B].a).s.propType&&((N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars)).length?C.scale(1+(L.s.v[0]-1)*N[0],1+(L.s.v[1]-1)*N[1],1):C.scale(1+(L.s.v[0]-1)*N,1+(L.s.v[1]-1)*N,1));for(B=0;B<F;B+=1){if(L=S[B].a,N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars),L.sk.propType&&(N.length?C.skewFromAxis(-L.sk.v*N[0],L.sa.v*N[1]):C.skewFromAxis(-L.sk.v*N,L.sa.v*N)),L.r.propType&&(N.length?C.rotateZ(-L.r.v*N[2]):C.rotateZ(-L.r.v*N)),L.ry.propType&&(N.length?C.rotateY(L.ry.v*N[1]):C.rotateY(L.ry.v*N)),L.rx.propType&&(N.length?C.rotateX(L.rx.v*N[0]):C.rotateX(L.rx.v*N)),L.o.propType&&(N.length?Z+=(L.o.v*N[0]-Z)*N[0]:Z+=(L.o.v*N-Z)*N),t.strokeWidthAnim&&L.sw.propType&&(N.length?j+=L.sw.v*N[0]:j+=L.sw.v*N),t.strokeColorAnim&&L.sc.propType)for(U=0;U<3;U+=1)N.length?H[U]+=(L.sc.v[U]-H[U])*N[0]:H[U]+=(L.sc.v[U]-H[U])*N;if(t.fillColorAnim&&t.fc){if(L.fc.propType)for(U=0;U<3;U+=1)N.length?X[U]+=(L.fc.v[U]-X[U])*N[0]:X[U]+=(L.fc.v[U]-X[U])*N;L.fh.propType&&(X=N.length?D(X,L.fh.v*N[0]):D(X,L.fh.v*N)),L.fs.propType&&(X=N.length?_(X,L.fs.v*N[0]):_(X,L.fs.v*N)),L.fb.propType&&(X=N.length?M(X,L.fb.v*N[0]):M(X,L.fb.v*N))}}for(B=0;B<F;B+=1)(L=S[B].a).p.propType&&(N=S[B].s.getMult(E[r].anIndexes[B],A.a[B].s.totalChars),this._hasMaskedPath?N.length?C.translate(0,L.p.v[1]*N[0],-L.p.v[2]*N[1]):C.translate(0,L.p.v[1]*N,-L.p.v[2]*N):N.length?C.translate(L.p.v[0]*N[0],L.p.v[1]*N[1],-L.p.v[2]*N[2]):C.translate(L.p.v[0]*N,L.p.v[1]*N,-L.p.v[2]*N));if(t.strokeWidthAnim&&(K=j<0?0:j),t.strokeColorAnim&&(J="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),t.fillColorAnim&&t.fc&&(q="rgb("+Math.round(255*X[0])+","+Math.round(255*X[1])+","+Math.round(255*X[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,x[1]*V*.01+i,0),this._pathData.p.v){w=(l.point[1]-p.point[1])/(l.point[0]-p.point[0]);var ut=180*Math.atan(w)/Math.PI;l.point[0]<p.point[0]&&(ut+=180),C.rotate(-ut*Math.PI/180)}C.translate(W,O,0),s-=x[0]*E[r].an*.005,E[r+1]&&Q!==E[r+1].ind&&(s+=E[r].an/2,s+=.001*t.tr*t.finalSize)}else{switch(C.translate(n,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(E[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[E[r].line]),0,0);break;case 2:C.translate(E[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[E[r].line])/2,0,0)}C.translate(0,-t.ls),C.translate(G,0,0),C.translate(x[0]*E[r].an*.005,x[1]*V*.01,0),n+=E[r].l+.001*t.tr*t.finalSize}"html"===k?rt=C.toCSS():"svg"===k?rt=C.to2dCSS():at=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],$=Z}I<=r?(R=new gt($,K,J,q,rt,at),this.renderedLetters.push(R),I+=1,this.lettersChangedFlag=!0):(R=this.renderedLetters[r],this.lettersChangedFlag=R.update($,K,J,q,rt,at)||this.lettersChangedFlag)}}},pt.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},pt.prototype.mHelper=new W,pt.prototype.defaultPropsArray=[],Z([R],pt),gt.prototype.update=function(t,e,n,i,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,o=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,o=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,o=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,o=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,o=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,o=!0),o},ft.prototype.defaultBoxWidth=[0,0],ft.prototype.copyData=function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},ft.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},ft.prototype.searchProperty=function(){return this.searchKeyframes()},ft.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},ft.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},ft.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<r;i+=1)a=n!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},ft.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,n=0,i=t.length;n<=i-1&&!(n===i-1||t[n+1].t>e);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},ft.prototype.buildFinalText=function(t){for(var e,n,i=[],r=0,a=t.length,o=!1;r<a;)e=t.charCodeAt(r),X.isCombinedCharacter(e)?i[i.length-1]+=t.charAt(r):e>=55296&&e<=56319?(n=t.charCodeAt(r+1))>=56320&&n<=57343?(o||X.isModifier(e,n)?(i[i.length-1]+=t.substr(r,2),o=!1):i.push(t.substr(r,2)),r+=1):i.push(t.charAt(r)):e>56319?(n=t.charCodeAt(r+1),X.isZeroWidthJoiner(e,n)?(o=!0,i[i.length-1]+=t.substr(r,2),r+=1):i.push(t.charAt(r))):X.isZeroWidthJoiner(e)?(i[i.length-1]+=t.charAt(r),o=!0):i.push(t.charAt(r)),r+=1;return i},ft.prototype.completeTextData=function(t){t.__complete=!0;var e,n,i,r,a,o,s,l=this.elem.globalData.fontManager,c=this.data,h=[],d=0,u=c.m.g,p=0,m=0,g=0,f=[],y=0,v=0,w=l.getFontByName(t.f),b=0,x=j(w);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),n=t.finalText.length,t.finalLineHeight=t.lh;var S,A=t.tr/1e3*t.finalSize;if(t.sz)for(var C,k,I=!0,E=t.sz[0],_=t.sz[1];I;){C=0,y=0,n=(k=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var M=-1;for(e=0;e<n;e+=1)S=k[e].charCodeAt(0),i=!1," "===k[e]?M=e:13!==S&&3!==S||(y=0,i=!0,C+=t.finalLineHeight||1.2*t.finalSize),l.chars?(s=l.getCharData(k[e],w.fStyle,w.fFamily),b=i?0:s.w*t.finalSize/100):b=l.measureText(k[e],t.f,t.finalSize),y+b>E&&" "!==k[e]?(-1===M?n+=1:e=M,C+=t.finalLineHeight||1.2*t.finalSize,k.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=b,y+=A);C+=w.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&_<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=k,n=t.finalText.length,I=!1)}y=-A,b=0;var D,P=0;for(e=0;e<n;e+=1)if(i=!1,13===(S=(D=t.finalText[e]).charCodeAt(0))||3===S?(P=0,f.push(y),v=y>v?y:v,y=-2*A,r="",i=!0,g+=1):r=D,l.chars?(s=l.getCharData(D,w.fStyle,l.getFontByName(t.f).fFamily),b=i?0:s.w*t.finalSize/100):b=l.measureText(r,t.f,t.finalSize)," "===D?P+=b+A:(y+=b+A+P,P=0),h.push({l:b,an:b,add:p,n:i,anIndexes:[],val:r,line:g,animatorJustifyOffset:0}),2==u){if(p+=b,""===r||" "===r||e===n-1){for(""!==r&&" "!==r||(p-=b);m<=e;)h[m].an=p,h[m].ind=d,h[m].extra=b,m+=1;d+=1,p=0}}else if(3==u){if(p+=b,""===r||e===n-1){for(""===r&&(p-=b);m<=e;)h[m].an=p,h[m].ind=d,h[m].extra=b,m+=1;p=0,d+=1}}else h[d].ind=d,h[d].extra=0,d+=1;if(t.l=h,v=y>v?y:v,f.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=f;var T,L,B,F,R=c.a;o=R.length;var N=[];for(a=0;a<o;a+=1){for((T=R[a]).a.sc&&(t.strokeColorAnim=!0),T.a.sw&&(t.strokeWidthAnim=!0),(T.a.fc||T.a.fh||T.a.fs||T.a.fb)&&(t.fillColorAnim=!0),F=0,B=T.s.b,e=0;e<n;e+=1)(L=h[e]).anIndexes[a]=F,(1==B&&""!==L.val||2==B&&""!==L.val&&" "!==L.val||3==B&&(L.n||" "==L.val||e==n-1)||4==B&&(L.n||e==n-1))&&(1===T.s.rn&&N.push(F),F+=1);c.a[a].s.totalChars=F;var V,z=-1;if(1===T.s.rn)for(e=0;e<n;e+=1)z!=(L=h[e]).anIndexes[a]&&(z=L.anIndexes[a],V=N.splice(Math.floor(Math.random()*N.length),1)[0]),L.anIndexes[a]=V}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=w.ascent*t.finalSize/100},ft.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var n=this.copyData({},this.data.d.k[e].s);n=this.copyData(n,t),this.data.d.k[e].s=n,this.recalculate(e),this.elem.addDynamicProperty(this)},ft.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},ft.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},ft.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var yt,vt=function(){var t=Math.max,e=Math.min,n=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=U.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?U.getProp(t,e.e,0,0,this):{v:100},this.o=U.getProp(t,e.o||{k:0},0,0,this),this.xe=U.getProp(t,e.xe||{k:0},0,0,this),this.ne=U.getProp(t,e.ne||{k:0},0,0,this),this.sm=U.getProp(t,e.sm||{k:100},0,0,this),this.a=U.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,a=0,o=1,s=1;this.ne.v>0?r=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:s=1+this.xe.v/100;var l=O.getBezierEasing(r,a,o,s).get,c=0,h=this.finalS,d=this.finalE,u=this.data.sh;if(2===u)c=l(c=d===h?i>=d?1:0:t(0,e(.5/(d-h)+(i-h)/(d-h),1)));else if(3===u)c=l(c=d===h?i>=d?0:1:1-t(0,e(.5/(d-h)+(i-h)/(d-h),1)));else if(4===u)d===h?c=0:(c=t(0,e(.5/(d-h)+(i-h)/(d-h),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===u){if(d===h)c=0;else{var p=d-h,m=-p/2+(i=e(t(0,i+.5-h),d-h)),g=p/2;c=Math.sqrt(1-m*m/(g*g))}c=l(c)}else 6===u?(d===h?c=0:(i=e(t(0,i+.5-h),d-h),c=(1+Math.cos(Math.PI+2*Math.PI*i/(d-h)))/2),c=l(c)):(i>=n(h)&&(c=t(0,e(i-h<0?e(d,1)-(h-i):d-i,1))),c=l(c));if(100!==this.sm.v){var f=.01*this.sm.v;0===f&&(f=1e-8);var y=.5-.5*f;c<y?c=0:(c=(c-y)/f)>1&&(c=1)}return c*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,n=this.o.v/e,i=this.s.v/e+n,r=this.e.v/e+n;if(i>r){var a=i;i=r,r=a}this.finalS=i,this.finalE=r}},Z([R],i),{getTextSelectorProp:function(t,e,n){return new i(t,e,n)}}}(),wt=function(t,e,n){var i=0,r=t,a=L(r);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===r&&(a=bt.double(a),r*=2),n&&n(t),a[i]=t,i+=1}}},bt={double:function(t){return t.concat(L(t.length))}},xt=wt(8,(function(){return T("float32",2)})),St=((yt=wt(4,(function(){return new J}),(function(t){var e,n=t._length;for(e=0;e<n;e+=1)xt.release(t.v[e]),xt.release(t.i[e]),xt.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}))).clone=function(t){var e,n=yt.newElement(),i=void 0===t._length?t.v.length:t._length;for(n.setLength(i),n.c=t.c,e=0;e<i;e+=1)n.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return n},yt),At=function(){var t={newShapeCollection:function(){return e?i[e-=1]:new rt},release:function(t){var r,a=t._length;for(r=0;r<a;r+=1)St.release(t.shapes[r]);t._length=0,e===n&&(i=bt.double(i),n*=2),i[e]=t,e+=1}},e=0,n=4,i=L(n);return t}(),Ct=wt(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,n=t.lengths.length;for(e=0;e<n;e+=1)kt.release(t.lengths[e]);t.lengths.length=0})),kt=wt(8,(function(){return{addedLength:0,percents:T("float32",p),lengths:T("float32",p)}})),It=function(){function t(t){for(var e,n=t.split("\r\n"),i={},r=0,a=0;a<n.length;a+=1)2===(e=n[a].split(":")).length&&(i[e[0]]=e[1].trim(),r+=1);if(0===r)throw new Error;return i}return function(e){for(var n=[],i=0;i<e.length;i+=1){var r=e[i],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[i].cm)}catch(n){try{a.payload=t(e[i].cm)}catch(t){a.payload={name:e[i]}}}n.push(a)}return n}}();function Et(){}function _t(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=B("svg");var n="";if(e&&e.title){var i=B("title"),r=k();i.setAttribute("id",r),i.textContent=e.title,this.svgElement.appendChild(i),n+=r}if(e&&e.description){var a=B("desc"),o=k();a.setAttribute("id",o),a.textContent=e.description,this.svgElement.appendChild(a),n+=" "+o}n&&this.svgElement.setAttribute("aria-labelledby",n);var s=B("defs");this.svgElement.appendChild(s);var l=B("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"}},this.globalData={_mdf:!1,frameNum:-1,defs:s,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function Mt(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r,a,o=this.globalData.defs,s=this.masksProperties?this.masksProperties.length:0;this.viewData=L(s),this.solidPath="";var l,c,h,d,u,p,m=this.masksProperties,g=0,f=[],y=k(),v="clipPath",w="clip-path";for(r=0;r<s;r+=1)if(("a"!==m[r].mode&&"n"!==m[r].mode||m[r].inv||100!==m[r].o.k||m[r].o.x)&&(v="mask",w="mask"),"s"!==m[r].mode&&"i"!==m[r].mode||0!==g?h=null:((h=B("rect")).setAttribute("fill","#ffffff"),h.setAttribute("width",this.element.comp.data.w||0),h.setAttribute("height",this.element.comp.data.h||0),f.push(h)),a=B("path"),"n"===m[r].mode)this.viewData[r]={op:U.getProp(this.element,m[r].o,0,.01,this.element),prop:q.getShapeProp(this.element,m[r],3),elem:a,lastPath:""},o.appendChild(a);else{var b;if(g+=1,a.setAttribute("fill","s"===m[r].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==m[r].x.k?(v="mask",w="mask",p=U.getProp(this.element,m[r].x,0,null,this.element),b=k(),(d=B("filter")).setAttribute("id",b),(u=B("feMorphology")).setAttribute("operator","erode"),u.setAttribute("in","SourceGraphic"),u.setAttribute("radius","0"),d.appendChild(u),o.appendChild(d),a.setAttribute("stroke","s"===m[r].mode?"#000000":"#ffffff")):(u=null,p=null),this.storedData[r]={elem:a,x:p,expan:u,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===m[r].mode){c=f.length;var x=B("g");for(l=0;l<c;l+=1)x.appendChild(f[l]);var S=B("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+g),S.appendChild(a),o.appendChild(S),x.setAttribute("mask","url("+n+"#"+y+"_"+g+")"),f.length=0,f.push(x)}else f.push(a);m[r].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[r]={elem:a,lastPath:"",op:U.getProp(this.element,m[r].o,0,.01,this.element),prop:q.getShapeProp(this.element,m[r],3),invRect:h},this.viewData[r].prop.k||this.drawPath(m[r],this.viewData[r].prop.v,this.viewData[r])}for(this.maskElement=B(v),s=f.length,r=0;r<s;r+=1)this.maskElement.appendChild(f[r]);g>0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(w,"url("+n+"#"+y+")"),o.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}function Dt(){}function Pt(){}function Tt(){}function Lt(){}function Bt(){}function Ft(t,e){this.elem=t,this.pos=e}function Rt(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=B("path"),this.msElem=null}function Nt(t,e,n){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=n,this.lvl=e,this._isAnimated=!!n.k;for(var i=0,r=t.length;i<r;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function Vt(t,e,n){this.transform={mProps:t,op:e,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}function zt(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=U.getProp(t,e.o,0,.01,this),this.w=U.getProp(t,e.w,0,null,this),this.d=new at(t,e.d||{},"svg",this),this.c=U.getProp(t,e.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}function Gt(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=U.getProp(t,e.o,0,.01,this),this.c=U.getProp(t,e.c,1,255,this),this.style=n}function Wt(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,n)}function Ot(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=U.getProp(t,e.w,0,null,this),this.d=new at(t,e.d||{},"svg",this),this.initGradientData(t,e,n),this._isAnimated=!!this._isAnimated}function Zt(){this.it=[],this.prevViewData=[],this.gr=B("g")}Et.prototype.checkLayers=function(t){var e,n,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(n=this.layers[e]).ip-n.st<=t-this.layers[e].st&&n.op-n.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},Et.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},Et.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},Et.prototype.createAudio=function(t){return new Qt(t,this.globalData,this)},Et.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},Et.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},Et.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var n,i=t.length,r=this.layers.length;for(e=0;e<i;e+=1)for(n=0;n<r;){if(this.layers[n].id===t[e].id){this.layers[n]=t[e];break}n+=1}},Et.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},Et.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},Et.prototype.buildElementParenting=function(t,e,n){for(var i=this.elements,r=this.layers,a=0,o=r.length;a<o;)r[a].ind==e&&(i[a]&&!0!==i[a]?(n.push(i[a]),i[a].setAsParent(),void 0!==r[a].parent?this.buildElementParenting(t,r[a].parent,n):t.setHierarchy(n)):(this.buildItem(a),this.addPendingElement(t))),a+=1},Et.prototype.addPendingElement=function(t){this.pendingElements.push(t)},Et.prototype.searchExtraCompositions=function(t){var e,n=t.length;for(e=0;e<n;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},Et.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new X,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},Z([Et],_t),_t.prototype.createNull=function(t){return new jt(t,this.globalData,this)},_t.prototype.createShape=function(t){return new ne(t,this.globalData,this)},_t.prototype.createText=function(t){return new ee(t,this.globalData,this)},_t.prototype.createImage=function(t){return new qt(t,this.globalData,this)},_t.prototype.createComp=function(t){return new te(t,this.globalData,this)},_t.prototype.createSolid=function(t){return new $t(t,this.globalData,this)},_t.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=B("clipPath"),r=B("rect");r.setAttribute("width",t.w),r.setAttribute("height",t.h),r.setAttribute("x",0),r.setAttribute("y",0);var a=k();i.setAttribute("id",a),i.appendChild(r),this.layerElement.setAttribute("clip-path","url("+n+"#"+a+")"),e.appendChild(i),this.layers=t.layers,this.elements=L(t.layers.length)},_t.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},_t.prototype.updateContainerSize=function(){},_t.prototype.buildItem=function(t){var n=this.elements;if(!n[t]&&99!==this.layers[t].ty){n[t]=!0;var i=this.createItem(this.layers[t]);n[t]=i,e&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&!0!==this.elements[t-1]?i.setMatte(n[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},_t.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,n=this.elements.length;e<n;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},_t.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var n=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=n-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<n;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},_t.prototype.appendElementInPos=function(t,e){var n=t.getBaseElement();if(n){for(var i,r=0;r<e;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},_t.prototype.hide=function(){this.layerElement.style.display="none"},_t.prototype.show=function(){this.layerElement.style.display="block"},Mt.prototype.getMaskProperty=function(t){return this.viewData[t].prop},Mt.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,r=this.masksProperties.length;for(e=0;e<r;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var a=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+n+"#"+this.storedData[e].filterId+")")),a.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},Mt.prototype.getMaskelement=function(){return this.maskElement},Mt.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,(t+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},Mt.prototype.drawPath=function(t,e,n){var i,r,a=" M"+e.v[0][0]+","+e.v[0][1];for(r=e._length,i=1;i<r;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&r>1&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),n.lastPath!==a){var o="";n.elem&&(e.c&&(o=t.inv?this.solidPath+a:a),n.elem.setAttribute("d",o)),n.lastPath=a}},Mt.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},Dt.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},Pt.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var n,i=this.dynamicProperties.length;for(n=0;n<i;n+=1)(e||this._isParent&&"transform"===this.dynamicProperties[n].propType)&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},Tt.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?K.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new W},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,n=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<i;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),n=0;n<i;n+=1)t=this.hierarchy[n].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var n,i=!0,r=this.comp;i;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):i=!1;var a,o=e.length;for(n=0;n<o;n+=1)a=e[n].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new W},Lt.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}},Z([Lt,function(t){function e(){}return e.prototype=t,e}({initElement:function(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initTransform(t,e,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],Bt),Rt.prototype.reset=function(){this.d="",this._mdf=!1},Nt.prototype.setAsAnimated=function(){this._isAnimated=!0},Z([R],zt),Z([R],Gt),Wt.prototype.initGradientData=function(t,e,n){this.o=U.getProp(t,e.o,0,.01,this),this.s=U.getProp(t,e.s,1,null,this),this.e=U.getProp(t,e.e,1,null,this),this.h=U.getProp(t,e.h||{k:0},0,.01,this),this.a=U.getProp(t,e.a||{k:0},0,m,this),this.g=new ot(t,e.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,e),this.setGradientOpacity(e,n),this._isAnimated=!!this._isAnimated},Wt.prototype.setGradientData=function(t,e){var i=k(),r=B(1===e.t?"linearGradient":"radialGradient");r.setAttribute("id",i),r.setAttribute("spreadMethod","pad"),r.setAttribute("gradientUnits","userSpaceOnUse");var a,o,s,l=[];for(s=4*e.g.p,o=0;o<s;o+=4)a=B("stop"),r.appendChild(a),l.push(a);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+n+"#"+i+")"),this.gf=r,this.cst=l},Wt.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,r,a,o=B("mask"),s=B("path");o.appendChild(s);var l=k(),c=k();o.setAttribute("id",c);var h=B(1===t.t?"linearGradient":"radialGradient");h.setAttribute("id",l),h.setAttribute("spreadMethod","pad"),h.setAttribute("gradientUnits","userSpaceOnUse"),a=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var d=this.stops;for(r=4*t.g.p;r<a;r+=2)(i=B("stop")).setAttribute("stop-color","rgb(255,255,255)"),h.appendChild(i),d.push(i);s.setAttribute("gf"===t.ty?"fill":"stroke","url("+n+"#"+l+")"),"gs"===t.ty&&(s.setAttribute("stroke-linecap",z[t.lc||2]),s.setAttribute("stroke-linejoin",G[t.lj||2]),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),this.of=h,this.ms=o,this.ost=d,this.maskId=c,e.msElem=s}},Z([R],Wt),Z([Wt,R],Ot);var Yt=function(){var t=new W,e=new W;function n(t,e,n){(n||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(n||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(n,i,r){var a,o,s,l,c,h,d,u,p,m,g,f=i.styles.length,y=i.lvl;for(h=0;h<f;h+=1){if(l=i.sh._mdf||r,i.styles[h].lvl<y){for(u=e.reset(),m=y-i.styles[h].lvl,g=i.transformers.length-1;!l&&m>0;)l=i.transformers[g].mProps._mdf||l,m-=1,g-=1;if(l)for(m=y-i.styles[h].lvl,g=i.transformers.length-1;m>0;)p=i.transformers[g].mProps.v.props,u.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),m-=1,g-=1}else u=t;if(o=(d=i.sh.paths)._length,l){for(s="",a=0;a<o;a+=1)(c=d.shapes[a])&&c._length&&(s+=lt(c,c._length,c.c,u));i.caches[h]=s}else s=i.caches[h];i.styles[h].d+=!0===n.hd?"":s,i.styles[h]._mdf=l||i.styles[h]._mdf}}function r(t,e,n){var i=e.style;(e.c._mdf||n)&&i.pElem.setAttribute("fill","rgb("+h(e.c.v[0])+","+h(e.c.v[1])+","+h(e.c.v[2])+")"),(e.o._mdf||n)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,n){o(t,e,n),s(0,e,n)}function o(t,e,n){var i,r,a,o,s,l=e.gf,c=e.g._hasOpacity,h=e.s.v,d=e.e.v;if(e.o._mdf||n){var u="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(u,e.o.v)}if(e.s._mdf||n){var p=1===t.t?"x1":"cx",m="x1"===p?"y1":"cy";l.setAttribute(p,h[0]),l.setAttribute(m,h[1]),c&&!e.g._collapsable&&(e.of.setAttribute(p,h[0]),e.of.setAttribute(m,h[1]))}if(e.g._cmdf||n){i=e.cst;var g=e.g.c;for(a=i.length,r=0;r<a;r+=1)(o=i[r]).setAttribute("offset",g[4*r]+"%"),o.setAttribute("stop-color","rgb("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+")")}if(c&&(e.g._omdf||n)){var f=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,r=0;r<a;r+=1)o=i[r],e.g._collapsable||o.setAttribute("offset",f[2*r]+"%"),o.setAttribute("stop-opacity",f[2*r+1])}if(1===t.t)(e.e._mdf||n)&&(l.setAttribute("x2",d[0]),l.setAttribute("y2",d[1]),c&&!e.g._collapsable&&(e.of.setAttribute("x2",d[0]),e.of.setAttribute("y2",d[1])));else if((e.s._mdf||e.e._mdf||n)&&(s=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2)),l.setAttribute("r",s),c&&!e.g._collapsable&&e.of.setAttribute("r",s)),e.e._mdf||e.h._mdf||e.a._mdf||n){s||(s=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2)));var y=Math.atan2(d[1]-h[1],d[0]-h[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var w=s*v,b=Math.cos(y+e.a.v)*w+h[0],x=Math.sin(y+e.a.v)*w+h[1];l.setAttribute("fx",b),l.setAttribute("fy",x),c&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",x))}}function s(t,e,n){var i=e.style,r=e.d;r&&(r._mdf||n)&&r.dashStr&&(i.pElem.setAttribute("stroke-dasharray",r.dashStr),i.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||n)&&i.pElem.setAttribute("stroke","rgb("+h(e.c.v[0])+","+h(e.c.v[1])+","+h(e.c.v[2])+")"),(e.o._mdf||n)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||n)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return r;case"gf":return o;case"gs":return a;case"st":return s;case"sh":case"el":case"rc":case"sr":return i;case"tr":return n;default:return null}}}}();function Ht(){}function jt(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initFrame(),this.initTransform(t,e,n),this.initHierarchy()}function Xt(){}function Ut(){}function Kt(){}function Jt(){}function qt(t,e,n){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function $t(t,e,n){this.initElement(t,e,n)}function Qt(t,e,n){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,n),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this.tm=t.tm?U.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function te(t,e,n){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?L(this.layers.length):[],this.initElement(t,e,n),this.tm=t.tm?U.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function ee(t,e,n){this.textSpans=[],this.renderType="svg",this.initElement(t,e,n)}function ne(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,n),this.prevViewData=[]}function ie(t,e){this.initialized=!1,this.filterManager=e,this.elem=t,this.paths=[]}function re(t,e){this.filterManager=e;var n=this.filterManager.effectElements,i=B("feComponentTransfer");(n[10].p.k||0!==n[10].p.v||n[11].p.k||1!==n[11].p.v||n[12].p.k||1!==n[12].p.v||n[13].p.k||0!==n[13].p.v||n[14].p.k||1!==n[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(n[17].p.k||0!==n[17].p.v||n[18].p.k||1!==n[18].p.v||n[19].p.k||1!==n[19].p.v||n[20].p.k||0!==n[20].p.v||n[21].p.k||1!==n[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(n[24].p.k||0!==n[24].p.v||n[25].p.k||1!==n[25].p.v||n[26].p.k||1!==n[26].p.v||n[27].p.k||0!==n[27].p.v||n[28].p.k||1!==n[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(n[31].p.k||0!==n[31].p.v||n[32].p.k||1!==n[32].p.v||n[33].p.k||1!==n[33].p.v||n[34].p.k||0!==n[34].p.v||n[35].p.k||1!==n[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),i=B("feComponentTransfer")),(n[3].p.k||0!==n[3].p.v||n[4].p.k||1!==n[4].p.v||n[5].p.k||1!==n[5].p.v||n[6].p.k||0!==n[6].p.v||n[7].p.k||1!==n[7].p.v)&&(i.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}Ht.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=V(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,n){this.globalData=e,this.comp=n,this.data=t,this.layerId=k(),this.data.sr||(this.data.sr=1),this.effectsManager=new he(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},jt.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},jt.prototype.renderFrame=function(){},jt.prototype.getBaseElement=function(){return null},jt.prototype.destroy=function(){},jt.prototype.sourceRectAtTime=function(){},jt.prototype.hide=function(){},Z([Ht,Tt,Dt,Pt],jt),Xt.prototype={initRendererElement:function(){this.layerElement=B("g")},createContainerElements:function(){this.matteElement=B("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,r=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var a=B("mask");a.setAttribute("id",this.layerId),a.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),a.appendChild(this.layerElement),r=a,this.globalData.defs.appendChild(a),dt.maskType||1!=this.data.td||(a.setAttribute("mask-type","luminance"),t=k(),e=ut.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(ut.createAlphaToLuminanceFilter()),(i=B("g")).appendChild(this.layerElement),r=i,a.appendChild(i),i.setAttribute("filter","url("+n+"#"+t+")"))}else if(2==this.data.td){var o=B("mask");o.setAttribute("id",this.layerId),o.setAttribute("mask-type","alpha");var s=B("g");o.appendChild(s),t=k(),e=ut.createFilter(t);var l=B("feComponentTransfer");l.setAttribute("in","SourceGraphic"),e.appendChild(l);var c=B("feFuncA");c.setAttribute("type","table"),c.setAttribute("tableValues","1.0 0.0"),l.appendChild(c),this.globalData.defs.appendChild(e);var h=B("rect");h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),s.setAttribute("filter","url("+n+"#"+t+")"),s.appendChild(h),s.appendChild(this.layerElement),r=s,dt.maskType||(o.setAttribute("mask-type","luminance"),e.appendChild(ut.createAlphaToLuminanceFilter()),i=B("g"),s.appendChild(h),i.appendChild(this.layerElement),r=i,s.appendChild(i)),this.globalData.defs.appendChild(o)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),r=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var d=B("clipPath"),u=B("path");u.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var p=k();if(d.setAttribute("id",p),d.appendChild(u),this.globalData.defs.appendChild(d),this.checkMasks()){var m=B("g");m.setAttribute("clip-path","url("+n+"#"+p+")"),m.appendChild(this.layerElement),this.transformedElement=m,r?r.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+n+"#"+p+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new Mt(this.data,this,this.globalData),this.renderableEffectsManager=new se(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+n+"#"+t+")")}},Ut.prototype={addShapeToModifiers:function(t){var e,n=this.shapeModifiers.length;for(e=0;e<n;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,n=0,i=e.length;n<i;){if(e[n].elem===t)return e[n].pos;n+=1}return 0},addProcessedElement:function(t,e){for(var n=this.processedElements,i=n.length;i;)if(n[i-=1].elem===t)return void(n[i].pos=e);n.push(new Ft(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},Kt.prototype.initElement=function(t,e,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,n),this.textProperty=new ft(this,t.t,this.dynamicProperties),this.textAnimator=new pt(t.t,this.renderType,this),this.initTransform(t,e,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},Kt.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},Kt.prototype.createPathShape=function(t,e){var n,i,r=e.length,a="";for(n=0;n<r;n+=1)i=e[n].ks.k,a+=lt(i,i.i.length,!0,t);return a},Kt.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},Kt.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},Kt.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},Kt.prototype.applyTextPropertiesToMatrix=function(t,e,n,i,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[n]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[n])/2,0,0)}e.translate(i,r,0)},Kt.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},Kt.prototype.emptyProp=new gt,Kt.prototype.destroy=function(){},Z([Ht,Tt,Dt,Pt,Bt],Jt),Jt.prototype.initElement=function(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initTransform(t,e,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},Jt.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var n,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},Jt.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},Jt.prototype.setElements=function(t){this.elements=t},Jt.prototype.getElements=function(){return this.elements},Jt.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},Jt.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},Z([Ht,Tt,Xt,Dt,Pt,Bt],qt),qt.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=B("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},qt.prototype.sourceRectAtTime=function(){return this.sourceRect},Z([qt],$t),$t.prototype.createContent=function(){var t=B("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},Qt.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},Z([Lt,Ht,Pt],Qt),Qt.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},Qt.prototype.show=function(){},Qt.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},Qt.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},Qt.prototype.resume=function(){this._canPlay=!0},Qt.prototype.setRate=function(t){this.audio.rate(t)},Qt.prototype.volume=function(t){this.audio.volume(t)},Qt.prototype.getBaseElement=function(){return null},Qt.prototype.destroy=function(){},Qt.prototype.sourceRectAtTime=function(){},Qt.prototype.initExpressions=function(){},Z([_t,Jt,Xt],te),Z([Ht,Tt,Xt,Dt,Pt,Bt,Kt],ee),ee.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=B("text"))},ee.prototype.buildTextContents=function(t){for(var e=0,n=t.length,i=[],r="";e<n;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(r),r=""):r+=t[e],e+=1;return i.push(r),i},ee.prototype.buildNewText=function(){var t,e,n=this.textProperty.currentData;this.renderedLetters=L(n?n.l.length:0),n.fc?this.layerElement.setAttribute("fill",this.buildColor(n.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),n.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(n.sc)),this.layerElement.setAttribute("stroke-width",n.sw)),this.layerElement.setAttribute("font-size",n.finalSize);var i=this.globalData.fontManager.getFontByName(n.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var r=n.fWeight,a=n.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",n.t);var o,s=n.l||[],l=!!this.globalData.fontManager.chars;e=s.length;var c,h=this.mHelper,d="",u=this.data.singleShape,p=0,m=0,g=!0,f=.001*n.tr*n.finalSize;if(!u||l||n.sz){var y,v,w=this.textSpans.length;for(t=0;t<e;t+=1)l&&u&&0!==t||(o=w>t?this.textSpans[t]:B(l?"path":"text"),w<=t&&(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=o,this.layerElement.appendChild(o)),o.style.display="inherit"),h.reset(),h.scale(n.finalSize/100,n.finalSize/100),u&&(s[t].n&&(p=-f,m+=n.yOffset,m+=g?1:0,g=!1),this.applyTextPropertiesToMatrix(n,h,s[t].line,p,m),p+=s[t].l||0,p+=f),l?(c=(y=(v=this.globalData.fontManager.getCharData(n.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily))&&v.data||{}).shapes?y.shapes[0].it:[],u?d+=this.createPathShape(h,c):o.setAttribute("d",this.createPathShape(h,c))):(u&&o.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),o.textContent=s[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));u&&o&&o.setAttribute("d",d)}else{var b=this.textContainer,x="start";switch(n.j){case 1:x="end";break;case 2:x="middle";break;default:x="start"}b.setAttribute("text-anchor",x),b.setAttribute("letter-spacing",f);var S=this.buildTextContents(n.finalText);for(e=S.length,m=n.ps?n.ps[1]+n.ascent:0,t=0;t<e;t+=1)(o=this.textSpans[t]||B("tspan")).textContent=S[t],o.setAttribute("x",0),o.setAttribute("y",m),o.style.display="inherit",b.appendChild(o),this.textSpans[t]=o,m+=n.finalLineHeight;this.layerElement.appendChild(b)}for(;t<this.textSpans.length;)this.textSpans[t].style.display="none",t+=1;this._sizeChanged=!0},ee.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},ee.prototype.renderInnerContent=function(){if(!this.data.singleShape&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var n,i,r=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(n=r[t],i=this.textSpans[t],n._mdf.m&&i.setAttribute("transform",n.m),n._mdf.o&&i.setAttribute("opacity",n.o),n._mdf.sw&&i.setAttribute("stroke-width",n.sw),n._mdf.sc&&i.setAttribute("stroke",n.sc),n._mdf.fc&&i.setAttribute("fill",n.fc))}},Z([Ht,Tt,Xt,Ut,Dt,Pt,Bt],ne),ne.prototype.initSecondaryElement=function(){},ne.prototype.identityMatrix=new W,ne.prototype.buildExpressionInterface=function(){},ne.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},ne.prototype.filterUniqueShapes=function(){var t,e,n,i,r=this.shapes.length,a=this.stylesList.length,o=[],s=!1;for(n=0;n<a;n+=1){for(i=this.stylesList[n],s=!1,o.length=0,t=0;t<r;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(o.push(e),s=e._isAnimated||s);o.length>1&&s&&this.setShapesAsAnimated(o)}},ne.prototype.setShapesAsAnimated=function(t){var e,n=t.length;for(e=0;e<n;e+=1)t[e].setAsAnimated()},ne.prototype.createStyleElement=function(t,e){var i,r=new Rt(t,e),a=r.pElem;return"st"===t.ty?i=new zt(this,t,r):"fl"===t.ty?i=new Gt(this,t,r):"gf"!==t.ty&&"gs"!==t.ty||(i=new("gf"===t.ty?Wt:Ot)(this,t,r),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),a.setAttribute("mask","url("+n+"#"+i.maskId+")"))),"st"!==t.ty&&"gs"!==t.ty||(a.setAttribute("stroke-linecap",z[t.lc||2]),a.setAttribute("stroke-linejoin",G[t.lj||2]),a.setAttribute("fill-opacity","0"),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&a.setAttribute("fill-rule","evenodd"),t.ln&&a.setAttribute("id",t.ln),t.cl&&a.setAttribute("class",t.cl),t.bm&&(a.style["mix-blend-mode"]=V(t.bm)),this.stylesList.push(r),this.addToAnimatedContents(t,i),i},ne.prototype.createGroupElement=function(t){var e=new Zt;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=V(t.bm)),e},ne.prototype.createTransformElement=function(t,e){var n=K.getTransformProperty(this,t,this),i=new Vt(n,n.o,e);return this.addToAnimatedContents(t,i),i},ne.prototype.createShapeElement=function(t,e,n){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var r=new Nt(e,n,q.getShapeProp(this,t,i,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},ne.prototype.addToAnimatedContents=function(t,e){for(var n=0,i=this.animatedContents.length;n<i;){if(this.animatedContents[n].element===e)return;n+=1}this.animatedContents.push({fn:Yt.createRenderFunction(t),element:e,data:t})},ne.prototype.setElementStyles=function(t){var e,n=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||n.push(this.stylesList[e])},ne.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},ne.prototype.searchShapes=function(t,e,n,i,r,a,o){var s,l,c,h,d,u,p=[].concat(a),m=t.length-1,g=[],f=[];for(s=m;s>=0;s-=1){if((u=this.searchProcessedElement(t[s]))?e[s]=n[u-1]:t[s]._render=o,"fl"===t[s].ty||"st"===t[s].ty||"gf"===t[s].ty||"gs"===t[s].ty)u?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],r),t[s]._render&&e[s].style.pElem.parentNode!==i&&i.appendChild(e[s].style.pElem),g.push(e[s].style);else if("gr"===t[s].ty){if(u)for(c=e[s].it.length,l=0;l<c;l+=1)e[s].prevViewData[l]=e[s].it[l];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,e[s].gr,r+1,p,o),t[s]._render&&e[s].gr.parentNode!==i&&i.appendChild(e[s].gr)}else"tr"===t[s].ty?(u||(e[s]=this.createTransformElement(t[s],i)),h=e[s].transform,p.push(h)):"sh"===t[s].ty||"rc"===t[s].ty||"el"===t[s].ty||"sr"===t[s].ty?(u||(e[s]=this.createShapeElement(t[s],p,r)),this.setElementStyles(e[s])):"tm"===t[s].ty||"rd"===t[s].ty||"ms"===t[s].ty||"pb"===t[s].ty?(u?(d=e[s]).closed=!1:((d=$.getModifier(t[s].ty)).init(this,t[s]),e[s]=d,this.shapeModifiers.push(d)),f.push(d)):"rp"===t[s].ty&&(u?(d=e[s]).closed=!0:(d=$.getModifier(t[s].ty),e[s]=d,d.init(this,t,s,e),this.shapeModifiers.push(d),o=!1),f.push(d));this.addProcessedElement(t[s],s+1)}for(m=g.length,s=0;s<m;s+=1)g[s].closed=!0;for(m=f.length,s=0;s<m;s+=1)f[s].closed=!0},ne.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},ne.prototype.renderShape=function(){var t,e,n=this.animatedContents.length;for(t=0;t<n;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},ne.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},ie.prototype.initialize=function(){var t,e,i,r,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(r=this.elem.maskManager.masksProperties.length,i=0):r=1+(i=this.filterManager.effectElements[0].p.v-1),(e=B("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<r;i+=1)t=B("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var o=B("mask"),s=k();o.setAttribute("id",s),o.setAttribute("mask-type","alpha"),o.appendChild(e),this.elem.globalData.defs.appendChild(o);var l=B("g");for(l.setAttribute("mask","url("+n+"#"+s+")");a[0];)l.appendChild(a[0]);this.elem.layerElement.appendChild(l),this.masker=o,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},ie.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var n,i,r=this.paths.length;for(e=0;e<r;e+=1)if(-1!==this.paths[e].m&&(n=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var o=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),s=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=i.getTotalLength();a="0 0 0 "+l*o+" ";var c,d=l*(s-o),u=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,p=Math.floor(d/u);for(c=0;c<p;c+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*l+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var m=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+h(255*m[0])+","+h(255*m[1])+","+h(255*m[2])+")")}},re.prototype.createFeFunc=function(t,e){var n=B(t);return n.setAttribute("type","table"),e.appendChild(n),n},re.prototype.getTableValue=function(t,e,n,i,r){for(var a,o,s=0,l=Math.min(t,e),c=Math.max(t,e),h=Array.call(null,{length:256}),d=0,u=r-i,p=e-t;s<=256;)o=(a=s/256)<=l?p<0?r:i:a>=c?p<0?i:r:i+u*Math.pow((a-t)/p,1/n),h[d]=o,d+=1,s+=256/255;return h.join(" ")},re.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,n=this.filterManager.effectElements;this.feFuncRComposed&&(t||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(e=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(e=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(e=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(e=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(e=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};var ae=[];function oe(t,e,n){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=n,n.matteElement=B("g"),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}function se(){}oe.prototype.findSymbol=function(t){for(var e=0,n=ae.length;e<n;){if(ae[e]===t)return ae[e];e+=1}return null},oe.prototype.replaceInParent=function(t,e){var n=t.layerElement.parentNode;if(n){for(var i,r=n.children,a=0,o=r.length;a<o&&r[a]!==t.layerElement;)a+=1;a<=o-2&&(i=r[a+1]);var s=B("use");s.setAttribute("href","#"+e),i?n.insertBefore(s,i):n.appendChild(s)}},oe.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var n=k(),i=B("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),ae.push(e);var r=t.globalData.defs;r.appendChild(i);var a=B("symbol");a.setAttribute("id",n),this.replaceInParent(e,n),a.appendChild(e.layerElement),r.appendChild(a);var o=B("use");o.setAttribute("href","#"+n),i.appendChild(o),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},oe.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,n=0,i=e.length;n<i;)e[n]&&e[n].data.ind===t&&this.setElementAsMask(this.elem,e[n]),n+=1;this.initialized=!0},oe.prototype.renderFrame=function(){this.initialized||this.initialize()};var le=function(){var e={},n=[],i=0,r=0,a=0,o=!0,s=!1;function l(t){for(var e=0,i=t.target;e<r;)n[e].animation===i&&(n.splice(e,1),e-=1,r-=1,i.isPaused||d()),e+=1}function c(t,e){if(!t)return null;for(var i=0;i<r;){if(n[i].elem===t&&null!==n[i].elem)return n[i].animation;i+=1}var a=new ce;return u(a,t),a.setData(t,e),a}function h(){a+=1,g()}function d(){a-=1}function u(t,e){t.addEventListener("destroy",l),t.addEventListener("_active",h),t.addEventListener("_idle",d),n.push({elem:e,animation:t}),r+=1}function p(e){var l,c=e-i;for(l=0;l<r;l+=1)n[l].animation.advanceTime(c);i=e,a&&!s?t.requestAnimationFrame(p):o=!0}function m(e){i=e,t.requestAnimationFrame(p)}function g(){!s&&a&&o&&(t.requestAnimationFrame(m),o=!1)}return e.registerAnimation=c,e.loadAnimation=function(t){var e=new ce;return u(e,null),e.setParams(t),e},e.setSpeed=function(t,e){var i;for(i=0;i<r;i+=1)n[i].animation.setSpeed(t,e)},e.setDirection=function(t,e){var i;for(i=0;i<r;i+=1)n[i].animation.setDirection(t,e)},e.play=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.play(t)},e.pause=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.pause(t)},e.stop=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.stop(t)},e.togglePause=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.togglePause(t)},e.searchAnimations=function(t,e,n){var i,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=r.length;for(i=0;i<a;i+=1)n&&r[i].setAttribute("data-bm-type",n),c(r[i],t);if(e&&0===a){n||(n="svg");var o=document.getElementsByTagName("body")[0];o.innerText="";var s=F("div");s.style.width="100%",s.style.height="100%",s.setAttribute("data-bm-type",n),o.appendChild(s),c(s,t)}},e.resize=function(){var t;for(t=0;t<r;t+=1)n[t].animation.resize()},e.goToAndStop=function(t,e,i){var a;for(a=0;a<r;a+=1)n[a].animation.goToAndStop(t,e,i)},e.destroy=function(t){var e;for(e=r-1;e>=0;e-=1)n[e].animation.destroy(t)},e.freeze=function(){s=!0},e.unfreeze=function(){s=!1,g()},e.setVolume=function(t,e){var i;for(i=0;i<r;i+=1)n[i].animation.setVolume(t,e)},e.mute=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.mute(t)},e.unmute=function(t){var e;for(e=0;e<r;e+=1)n[e].animation.unmute(t)},e.getRegisteredAnimations=function(){var t,e=n.length,i=[];for(t=0;t<e;t+=1)i.push(n[t].animation);return i},e}(),ce=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=k(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=a,this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface={},this.imagePreloader=new ht,this.audioController=ct(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this)};function he(){this.effectElements=[]}Z([P],ce),ce.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new _t(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),H.loadAnimation(t.path,this.configAnimation,this.onSetupError))},ce.prototype.onSetupError=function(){this.trigger("data_failed")},ce.prototype.setupAnimation=function(t){H.completeAnimation(t,this.configAnimation)},ce.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var n={wrapper:t,animationData:e},i=t.attributes;n.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",n.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:"canvas";var r=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===r?n.loop=!1:"true"===r?n.loop=!0:""!==r&&(n.loop=parseInt(r,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;n.autoplay="false"!==a,n.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(n.prerender=!1),this.setParams(n)},ce.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,n,i=this.animationData.layers,r=i.length,a=t.layers,o=a.length;for(n=0;n<o;n+=1)for(e=0;e<r;){if(i[e].id===a[n].id){i[e]=a[n];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;e<r;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,H.completeAnimation(this.animationData,this.onSegmentComplete)},ce.prototype.onSegmentComplete=function(t){this.animationData=t,e&&e.initExpressions(this),this.loadNextSegment()},ce.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var n=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,H.loadData(n,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},ce.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},ce.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},ce.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},ce.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=It(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},ce.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},ce.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},ce.prototype.resize=function(){this.renderer.updateContainerSize()},ce.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},ce.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},ce.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},ce.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},ce.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},ce.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},ce.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},ce.prototype.getMarkerData=function(t){for(var e,n=0;n<this.markers.length;n+=1)if((e=this.markers[n]).payload&&e.payload.name===t)return e;return null},ce.prototype.goToAndStop=function(t,e,n){if(!n||this.name===n){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},ce.prototype.goToAndPlay=function(t,e,n){if(!n||this.name===n){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(i,e,n);this.play()}},ce.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,n=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(n=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(n=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),n&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},ce.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},ce.prototype.setSegment=function(t,e){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?n=t:this.currentRawFrame+this.firstFrame>e&&(n=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==n&&this.goToAndStop(n,!0)},ce.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var n,i=t.length;for(n=0;n<i;n+=1)this.segments.push(t[n])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},ce.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},ce.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},ce.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},ce.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},ce.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},ce.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},ce.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},ce.prototype.getVolume=function(){return this.audioController.getVolume()},ce.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},ce.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},ce.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},ce.prototype.getPath=function(){return this.path},ce.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var n=t.p;-1!==n.indexOf("images/")&&(n=n.split("/")[1]),e=this.assetsPath+n}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},ce.prototype.getAssetData=function(t){for(var e=0,n=this.assets.length;e<n;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},ce.prototype.hide=function(){this.renderer.hide()},ce.prototype.show=function(){this.renderer.show()},ce.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},ce.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":case"drawnFrame":this.triggerEvent(t,new y(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"loopComplete":this.triggerEvent(t,new w(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new v(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new b(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new x(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new y(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new w(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new v(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new b(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new x(t,this))},ce.prototype.triggerRenderFrameError=function(t){var e=new S(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},ce.prototype.triggerConfigError=function(t){var e=new A(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var de={};function ue(){!0===me?le.searchAnimations(ge,me,fe):le.searchAnimations()}de.play=le.play,de.pause=le.pause,de.setLocationHref=function(t){n=t},de.togglePause=le.togglePause,de.setSpeed=le.setSpeed,de.setDirection=le.setDirection,de.stop=le.stop,de.searchAnimations=ue,de.registerAnimation=le.registerAnimation,de.loadAnimation=function(t){return!0===me&&(t.animationData=JSON.parse(ge)),le.loadAnimation(t)},de.setSubframeRendering=function(t){a=t},de.resize=le.resize,de.goToAndStop=le.goToAndStop,de.destroy=le.destroy,de.setQuality=function(t){if("string"==typeof t)switch(t){case"high":p=200;break;default:case"medium":p=50;break;case"low":p=10}else!isNaN(t)&&t>1&&(p=t);f(!(p>=50))},de.inBrowser=function(){return"undefined"!=typeof navigator},de.installPlugin=function(t,n){"expressions"===t&&(e=n)},de.freeze=le.freeze,de.unfreeze=le.unfreeze,de.setVolume=le.setVolume,de.mute=le.mute,de.unmute=le.unmute,de.getRegisteredAnimations=le.getRegisteredAnimations,de.useWebWorker=function(t){r=t},de.setIDPrefix=function(t){o=t},de.__getFactory=function(t){switch(t){case"propertyFactory":return U;case"shapePropertyFactory":return q;case"matrix":return W;default:return null}},de.version="5.8.1";var pe,me="__[STANDALONE]__",ge="__[ANIMATIONDATA]__",fe="";if(me){var ye=document.getElementsByTagName("script"),ve=ye[ye.length-1]||{src:""};pe=ve.src.replace(/^[^\?]+\??/,""),fe=function(t){for(var e=pe.split("&"),n=0;n<e.length;n+=1){var i=e[n].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}("renderer")}var we=setInterval((function(){"complete"===document.readyState&&(clearInterval(we),ue())}),100);return de}(r)}.call(e,n,e,t))||(t.exports=i))},528:t=>{"use strict";t.exports=(t,e)=>{if("string"!=typeof t||"string"!=typeof e)throw new TypeError("Expected the arguments to be of type `string`");if(""===e)return[t];const n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},1013:(t,e,n)=>{var i=n(7372).stringify,r=n(8146);t.exports=function(t){return{parse:r(t),stringify:i}},t.exports.parse=r(),t.exports.stringify=i},1089:(t,e)=>{"use strict";function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function i(){return"undefined"!=typeof process&&void 0!==process.versions&&void 0!==process.versions.node}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowser=e.isNode=e.isReactNative=void 0,e.isReactNative=n,e.isNode=i,e.isBrowser=function(){return!n()&&!i()}},1113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},1176:(t,e,n)=>{var i;!function(){"use strict";var r="input is invalid type",a="object"==typeof window,o=a?window:{};o.JS_SHA3_NO_WINDOW&&(a=!1);var s=!a&&"object"==typeof self;!o.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?o=n.g:s&&(o=self);var l=!o.JS_SHA3_NO_COMMON_JS&&t.exports,c=n.amdO,h=!o.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),u=[4,1024,262144,67108864],p=[0,8,16,24],m=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],g=[224,256,384,512],f=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136};!o.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!h||!o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});for(var w=function(t,e,n){return function(i){return new B(t,e,t).update(i)[n]()}},b=function(t,e,n){return function(i,r){return new B(t,e,r).update(i)[n]()}},x=function(t,e,n){return function(e,i,r,a){return I["cshake"+t].update(e,i,r,a)[n]()}},S=function(t,e,n){return function(e,i,r,a){return I["kmac"+t].update(e,i,r,a)[n]()}},A=function(t,e,n,i){for(var r=0;r<y.length;++r){var a=y[r];t[a]=e(n,i,a)}return t},C=function(t,e){var n=w(t,e,"hex");return n.create=function(){return new B(t,e,t)},n.update=function(t){return n.create().update(t)},A(n,w,t,e)},k=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:C},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:C},{name:"shake",padding:[31,7936,2031616,520093696],bits:f,createMethod:function(t,e){var n=b(t,e,"hex");return n.create=function(n){return new B(t,e,n)},n.update=function(t,e){return n.create(e).update(t)},A(n,b,t,e)}},{name:"cshake",padding:u,bits:f,createMethod:function(t,e){var n=v[t],i=x(t,0,"hex");return i.create=function(i,r,a){return r||a?new B(t,e,i).bytepad([r,a],n):I["shake"+t].create(i)},i.update=function(t,e,n,r){return i.create(e,n,r).update(t)},A(i,x,t,e)}},{name:"kmac",padding:u,bits:f,createMethod:function(t,e){var n=v[t],i=S(t,0,"hex");return i.create=function(i,r,a){return new F(t,e,r).bytepad(["KMAC",a],n).bytepad([i],n)},i.update=function(t,e,n,r){return i.create(t,n,r).update(e)},A(i,S,t,e)}}],I={},E=[],_=0;_<k.length;++_)for(var M=k[_],D=M.bits,P=0;P<D.length;++P){var T=M.name+"_"+D[P];if(E.push(T),I[T]=M.createMethod(D[P],M.padding),"sha3"!==M.name){var L=M.name+D[P];E.push(L),I[L]=I[T]}}function B(t,e,n){this.blocks=[],this.s=[],this.padding=e,this.outputBits=n,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(t<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var i=0;i<50;++i)this.s[i]=0}function F(t,e,n){B.call(this,t,e,n)}B.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(r);if(null===t)throw new Error(r);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw new Error(r);e=!0}for(var i,a,o=this.blocks,s=this.byteCount,l=t.length,c=this.blockCount,d=0,u=this.s;d<l;){if(this.reset)for(this.reset=!1,o[0]=this.block,i=1;i<c+1;++i)o[i]=0;if(e)for(i=this.start;d<l&&i<s;++d)o[i>>2]|=t[d]<<p[3&i++];else for(i=this.start;d<l&&i<s;++d)(a=t.charCodeAt(d))<128?o[i>>2]|=a<<p[3&i++]:a<2048?(o[i>>2]|=(192|a>>6)<<p[3&i++],o[i>>2]|=(128|63&a)<<p[3&i++]):a<55296||a>=57344?(o[i>>2]|=(224|a>>12)<<p[3&i++],o[i>>2]|=(128|a>>6&63)<<p[3&i++],o[i>>2]|=(128|63&a)<<p[3&i++]):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++d)),o[i>>2]|=(240|a>>18)<<p[3&i++],o[i>>2]|=(128|a>>12&63)<<p[3&i++],o[i>>2]|=(128|a>>6&63)<<p[3&i++],o[i>>2]|=(128|63&a)<<p[3&i++]);if(this.lastByteIndex=i,i>=s){for(this.start=i-s,this.block=o[c],i=0;i<c;++i)u[i]^=o[i];R(u),this.reset=!0}else this.start=i}return this},B.prototype.encode=function(t,e){var n=255&t,i=1,r=[n];for(n=255&(t>>=8);n>0;)r.unshift(n),n=255&(t>>=8),++i;return e?r.push(i):r.unshift(i),this.update(r),r.length},B.prototype.encodeString=function(t){var e,n=typeof t;if("string"!==n){if("object"!==n)throw new Error(r);if(null===t)throw new Error(r);if(h&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||h&&ArrayBuffer.isView(t)))throw new Error(r);e=!0}var i=0,a=t.length;if(e)i=a;else for(var o=0;o<t.length;++o){var s=t.charCodeAt(o);s<128?i+=1:s<2048?i+=2:s<55296||s>=57344?i+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++o)),i+=4)}return i+=this.encode(8*i),this.update(t),i},B.prototype.bytepad=function(t,e){for(var n=this.encode(e),i=0;i<t.length;++i)n+=this.encodeString(t[i]);var r=e-n%e,a=[];return a.length=r,this.update(a),this},B.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex,n=this.blockCount,i=this.s;if(t[e>>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[n],e=1;e<n+1;++e)t[e]=0;for(t[n-1]|=2147483648,e=0;e<n;++e)i[e]^=t[e];R(i)}},B.prototype.toString=B.prototype.hex=function(){this.finalize();for(var t,e=this.blockCount,n=this.s,i=this.outputBlocks,r=this.extraBytes,a=0,o=0,s="";o<i;){for(a=0;a<e&&o<i;++a,++o)t=n[a],s+=d[t>>4&15]+d[15&t]+d[t>>12&15]+d[t>>8&15]+d[t>>20&15]+d[t>>16&15]+d[t>>28&15]+d[t>>24&15];o%e==0&&(R(n),a=0)}return r&&(t=n[a],s+=d[t>>4&15]+d[15&t],r>1&&(s+=d[t>>12&15]+d[t>>8&15]),r>2&&(s+=d[t>>20&15]+d[t>>16&15])),s},B.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,n=this.s,i=this.outputBlocks,r=this.extraBytes,a=0,o=0,s=this.outputBits>>3;t=r?new ArrayBuffer(i+1<<2):new ArrayBuffer(s);for(var l=new Uint32Array(t);o<i;){for(a=0;a<e&&o<i;++a,++o)l[o]=n[a];o%e==0&&R(n)}return r&&(l[a]=n[a],t=t.slice(0,s)),t},B.prototype.buffer=B.prototype.arrayBuffer,B.prototype.digest=B.prototype.array=function(){this.finalize();for(var t,e,n=this.blockCount,i=this.s,r=this.outputBlocks,a=this.extraBytes,o=0,s=0,l=[];s<r;){for(o=0;o<n&&s<r;++o,++s)t=s<<2,e=i[o],l[t]=255&e,l[t+1]=e>>8&255,l[t+2]=e>>16&255,l[t+3]=e>>24&255;s%n==0&&R(i)}return a&&(t=s<<2,e=i[o],l[t]=255&e,a>1&&(l[t+1]=e>>8&255),a>2&&(l[t+2]=e>>16&255)),l},F.prototype=new B,F.prototype.finalize=function(){return this.encode(this.outputBits,!0),B.prototype.finalize.call(this)};var R=function(t){var e,n,i,r,a,o,s,l,c,h,d,u,p,g,f,y,v,w,b,x,S,A,C,k,I,E,_,M,D,P,T,L,B,F,R,N,V,z,G,W,O,Z,Y,H,j,X,U,K,J,q,$,Q,tt,et,nt,it,rt,at,ot,st,lt,ct,ht;for(i=0;i<48;i+=2)r=t[0]^t[10]^t[20]^t[30]^t[40],a=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],s=t[3]^t[13]^t[23]^t[33]^t[43],l=t[4]^t[14]^t[24]^t[34]^t[44],c=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],d=t[7]^t[17]^t[27]^t[37]^t[47],e=(u=t[8]^t[18]^t[28]^t[38]^t[48])^(o<<1|s>>>31),n=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(s<<1|o>>>31),t[0]^=e,t[1]^=n,t[10]^=e,t[11]^=n,t[20]^=e,t[21]^=n,t[30]^=e,t[31]^=n,t[40]^=e,t[41]^=n,e=r^(l<<1|c>>>31),n=a^(c<<1|l>>>31),t[2]^=e,t[3]^=n,t[12]^=e,t[13]^=n,t[22]^=e,t[23]^=n,t[32]^=e,t[33]^=n,t[42]^=e,t[43]^=n,e=o^(h<<1|d>>>31),n=s^(d<<1|h>>>31),t[4]^=e,t[5]^=n,t[14]^=e,t[15]^=n,t[24]^=e,t[25]^=n,t[34]^=e,t[35]^=n,t[44]^=e,t[45]^=n,e=l^(u<<1|p>>>31),n=c^(p<<1|u>>>31),t[6]^=e,t[7]^=n,t[16]^=e,t[17]^=n,t[26]^=e,t[27]^=n,t[36]^=e,t[37]^=n,t[46]^=e,t[47]^=n,e=h^(r<<1|a>>>31),n=d^(a<<1|r>>>31),t[8]^=e,t[9]^=n,t[18]^=e,t[19]^=n,t[28]^=e,t[29]^=n,t[38]^=e,t[39]^=n,t[48]^=e,t[49]^=n,g=t[0],f=t[1],X=t[11]<<4|t[10]>>>28,U=t[10]<<4|t[11]>>>28,M=t[20]<<3|t[21]>>>29,D=t[21]<<3|t[20]>>>29,st=t[31]<<9|t[30]>>>23,lt=t[30]<<9|t[31]>>>23,Z=t[40]<<18|t[41]>>>14,Y=t[41]<<18|t[40]>>>14,F=t[2]<<1|t[3]>>>31,R=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,v=t[12]<<12|t[13]>>>20,K=t[22]<<10|t[23]>>>22,J=t[23]<<10|t[22]>>>22,P=t[33]<<13|t[32]>>>19,T=t[32]<<13|t[33]>>>19,ct=t[42]<<2|t[43]>>>30,ht=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,nt=t[4]<<30|t[5]>>>2,N=t[14]<<6|t[15]>>>26,V=t[15]<<6|t[14]>>>26,w=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,q=t[34]<<15|t[35]>>>17,$=t[35]<<15|t[34]>>>17,L=t[45]<<29|t[44]>>>3,B=t[44]<<29|t[45]>>>3,k=t[6]<<28|t[7]>>>4,I=t[7]<<28|t[6]>>>4,it=t[17]<<23|t[16]>>>9,rt=t[16]<<23|t[17]>>>9,z=t[26]<<25|t[27]>>>7,G=t[27]<<25|t[26]>>>7,x=t[36]<<21|t[37]>>>11,S=t[37]<<21|t[36]>>>11,Q=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,H=t[8]<<27|t[9]>>>5,j=t[9]<<27|t[8]>>>5,E=t[18]<<20|t[19]>>>12,_=t[19]<<20|t[18]>>>12,at=t[29]<<7|t[28]>>>25,ot=t[28]<<7|t[29]>>>25,W=t[38]<<8|t[39]>>>24,O=t[39]<<8|t[38]>>>24,A=t[48]<<14|t[49]>>>18,C=t[49]<<14|t[48]>>>18,t[0]=g^~y&w,t[1]=f^~v&b,t[10]=k^~E&M,t[11]=I^~_&D,t[20]=F^~N&z,t[21]=R^~V&G,t[30]=H^~X&K,t[31]=j^~U&J,t[40]=et^~it&at,t[41]=nt^~rt&ot,t[2]=y^~w&x,t[3]=v^~b&S,t[12]=E^~M&P,t[13]=_^~D&T,t[22]=N^~z&W,t[23]=V^~G&O,t[32]=X^~K&q,t[33]=U^~J&$,t[42]=it^~at&st,t[43]=rt^~ot&lt,t[4]=w^~x&A,t[5]=b^~S&C,t[14]=M^~P&L,t[15]=D^~T&B,t[24]=z^~W&Z,t[25]=G^~O&Y,t[34]=K^~q&Q,t[35]=J^~$&tt,t[44]=at^~st&ct,t[45]=ot^~lt&ht,t[6]=x^~A&g,t[7]=S^~C&f,t[16]=P^~L&k,t[17]=T^~B&I,t[26]=W^~Z&F,t[27]=O^~Y&R,t[36]=q^~Q&H,t[37]=$^~tt&j,t[46]=st^~ct&et,t[47]=lt^~ht&nt,t[8]=A^~g&y,t[9]=C^~f&v,t[18]=L^~k&E,t[19]=B^~I&_,t[28]=Z^~F&N,t[29]=Y^~R&V,t[38]=Q^~H&X,t[39]=tt^~j&U,t[48]=ct^~et&it,t[49]=ht^~nt&rt,t[0]^=m[i],t[1]^=m[i+1]};if(l)t.exports=I;else{for(_=0;_<E.length;++_)o[E[_]]=I[E[_]];c&&(void 0===(i=function(){return I}.call(e,n,e,t))||(t.exports=i))}}()},1281:()=>{},1591:t=>{"use strict";t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},1594:function(t,e,n){var i;!function(){"use strict";var r,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,s=Math.floor,l="[BigNumber Error] ",c=l+"Number primitive has more than 15 significant digits: ",h=1e14,d=14,u=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],m=1e7,g=1e9;function f(t){var e=0|t;return t>0||t===e?e:e-1}function y(t){for(var e,n,i=1,r=t.length,a=t[0]+"";i<r;){for(e=t[i++]+"",n=d-e.length;n--;e="0"+e);a+=e}for(r=a.length;48===a.charCodeAt(--r););return a.slice(0,r+1||1)}function v(t,e){var n,i,r=t.c,a=e.c,o=t.s,s=e.s,l=t.e,c=e.e;if(!o||!s)return null;if(n=r&&!r[0],i=a&&!a[0],n||i)return n?i?0:-s:o;if(o!=s)return o;if(n=o<0,i=l==c,!r||!a)return i?0:!r^n?1:-1;if(!i)return l>c^n?1:-1;for(s=(l=r.length)<(c=a.length)?l:c,o=0;o<s;o++)if(r[o]!=a[o])return r[o]>a[o]^n?1:-1;return l==c?0:l>c^n?1:-1}function w(t,e,n,i){if(t<e||t>n||t!==s(t))throw Error(l+(i||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function b(t){var e=t.c.length-1;return f(t.e/d)==e&&t.c[e]%2!=0}function x(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function S(t,e,n){var i,r;if(e<0){for(r=n+".";++e;r+=n);t=r+t}else if(++e>(i=t.length)){for(r=n,e-=i;--e;r+=n);t+=r}else e<i&&(t=t.slice(0,e)+"."+t.slice(e));return t}r=function t(e){var n,i,r,A,C,k,I,E,_,M,D=Y.prototype={constructor:Y,toString:null,valueOf:null},P=new Y(1),T=20,L=4,B=-7,F=21,R=-1e7,N=1e7,V=!1,z=1,G=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},O="0123456789abcdefghijklmnopqrstuvwxyz",Z=!0;function Y(t,e){var n,o,l,h,p,m,g,f,y=this;if(!(y instanceof Y))return new Y(t,e);if(null==e){if(t&&!0===t._isBigNumber)return y.s=t.s,void(!t.c||t.e>N?y.c=y.e=null:t.e<R?y.c=[y.e=0]:(y.e=t.e,y.c=t.c.slice()));if((m="number"==typeof t)&&0*t==0){if(y.s=1/t<0?(t=-t,-1):1,t===~~t){for(h=0,p=t;p>=10;p/=10,h++);return void(h>N?y.c=y.e=null:(y.e=h,y.c=[t]))}f=String(t)}else{if(!a.test(f=String(t)))return r(y,f,m);y.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(h=f.indexOf("."))>-1&&(f=f.replace(".","")),(p=f.search(/e/i))>0?(h<0&&(h=p),h+=+f.slice(p+1),f=f.substring(0,p)):h<0&&(h=f.length)}else{if(w(e,2,O.length,"Base"),10==e&&Z)return U(y=new Y(t),T+y.e+1,L);if(f=String(t),m="number"==typeof t){if(0*t!=0)return r(y,f,m,e);if(y.s=1/t<0?(f=f.slice(1),-1):1,Y.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(c+t)}else y.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=O.slice(0,e),h=p=0,g=f.length;p<g;p++)if(n.indexOf(o=f.charAt(p))<0){if("."==o){if(p>h){h=g;continue}}else if(!l&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){l=!0,p=-1,h=0;continue}return r(y,String(t),m,e)}m=!1,(h=(f=i(f,e,10,y.s)).indexOf("."))>-1?f=f.replace(".",""):h=f.length}for(p=0;48===f.charCodeAt(p);p++);for(g=f.length;48===f.charCodeAt(--g););if(f=f.slice(p,++g)){if(g-=p,m&&Y.DEBUG&&g>15&&(t>u||t!==s(t)))throw Error(c+y.s*t);if((h=h-p-1)>N)y.c=y.e=null;else if(h<R)y.c=[y.e=0];else{if(y.e=h,y.c=[],p=(h+1)%d,h<0&&(p+=d),p<g){for(p&&y.c.push(+f.slice(0,p)),g-=d;p<g;)y.c.push(+f.slice(p,p+=d));p=d-(f=f.slice(p)).length}else p-=g;for(;p--;f+="0");y.c.push(+f)}}else y.c=[y.e=0]}function H(t,e,n,i){var r,a,o,s,l;if(null==n?n=L:w(n,0,8),!t.c)return t.toString();if(r=t.c[0],o=t.e,null==e)l=y(t.c),l=1==i||2==i&&(o<=B||o>=F)?x(l,o):S(l,o,"0");else if(a=(t=U(new Y(t),e,n)).e,s=(l=y(t.c)).length,1==i||2==i&&(e<=a||a<=B)){for(;s<e;l+="0",s++);l=x(l,a)}else if(e-=o,l=S(l,a,"0"),a+1>s){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=a-s)>0)for(a+1==s&&(l+=".");e--;l+="0");return t.s<0&&r?"-"+l:l}function j(t,e){for(var n,i,r=1,a=new Y(t[0]);r<t.length;r++)(!(i=new Y(t[r])).s||(n=v(a,i))===e||0===n&&a.s===e)&&(a=i);return a}function X(t,e,n){for(var i=1,r=e.length;!e[--r];e.pop());for(r=e[0];r>=10;r/=10,i++);return(n=i+n*d-1)>N?t.c=t.e=null:n<R?t.c=[t.e=0]:(t.e=n,t.c=e),t}function U(t,e,n,i){var r,a,l,c,u,m,g,f=t.c,y=p;if(f){t:{for(r=1,c=f[0];c>=10;c/=10,r++);if((a=e-r)<0)a+=d,l=e,u=f[m=0],g=s(u/y[r-l-1]%10);else if((m=o((a+1)/d))>=f.length){if(!i)break t;for(;f.length<=m;f.push(0));u=g=0,r=1,l=(a%=d)-d+1}else{for(u=c=f[m],r=1;c>=10;c/=10,r++);g=(l=(a%=d)-d+r)<0?0:s(u/y[r-l-1]%10)}if(i=i||e<0||null!=f[m+1]||(l<0?u:u%y[r-l-1]),i=n<4?(g||i)&&(0==n||n==(t.s<0?3:2)):g>5||5==g&&(4==n||i||6==n&&(a>0?l>0?u/y[r-l]:0:f[m-1])%10&1||n==(t.s<0?8:7)),e<1||!f[0])return f.length=0,i?(e-=t.e+1,f[0]=y[(d-e%d)%d],t.e=-e||0):f[0]=t.e=0,t;if(0==a?(f.length=m,c=1,m--):(f.length=m+1,c=y[d-a],f[m]=l>0?s(u/y[r-l]%y[l])*c:0),i)for(;;){if(0==m){for(a=1,l=f[0];l>=10;l/=10,a++);for(l=f[0]+=c,c=1;l>=10;l/=10,c++);a!=c&&(t.e++,f[0]==h&&(f[0]=1));break}if(f[m]+=c,f[m]!=h)break;f[m--]=0,c=1}for(a=f.length;0===f[--a];f.pop());}t.e>N?t.c=t.e=null:t.e<R&&(t.c=[t.e=0])}return t}function K(t){var e,n=t.e;return null===n?t.toString():(e=y(t.c),e=n<=B||n>=F?x(e,n):S(e,n,"0"),t.s<0?"-"+e:e)}return Y.clone=t,Y.ROUND_UP=0,Y.ROUND_DOWN=1,Y.ROUND_CEIL=2,Y.ROUND_FLOOR=3,Y.ROUND_HALF_UP=4,Y.ROUND_HALF_DOWN=5,Y.ROUND_HALF_EVEN=6,Y.ROUND_HALF_CEIL=7,Y.ROUND_HALF_FLOOR=8,Y.EUCLID=9,Y.config=Y.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(l+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(n=t[e],0,g,e),T=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(n=t[e],0,8,e),L=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(w(n[0],-g,0,e),w(n[1],0,g,e),B=n[0],F=n[1]):(w(n,-g,g,e),B=-(F=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)w(n[0],-g,-1,e),w(n[1],1,g,e),R=n[0],N=n[1];else{if(w(n,-g,g,e),!n)throw Error(l+e+" cannot be zero: "+n);R=-(N=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(l+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw V=!n,Error(l+"crypto unavailable");V=n}else V=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(n=t[e],0,9,e),z=n),t.hasOwnProperty(e="POW_PRECISION")&&(w(n=t[e],0,g,e),G=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(l+e+" not an object: "+n);W=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(l+e+" invalid: "+n);Z="0123456789"==n.slice(0,10),O=n}}return{DECIMAL_PLACES:T,ROUNDING_MODE:L,EXPONENTIAL_AT:[B,F],RANGE:[R,N],CRYPTO:V,MODULO_MODE:z,POW_PRECISION:G,FORMAT:W,ALPHABET:O}},Y.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!Y.DEBUG)return!0;var e,n,i=t.c,r=t.e,a=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===a||-1===a)&&r>=-g&&r<=g&&r===s(r)){if(0===i[0]){if(0===r&&1===i.length)return!0;break t}if((e=(r+1)%d)<1&&(e+=d),String(i[0]).length==e){for(e=0;e<i.length;e++)if((n=i[e])<0||n>=h||n!==s(n))break t;if(0!==n)return!0}}}else if(null===i&&null===r&&(null===a||1===a||-1===a))return!0;throw Error(l+"Invalid BigNumber: "+t)},Y.maximum=Y.max=function(){return j(arguments,-1)},Y.minimum=Y.min=function(){return j(arguments,1)},Y.random=(A=9007199254740992,C=Math.random()*A&2097151?function(){return s(Math.random()*A)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,i,r,a,c=0,h=[],u=new Y(P);if(null==t?t=T:w(t,0,g),r=o(t/d),V)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(r*=2));c<r;)(a=131072*e[c]+(e[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[c]=n[0],e[c+1]=n[1]):(h.push(a%1e14),c+=2);c=r/2}else{if(!crypto.randomBytes)throw V=!1,Error(l+"crypto unavailable");for(e=crypto.randomBytes(r*=7);c<r;)(a=281474976710656*(31&e[c])+1099511627776*e[c+1]+4294967296*e[c+2]+16777216*e[c+3]+(e[c+4]<<16)+(e[c+5]<<8)+e[c+6])>=9e15?crypto.randomBytes(7).copy(e,c):(h.push(a%1e14),c+=7);c=r/7}if(!V)for(;c<r;)(a=C())<9e15&&(h[c++]=a%1e14);for(r=h[--c],t%=d,r&&t&&(a=p[d-t],h[c]=s(r/a)*a);0===h[c];h.pop(),c--);if(c<0)h=[i=0];else{for(i=-1;0===h[0];h.splice(0,1),i-=d);for(c=1,a=h[0];a>=10;a/=10,c++);c<d&&(i-=d-c)}return u.e=i,u.c=h,u}),Y.sum=function(){for(var t=1,e=arguments,n=new Y(e[0]);t<e.length;)n=n.plus(e[t++]);return n},i=function(){var t="0123456789";function e(t,e,n,i){for(var r,a,o=[0],s=0,l=t.length;s<l;){for(a=o.length;a--;o[a]*=e);for(o[0]+=i.indexOf(t.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}return function(i,r,a,o,s){var l,c,h,d,u,p,m,g,f=i.indexOf("."),v=T,w=L;for(f>=0&&(d=G,G=0,i=i.replace(".",""),p=(g=new Y(r)).pow(i.length-f),G=d,g.c=e(S(y(p.c),p.e,"0"),10,a,t),g.e=g.c.length),h=d=(m=e(i,r,a,s?(l=O,t):(l=t,O))).length;0==m[--d];m.pop());if(!m[0])return l.charAt(0);if(f<0?--h:(p.c=m,p.e=h,p.s=o,m=(p=n(p,g,v,w,a)).c,u=p.r,h=p.e),f=m[c=h+v+1],d=a/2,u=u||c<0||null!=m[c+1],u=w<4?(null!=f||u)&&(0==w||w==(p.s<0?3:2)):f>d||f==d&&(4==w||u||6==w&&1&m[c-1]||w==(p.s<0?8:7)),c<1||!m[0])i=u?S(l.charAt(1),-v,l.charAt(0)):l.charAt(0);else{if(m.length=c,u)for(--a;++m[--c]>a;)m[c]=0,c||(++h,m=[1].concat(m));for(d=m.length;!m[--d];);for(f=0,i="";f<=d;i+=l.charAt(m[f++]));i=S(i,h,l.charAt(0))}return i}}(),n=function(){function t(t,e,n){var i,r,a,o,s=0,l=t.length,c=e%m,h=e/m|0;for(t=t.slice();l--;)s=((r=c*(a=t[l]%m)+(i=h*a+(o=t[l]/m|0)*c)%m*m+s)/n|0)+(i/m|0)+h*o,t[l]=r%n;return s&&(t=[s].concat(t)),t}function e(t,e,n,i){var r,a;if(n!=i)a=n>i?1:-1;else for(r=a=0;r<n;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function n(t,e,n,i){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*i+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(i,r,a,o,l){var c,u,p,m,g,y,v,w,b,x,S,A,C,k,I,E,_,M=i.s==r.s?1:-1,D=i.c,P=r.c;if(!(D&&D[0]&&P&&P[0]))return new Y(i.s&&r.s&&(D?!P||D[0]!=P[0]:P)?D&&0==D[0]||!P?0*M:M/0:NaN);for(b=(w=new Y(M)).c=[],M=a+(u=i.e-r.e)+1,l||(l=h,u=f(i.e/d)-f(r.e/d),M=M/d|0),p=0;P[p]==(D[p]||0);p++);if(P[p]>(D[p]||0)&&u--,M<0)b.push(1),m=!0;else{for(k=D.length,E=P.length,p=0,M+=2,(g=s(l/(P[0]+1)))>1&&(P=t(P,g,l),D=t(D,g,l),E=P.length,k=D.length),C=E,S=(x=D.slice(0,E)).length;S<E;x[S++]=0);_=P.slice(),_=[0].concat(_),I=P[0],P[1]>=l/2&&I++;do{if(g=0,(c=e(P,x,E,S))<0){if(A=x[0],E!=S&&(A=A*l+(x[1]||0)),(g=s(A/I))>1)for(g>=l&&(g=l-1),v=(y=t(P,g,l)).length,S=x.length;1==e(y,x,v,S);)g--,n(y,E<v?_:P,v,l),v=y.length,c=1;else 0==g&&(c=g=1),v=(y=P.slice()).length;if(v<S&&(y=[0].concat(y)),n(x,y,S,l),S=x.length,-1==c)for(;e(P,x,E,S)<1;)g++,n(x,E<S?_:P,S,l),S=x.length}else 0===c&&(g++,x=[0]);b[p++]=g,x[0]?x[S++]=D[C]||0:(x=[D[C]],S=1)}while((C++<k||null!=x[0])&&M--);m=null!=x[0],b[0]||b.splice(0,1)}if(l==h){for(p=1,M=b[0];M>=10;M/=10,p++);U(w,a+(w.e=p+u*d-1)+1,o,m)}else w.e=u,w.r=+m;return w}}(),k=/^(-?)0([xbo])(?=\w[\w.]*$)/i,I=/^([^.]+)\.$/,E=/^\.([^.]+)$/,_=/^-?(Infinity|NaN)$/,M=/^\s*\+(?=[\w.])|^\s+|\s+$/g,r=function(t,e,n,i){var r,a=n?e:e.replace(M,"");if(_.test(a))t.s=isNaN(a)?null:a<0?-1:1;else{if(!n&&(a=a.replace(k,(function(t,e,n){return r="x"==(n=n.toLowerCase())?16:"b"==n?2:8,i&&i!=r?t:e})),i&&(r=i,a=a.replace(I,"$1").replace(E,"0.$1")),e!=a))return new Y(a,r);if(Y.DEBUG)throw Error(l+"Not a"+(i?" base "+i:"")+" number: "+e);t.s=null}t.c=t.e=null},D.absoluteValue=D.abs=function(){var t=new Y(this);return t.s<0&&(t.s=1),t},D.comparedTo=function(t,e){return v(this,new Y(t,e))},D.decimalPlaces=D.dp=function(t,e){var n,i,r,a=this;if(null!=t)return w(t,0,g),null==e?e=L:w(e,0,8),U(new Y(a),t+a.e+1,e);if(!(n=a.c))return null;if(i=((r=n.length-1)-f(this.e/d))*d,r=n[r])for(;r%10==0;r/=10,i--);return i<0&&(i=0),i},D.dividedBy=D.div=function(t,e){return n(this,new Y(t,e),T,L)},D.dividedToIntegerBy=D.idiv=function(t,e){return n(this,new Y(t,e),0,1)},D.exponentiatedBy=D.pow=function(t,e){var n,i,r,a,c,h,u,p,m=this;if((t=new Y(t)).c&&!t.isInteger())throw Error(l+"Exponent not an integer: "+K(t));if(null!=e&&(e=new Y(e)),c=t.e>14,!m.c||!m.c[0]||1==m.c[0]&&!m.e&&1==m.c.length||!t.c||!t.c[0])return p=new Y(Math.pow(+K(m),c?t.s*(2-b(t)):+K(t))),e?p.mod(e):p;if(h=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new Y(NaN);(i=!h&&m.isInteger()&&e.isInteger())&&(m=m.mod(e))}else{if(t.e>9&&(m.e>0||m.e<-1||(0==m.e?m.c[0]>1||c&&m.c[1]>=24e7:m.c[0]<8e13||c&&m.c[0]<=9999975e7)))return a=m.s<0&&b(t)?-0:0,m.e>-1&&(a=1/a),new Y(h?1/a:a);G&&(a=o(G/d+2))}for(c?(n=new Y(.5),h&&(t.s=1),u=b(t)):u=(r=Math.abs(+K(t)))%2,p=new Y(P);;){if(u){if(!(p=p.times(m)).c)break;a?p.c.length>a&&(p.c.length=a):i&&(p=p.mod(e))}if(r){if(0===(r=s(r/2)))break;u=r%2}else if(U(t=t.times(n),t.e+1,1),t.e>14)u=b(t);else{if(0==(r=+K(t)))break;u=r%2}m=m.times(m),a?m.c&&m.c.length>a&&(m.c.length=a):i&&(m=m.mod(e))}return i?p:(h&&(p=P.div(p)),e?p.mod(e):a?U(p,G,L,void 0):p)},D.integerValue=function(t){var e=new Y(this);return null==t?t=L:w(t,0,8),U(e,e.e+1,t)},D.isEqualTo=D.eq=function(t,e){return 0===v(this,new Y(t,e))},D.isFinite=function(){return!!this.c},D.isGreaterThan=D.gt=function(t,e){return v(this,new Y(t,e))>0},D.isGreaterThanOrEqualTo=D.gte=function(t,e){return 1===(e=v(this,new Y(t,e)))||0===e},D.isInteger=function(){return!!this.c&&f(this.e/d)>this.c.length-2},D.isLessThan=D.lt=function(t,e){return v(this,new Y(t,e))<0},D.isLessThanOrEqualTo=D.lte=function(t,e){return-1===(e=v(this,new Y(t,e)))||0===e},D.isNaN=function(){return!this.s},D.isNegative=function(){return this.s<0},D.isPositive=function(){return this.s>0},D.isZero=function(){return!!this.c&&0==this.c[0]},D.minus=function(t,e){var n,i,r,a,o=this,s=o.s;if(e=(t=new Y(t,e)).s,!s||!e)return new Y(NaN);if(s!=e)return t.s=-e,o.plus(t);var l=o.e/d,c=t.e/d,u=o.c,p=t.c;if(!l||!c){if(!u||!p)return u?(t.s=-e,t):new Y(p?o:NaN);if(!u[0]||!p[0])return p[0]?(t.s=-e,t):new Y(u[0]?o:3==L?-0:0)}if(l=f(l),c=f(c),u=u.slice(),s=l-c){for((a=s<0)?(s=-s,r=u):(c=l,r=p),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(i=(a=(s=u.length)<(e=p.length))?s:e,s=e=0;e<i;e++)if(u[e]!=p[e]){a=u[e]<p[e];break}if(a&&(r=u,u=p,p=r,t.s=-t.s),(e=(i=p.length)-(n=u.length))>0)for(;e--;u[n++]=0);for(e=h-1;i>s;){if(u[--i]<p[i]){for(n=i;n&&!u[--n];u[n]=e);--u[n],u[i]+=h}u[i]-=p[i]}for(;0==u[0];u.splice(0,1),--c);return u[0]?X(t,u,c):(t.s=3==L?-1:1,t.c=[t.e=0],t)},D.modulo=D.mod=function(t,e){var i,r,a=this;return t=new Y(t,e),!a.c||!t.s||t.c&&!t.c[0]?new Y(NaN):!t.c||a.c&&!a.c[0]?new Y(a):(9==z?(r=t.s,t.s=1,i=n(a,t,0,3),t.s=r,i.s*=r):i=n(a,t,0,z),(t=a.minus(i.times(t))).c[0]||1!=z||(t.s=a.s),t)},D.multipliedBy=D.times=function(t,e){var n,i,r,a,o,s,l,c,u,p,g,y,v,w,b,x=this,S=x.c,A=(t=new Y(t,e)).c;if(!(S&&A&&S[0]&&A[0]))return!x.s||!t.s||S&&!S[0]&&!A||A&&!A[0]&&!S?t.c=t.e=t.s=null:(t.s*=x.s,S&&A?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=f(x.e/d)+f(t.e/d),t.s*=x.s,(l=S.length)<(p=A.length)&&(v=S,S=A,A=v,r=l,l=p,p=r),r=l+p,v=[];r--;v.push(0));for(w=h,b=m,r=p;--r>=0;){for(n=0,g=A[r]%b,y=A[r]/b|0,a=r+(o=l);a>r;)n=((c=g*(c=S[--o]%b)+(s=y*c+(u=S[o]/b|0)*g)%b*b+v[a]+n)/w|0)+(s/b|0)+y*u,v[a--]=c%w;v[a]=n}return n?++i:v.splice(0,1),X(t,v,i)},D.negated=function(){var t=new Y(this);return t.s=-t.s||null,t},D.plus=function(t,e){var n,i=this,r=i.s;if(e=(t=new Y(t,e)).s,!r||!e)return new Y(NaN);if(r!=e)return t.s=-e,i.minus(t);var a=i.e/d,o=t.e/d,s=i.c,l=t.c;if(!a||!o){if(!s||!l)return new Y(r/0);if(!s[0]||!l[0])return l[0]?t:new Y(s[0]?i:0*r)}if(a=f(a),o=f(o),s=s.slice(),r=a-o){for(r>0?(o=a,n=l):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for((r=s.length)-(e=l.length)<0&&(n=l,l=s,s=n,e=r),r=0;e;)r=(s[--e]=s[e]+l[e]+r)/h|0,s[e]=h===s[e]?0:s[e]%h;return r&&(s=[r].concat(s),++o),X(t,s,o)},D.precision=D.sd=function(t,e){var n,i,r,a=this;if(null!=t&&t!==!!t)return w(t,1,g),null==e?e=L:w(e,0,8),U(new Y(a),t,e);if(!(n=a.c))return null;if(i=(r=n.length-1)*d+1,r=n[r]){for(;r%10==0;r/=10,i--);for(r=n[0];r>=10;r/=10,i++);}return t&&a.e+1>i&&(i=a.e+1),i},D.shiftedBy=function(t){return w(t,-9007199254740991,u),this.times("1e"+t)},D.squareRoot=D.sqrt=function(){var t,e,i,r,a,o=this,s=o.c,l=o.s,c=o.e,h=T+4,d=new Y("0.5");if(1!==l||!s||!s[0])return new Y(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(l=Math.sqrt(+K(o)))||l==1/0?(((e=y(s)).length+c)%2==0&&(e+="0"),l=Math.sqrt(+e),c=f((c+1)/2)-(c<0||c%2),i=new Y(e=l==1/0?"5e"+c:(e=l.toExponential()).slice(0,e.indexOf("e")+1)+c)):i=new Y(l+""),i.c[0])for((l=(c=i.e)+h)<3&&(l=0);;)if(a=i,i=d.times(a.plus(n(o,a,h,1))),y(a.c).slice(0,l)===(e=y(i.c)).slice(0,l)){if(i.e<c&&--l,"9999"!=(e=e.slice(l-3,l+1))&&(r||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(U(i,i.e+T+2,1),t=!i.times(i).eq(o));break}if(!r&&(U(a,a.e+T+2,0),a.times(a).eq(o))){i=a;break}h+=4,l+=4,r=1}return U(i,i.e+T+1,L,t)},D.toExponential=function(t,e){return null!=t&&(w(t,0,g),t++),H(this,t,e,1)},D.toFixed=function(t,e){return null!=t&&(w(t,0,g),t=t+this.e+1),H(this,t,e)},D.toFormat=function(t,e,n){var i,r=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=W;else if("object"!=typeof n)throw Error(l+"Argument not an object: "+n);if(i=r.toFixed(t,e),r.c){var a,o=i.split("."),s=+n.groupSize,c=+n.secondaryGroupSize,h=n.groupSeparator||"",d=o[0],u=o[1],p=r.s<0,m=p?d.slice(1):d,g=m.length;if(c&&(a=s,s=c,c=a,g-=a),s>0&&g>0){for(a=g%s||s,d=m.substr(0,a);a<g;a+=s)d+=h+m.substr(a,s);c>0&&(d+=h+m.slice(a)),p&&(d="-"+d)}i=u?d+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?u.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):u):d}return(n.prefix||"")+i+(n.suffix||"")},D.toFraction=function(t){var e,i,r,a,o,s,c,h,u,m,g,f,v=this,w=v.c;if(null!=t&&(!(c=new Y(t)).isInteger()&&(c.c||1!==c.s)||c.lt(P)))throw Error(l+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!w)return new Y(v);for(e=new Y(P),u=i=new Y(P),r=h=new Y(P),f=y(w),o=e.e=f.length-v.e-1,e.c[0]=p[(s=o%d)<0?d+s:s],t=!t||c.comparedTo(e)>0?o>0?e:u:c,s=N,N=1/0,c=new Y(f),h.c[0]=0;m=n(c,e,0,1),1!=(a=i.plus(m.times(r))).comparedTo(t);)i=r,r=a,u=h.plus(m.times(a=u)),h=a,e=c.minus(m.times(a=e)),c=a;return a=n(t.minus(i),r,0,1),h=h.plus(a.times(u)),i=i.plus(a.times(r)),h.s=u.s=v.s,g=n(u,r,o*=2,L).minus(v).abs().comparedTo(n(h,i,o,L).minus(v).abs())<1?[u,r]:[h,i],N=s,g},D.toNumber=function(){return+K(this)},D.toPrecision=function(t,e){return null!=t&&w(t,1,g),H(this,t,e,2)},D.toString=function(t){var e,n=this,r=n.s,a=n.e;return null===a?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=a<=B||a>=F?x(y(n.c),a):S(y(n.c),a,"0"):10===t&&Z?e=S(y((n=U(new Y(n),T+a+1,L)).c),n.e,"0"):(w(t,2,O.length,"Base"),e=i(S(y(n.c),a,"0"),10,t,r,!0)),r<0&&n.c[0]&&(e="-"+e)),e},D.valueOf=D.toJSON=function(){return K(this)},D._isBigNumber=!0,null!=e&&Y.set(e),Y}(),r.default=r.BigNumber=r,void 0===(i=function(){return r}.call(e,n,e,t))||(t.exports=i)}()},1601:t=>{"use strict";t.exports=function(t){return t[1]}},1634:function(t){t.exports=(()=>{var t={192:(t,e)=>{var n,i,r=function(){var t=function(t,e){var n=t,i=o[e],r=null,a=0,l=null,f=[],y={},w=function(t,e){r=function(t){for(var e=new Array(t),n=0;n<t;n+=1){e[n]=new Array(t);for(var i=0;i<t;i+=1)e[n][i]=null}return e}(a=4*n+17),b(0,0),b(a-7,0),b(0,a-7),S(),x(),C(t,e),n>=7&&A(t),null==l&&(l=I(n,i,f)),k(l,e)},b=function(t,e){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||a<=t+n))for(var i=-1;i<=7;i+=1)e+i<=-1||a<=e+i||(r[t+n][e+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},x=function(){for(var t=8;t<a-8;t+=1)null==r[t][6]&&(r[t][6]=t%2==0);for(var e=8;e<a-8;e+=1)null==r[6][e]&&(r[6][e]=e%2==0)},S=function(){for(var t=s.getPatternPosition(n),e=0;e<t.length;e+=1)for(var i=0;i<t.length;i+=1){var a=t[e],o=t[i];if(null==r[a][o])for(var l=-2;l<=2;l+=1)for(var c=-2;c<=2;c+=1)r[a+l][o+c]=-2==l||2==l||-2==c||2==c||0==l&&0==c}},A=function(t){for(var e=s.getBCHTypeNumber(n),i=0;i<18;i+=1){var o=!t&&1==(e>>i&1);r[Math.floor(i/3)][i%3+a-8-3]=o}for(i=0;i<18;i+=1)o=!t&&1==(e>>i&1),r[i%3+a-8-3][Math.floor(i/3)]=o},C=function(t,e){for(var n=i<<3|e,o=s.getBCHTypeInfo(n),l=0;l<15;l+=1){var c=!t&&1==(o>>l&1);l<6?r[l][8]=c:l<8?r[l+1][8]=c:r[a-15+l][8]=c}for(l=0;l<15;l+=1)c=!t&&1==(o>>l&1),l<8?r[8][a-l-1]=c:l<9?r[8][15-l-1+1]=c:r[8][15-l-1]=c;r[a-8][8]=!t},k=function(t,e){for(var n=-1,i=a-1,o=7,l=0,c=s.getMaskFunction(e),h=a-1;h>0;h-=2)for(6==h&&(h-=1);;){for(var d=0;d<2;d+=1)if(null==r[i][h-d]){var u=!1;l<t.length&&(u=1==(t[l]>>>o&1)),c(i,h-d)&&(u=!u),r[i][h-d]=u,-1==(o-=1)&&(l+=1,o=7)}if((i+=n)<0||a<=i){i-=n,n=-n;break}}},I=function(t,e,n){for(var i=h.getRSBlocks(t,e),r=d(),a=0;a<n.length;a+=1){var o=n[a];r.put(o.getMode(),4),r.put(o.getLength(),s.getLengthInBits(o.getMode(),t)),o.write(r)}var l=0;for(a=0;a<i.length;a+=1)l+=i[a].dataCount;if(r.getLengthInBits()>8*l)throw"code length overflow. ("+r.getLengthInBits()+">"+8*l+")";for(r.getLengthInBits()+4<=8*l&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*l||(r.put(236,8),r.getLengthInBits()>=8*l));)r.put(17,8);return function(t,e){for(var n=0,i=0,r=0,a=new Array(e.length),o=new Array(e.length),l=0;l<e.length;l+=1){var h=e[l].dataCount,d=e[l].totalCount-h;i=Math.max(i,h),r=Math.max(r,d),a[l]=new Array(h);for(var u=0;u<a[l].length;u+=1)a[l][u]=255&t.getBuffer()[u+n];n+=h;var p=s.getErrorCorrectPolynomial(d),m=c(a[l],p.getLength()-1).mod(p);for(o[l]=new Array(p.getLength()-1),u=0;u<o[l].length;u+=1){var g=u+m.getLength()-o[l].length;o[l][u]=g>=0?m.getAt(g):0}}var f=0;for(u=0;u<e.length;u+=1)f+=e[u].totalCount;var y=new Array(f),v=0;for(u=0;u<i;u+=1)for(l=0;l<e.length;l+=1)u<a[l].length&&(y[v]=a[l][u],v+=1);for(u=0;u<r;u+=1)for(l=0;l<e.length;l+=1)u<o[l].length&&(y[v]=o[l][u],v+=1);return y}(r,i)};y.addData=function(t,e){var n=null;switch(e=e||"Byte"){case"Numeric":n=u(t);break;case"Alphanumeric":n=p(t);break;case"Byte":n=m(t);break;case"Kanji":n=g(t);break;default:throw"mode:"+e}f.push(n),l=null},y.isDark=function(t,e){if(t<0||a<=t||e<0||a<=e)throw t+","+e;return r[t][e]},y.getModuleCount=function(){return a},y.make=function(){if(n<1){for(var t=1;t<40;t++){for(var e=h.getRSBlocks(t,i),r=d(),a=0;a<f.length;a++){var o=f[a];r.put(o.getMode(),4),r.put(o.getLength(),s.getLengthInBits(o.getMode(),t)),o.write(r)}var l=0;for(a=0;a<e.length;a++)l+=e[a].dataCount;if(r.getLengthInBits()<=8*l)break}n=t}w(!1,function(){for(var t=0,e=0,n=0;n<8;n+=1){w(!0,n);var i=s.getLostPoint(y);(0==n||t>i)&&(t=i,e=n)}return e}())},y.createTableTag=function(t,e){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(e=void 0===e?4*t:e)+"px;",n+='">',n+="<tbody>";for(var i=0;i<y.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<y.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=y.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},y.createSvgTag=function(t,e,n,i){var r={};"object"==typeof arguments[0]&&(t=(r=arguments[0]).cellSize,e=r.margin,n=r.alt,i=r.title),t=t||2,e=void 0===e?4*t:e,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var a,o,s,l,c=y.getModuleCount()*t+2*e,h="";for(l="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",h+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',h+=r.scalable?"":' width="'+c+'px" height="'+c+'px"',h+=' viewBox="0 0 '+c+" "+c+'" ',h+=' preserveAspectRatio="xMinYMin meet"',h+=i.text||n.text?' role="img" aria-labelledby="'+E([i.id,n.id].join(" ").trim())+'"':"",h+=">",h+=i.text?'<title id="'+E(i.id)+'">'+E(i.text)+"</title>":"",h+=n.text?'<description id="'+E(n.id)+'">'+E(n.text)+"</description>":"",h+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',h+='<path d="',o=0;o<y.getModuleCount();o+=1)for(s=o*t+e,a=0;a<y.getModuleCount();a+=1)y.isDark(o,a)&&(h+="M"+(a*t+e)+","+s+l);return(h+='" stroke="transparent" fill="black"/>')+"</svg>"},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var n=y.getModuleCount()*t+2*e,i=e,r=n-e;return v(n,n,(function(e,n){if(i<=e&&e<r&&i<=n&&n<r){var a=Math.floor((e-i)/t),o=Math.floor((n-i)/t);return y.isDark(o,a)?0:1}return 1}))},y.createImgTag=function(t,e,n){t=t||2,e=void 0===e?4*t:e;var i=y.getModuleCount()*t+2*e,r="";return r+="<img",r+=' src="',r+=y.createDataURL(t,e),r+='"',r+=' width="',r+=i,r+='"',r+=' height="',r+=i,r+='"',n&&(r+=' alt="',r+=E(n),r+='"'),r+"/>"};var E=function(t){for(var e="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":e+="&lt;";break;case">":e+="&gt;";break;case"&":e+="&amp;";break;case'"':e+="&quot;";break;default:e+=i}}return e};return y.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,n,i,r,a,o=1*y.getModuleCount()+2*t,s=t,l=o-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},h={"██":"▀","█ ":"▀"," █":" "," ":" "},d="";for(e=0;e<o;e+=2){for(i=Math.floor((e-s)/1),r=Math.floor((e+1-s)/1),n=0;n<o;n+=1)a="█",s<=n&&n<l&&s<=e&&e<l&&y.isDark(i,Math.floor((n-s)/1))&&(a=" "),s<=n&&n<l&&s<=e+1&&e+1<l&&y.isDark(r,Math.floor((n-s)/1))?a+=" ":a+="█",d+=t<1&&e+1>=l?h[a]:c[a];d+="\n"}return o%2&&t>0?d.substring(0,d.length-o-1)+Array(o+1).join("▀"):d.substring(0,d.length-1)}(e);t-=1,e=void 0===e?2*t:e;var n,i,r,a,o=y.getModuleCount()*t+2*e,s=e,l=o-e,c=Array(t+1).join("██"),h=Array(t+1).join(" "),d="",u="";for(n=0;n<o;n+=1){for(r=Math.floor((n-s)/t),u="",i=0;i<o;i+=1)a=1,s<=i&&i<l&&s<=n&&n<l&&y.isDark(r,Math.floor((i-s)/t))&&(a=0),u+=a?c:h;for(r=0;r<t;r+=1)d+=u+"\n"}return d.substring(0,d.length-1)},y.renderTo2dContext=function(t,e){e=e||2;for(var n=y.getModuleCount(),i=0;i<n;i++)for(var r=0;r<n;r++)t.fillStyle=y.isDark(i,r)?"black":"white",t.fillRect(i*e,r*e,e,e)},y};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var e=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);e.push(255&i)}return e}}).default,t.createStringToBytes=function(t,e){var n=function(){for(var n=y(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},r=0,a={};;){var o=n.read();if(-1==o)break;var s=i(),l=i()<<8|i();a[String.fromCharCode(o<<8|s)]=l,r+=1}if(r!=e)throw r+" != "+e;return a}(),i="?".charCodeAt(0);return function(t){for(var e=[],r=0;r<t.length;r+=1){var a=t.charCodeAt(r);if(a<128)e.push(a);else{var o=n[t.charAt(r)];"number"==typeof o?(255&o)==o?e.push(o):(e.push(o>>>8),e.push(255&o)):e.push(i)}}return e}};var e,n,i,r,a,o={L:1,M:0,Q:3,H:2},s=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,a=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;a(e)-a(n)>=0;)e^=n<<a(e)-a(n);return 21522^(t<<10|e)},r.getBCHTypeNumber=function(t){for(var e=t<<12;a(e)-a(i)>=0;)e^=i<<a(e)-a(i);return t<<12|e},r.getPatternPosition=function(t){return e[t-1]},r.getMaskFunction=function(t){switch(t){case 0:return function(t,e){return(t+e)%2==0};case 1:return function(t,e){return t%2==0};case 2:return function(t,e){return e%3==0};case 3:return function(t,e){return(t+e)%3==0};case 4:return function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0};case 5:return function(t,e){return t*e%2+t*e%3==0};case 6:return function(t,e){return(t*e%2+t*e%3)%2==0};case 7:return function(t,e){return(t*e%3+(t+e)%2)%2==0};default:throw"bad maskPattern:"+t}},r.getErrorCorrectPolynomial=function(t){for(var e=c([1],0),n=0;n<t;n+=1)e=e.multiply(c([1,l.gexp(n)],0));return e},r.getLengthInBits=function(t,e){if(1<=e&&e<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(e<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(e<41))throw"type:"+e;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},r.getLostPoint=function(t){for(var e=t.getModuleCount(),n=0,i=0;i<e;i+=1)for(var r=0;r<e;r+=1){for(var a=0,o=t.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||e<=i+s))for(var l=-1;l<=1;l+=1)r+l<0||e<=r+l||0==s&&0==l||o==t.isDark(i+s,r+l)&&(a+=1);a>5&&(n+=3+a-5)}for(i=0;i<e-1;i+=1)for(r=0;r<e-1;r+=1){var c=0;t.isDark(i,r)&&(c+=1),t.isDark(i+1,r)&&(c+=1),t.isDark(i,r+1)&&(c+=1),t.isDark(i+1,r+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<e;i+=1)for(r=0;r<e-6;r+=1)t.isDark(i,r)&&!t.isDark(i,r+1)&&t.isDark(i,r+2)&&t.isDark(i,r+3)&&t.isDark(i,r+4)&&!t.isDark(i,r+5)&&t.isDark(i,r+6)&&(n+=40);for(r=0;r<e;r+=1)for(i=0;i<e-6;i+=1)t.isDark(i,r)&&!t.isDark(i+1,r)&&t.isDark(i+2,r)&&t.isDark(i+3,r)&&t.isDark(i+4,r)&&!t.isDark(i+5,r)&&t.isDark(i+6,r)&&(n+=40);var h=0;for(r=0;r<e;r+=1)for(i=0;i<e;i+=1)t.isDark(i,r)&&(h+=1);return n+Math.abs(100*h/e/e-50)/5*10},r),l=function(){for(var t=new Array(256),e=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)e[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return e[t]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t[e]}}}();function c(t,e){if(void 0===t.length)throw t.length+"/"+e;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+e),r=0;r<t.length-n;r+=1)i[r]=t[r+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var e=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<t.getLength();r+=1)e[n+r]^=l.gexp(l.glog(i.getAt(n))+l.glog(t.getAt(r)));return c(e,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var e=l.glog(i.getAt(0))-l.glog(t.getAt(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.getAt(r);for(r=0;r<t.getLength();r+=1)n[r]^=l.gexp(l.glog(t.getAt(r))+e);return c(n,0).mod(t)}};return i}var h=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e=function(t,e){var n={};return n.totalCount=t,n.dataCount=e,n},n={getRSBlocks:function(n,i){var r=function(e,n){switch(n){case o.L:return t[4*(e-1)+0];case o.M:return t[4*(e-1)+1];case o.Q:return t[4*(e-1)+2];case o.H:return t[4*(e-1)+3];default:return}}(n,i);if(void 0===r)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var a=r.length/3,s=[],l=0;l<a;l+=1)for(var c=r[3*l+0],h=r[3*l+1],d=r[3*l+2],u=0;u<c;u+=1)s.push(e(h,d));return s}};return n}(),d=function(){var t=[],e=0,n={getBuffer:function(){return t},getAt:function(e){var n=Math.floor(e/8);return 1==(t[n]>>>7-e%8&1)},put:function(t,e){for(var i=0;i<e;i+=1)n.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return e},putBit:function(n){var i=Math.floor(e/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>e%8),e+=1}};return n},u=function(t){var e=t,n={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var n=e,r=0;r+2<n.length;)t.put(i(n.substring(r,r+3)),10),r+=3;r<n.length&&(n.length-r==1?t.put(i(n.substring(r,r+1)),4):n.length-r==2&&t.put(i(n.substring(r,r+2)),7))}},i=function(t){for(var e=0,n=0;n<t.length;n+=1)e=10*e+r(t.charAt(n));return e},r=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},p=function(t){var e=t,n={getMode:function(){return 2},getLength:function(t){return e.length},write:function(t){for(var n=e,r=0;r+1<n.length;)t.put(45*i(n.charAt(r))+i(n.charAt(r+1)),11),r+=2;r<n.length&&t.put(i(n.charAt(r)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},m=function(e){var n=t.stringToBytes(e);return{getMode:function(){return 4},getLength:function(t){return n.length},write:function(t){for(var e=0;e<n.length;e+=1)t.put(n[e],8)}}},g=function(e){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(e),r={getMode:function(){return 8},getLength:function(t){return~~(i.length/2)},write:function(t){for(var e=i,n=0;n+1<e.length;){var r=(255&e[n])<<8|255&e[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13),n+=2}if(n<e.length)throw"illegal char at "+(n+1)}};return r},f=function(){var t=[],e={writeByte:function(e){t.push(255&e)},writeShort:function(t){e.writeByte(t),e.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var r=0;r<i;r+=1)e.writeByte(t[r+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)e.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var e="";e+="[";for(var n=0;n<t.length;n+=1)n>0&&(e+=","),e+=t[n];return e+"]"}};return e},y=function(t){var e=t,n=0,i=0,r=0,a={read:function(){for(;r<8;){if(n>=e.length){if(0==r)return-1;throw"unexpected end of file./"+r}var t=e.charAt(n);if(n+=1,"="==t)return r=0,-1;t.match(/^\s$/)||(i=i<<6|o(t.charCodeAt(0)),r+=6)}var a=i>>>r-8&255;return r-=8,a}},o=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return a},v=function(t,e,n){for(var i=function(t,e){var n=t,i=e,r=new Array(t*e),a={setPixel:function(t,e,i){r[e*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var e=o(2);t.writeByte(2);for(var r=0;e.length-r>255;)t.writeByte(255),t.writeBytes(e,r,255),r+=255;t.writeByte(e.length-r),t.writeBytes(e,r,e.length-r),t.writeByte(0),t.writeString(";")}},o=function(t){for(var e=1<<t,n=1+(1<<t),i=t+1,a=s(),o=0;o<e;o+=1)a.add(String.fromCharCode(o));a.add(String.fromCharCode(e)),a.add(String.fromCharCode(n));var l,c,h,d=f(),u=(l=d,c=0,h=0,{write:function(t,e){if(t>>>e!=0)throw"length over";for(;c+e>=8;)l.writeByte(255&(t<<c|h)),e-=8-c,t>>>=8-c,h=0,c=0;h|=t<<c,c+=e},flush:function(){c>0&&l.writeByte(h)}});u.write(e,i);var p=0,m=String.fromCharCode(r[p]);for(p+=1;p<r.length;){var g=String.fromCharCode(r[p]);p+=1,a.contains(m+g)?m+=g:(u.write(a.indexOf(m),i),a.size()<4095&&(a.size()==1<<i&&(i+=1),a.add(m+g)),m=g)}return u.write(a.indexOf(m),i),u.write(n,i),u.flush(),d.toByteArray()},s=function(){var t={},e=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=e,e+=1},size:function(){return e},indexOf:function(e){return t[e]},contains:function(e){return void 0!==t[e]}};return n};return a}(t,e),r=0;r<e;r+=1)for(var a=0;a<t;a+=1)i.setPixel(a,r,n(a,r));var o=f();i.write(o);for(var s=function(){var t=0,e=0,n=0,i="",r={},a=function(t){i+=String.fromCharCode(o(63&t))},o=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return r.writeByte=function(i){for(t=t<<8|255&i,e+=8,n+=1;e>=6;)a(t>>>e-6),e-=6},r.flush=function(){if(e>0&&(a(t<<6-e),t=0,e=0),n%3!=0)for(var r=3-n%3,o=0;o<r;o+=1)i+="="},r.toString=function(){return i},r}(),l=o.toByteArray(),c=0;c<l.length;c+=1)s.writeByte(l[c]);return s.flush(),"data:image/gif;base64,"+s};return t}();r.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var e=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?e.push(i):i<2048?e.push(192|i>>6,128|63&i):i<55296||i>=57344?e.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),e.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return e}(t)},void 0===(i="function"==typeof(n=function(){return r})?n.apply(e,[]):n)||(t.exports=i)},676:(t,e,n)=>{"use strict";n.d(e,{default:()=>F});var i=function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},i.apply(this,arguments)},r=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!e.length)return t;var o=e.shift();return void 0!==o&&r(t)&&r(o)?(t=i({},t),Object.keys(o).forEach((function(e){var n=t[e],i=o[e];Array.isArray(n)&&Array.isArray(i)?t[e]=i:r(n)&&r(i)?t[e]=a(Object.assign({},n),i):t[e]=i})),a.apply(void 0,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}([t],e))):t}function o(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function s(t){return function(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))}(this,void 0,void 0,(function(){return function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(e){return[2,new Promise((function(e){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))}))}const l={L:.07,M:.15,Q:.25,H:.3};var c=function(){return c=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},c.apply(this,arguments)},h=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){var r;switch(this._type){case"dots":r=this._drawDot;break;case"classy":r=this._drawClassy;break;case"classy-rounded":r=this._drawClassyRounded;break;case"rounded":r=this._drawRounded;break;case"extra-rounded":r=this._drawExtraRounded;break;default:r=this._drawSquare}r.call(this,{x:t,y:e,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(i+n/2)),e._element.setAttribute("cy",String(r+n/2)),e._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(i)),e._element.setAttribute("y",String(r)),e._element.setAttribute("width",String(n)),e._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size;this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size;this._basicSquare({x:e,y:n,size:i,rotation:0})},t.prototype._drawRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0,c=a+o+s+l;if(0!==c)if(c>2||a&&o||s&&l)this._basicSquare({x:e,y:n,size:i,rotation:0});else{if(2===c){var h=0;return a&&s?h=Math.PI/2:s&&o?h=Math.PI:o&&l&&(h=-Math.PI/2),void this._basicCornerRounded({x:e,y:n,size:i,rotation:h})}if(1===c)return h=0,s?h=Math.PI/2:o?h=Math.PI:l&&(h=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:i,rotation:h})}else this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0,c=a+o+s+l;if(0!==c)if(c>2||a&&o||s&&l)this._basicSquare({x:e,y:n,size:i,rotation:0});else{if(2===c){var h=0;return a&&s?h=Math.PI/2:s&&o?h=Math.PI:o&&l&&(h=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:h})}if(1===c)return h=0,s?h=Math.PI/2:o?h=Math.PI:l&&(h=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:i,rotation:h})}else this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0;0!==a+o+s+l?a||s?o||l?this._basicSquare({x:e,y:n,size:i,rotation:0}):this._basicCornerRounded({x:e,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0;0!==a+o+s+l?a||s?o||l?this._basicSquare({x:e,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:i,rotation:Math.PI/2})},t}();const d=h;var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},u.apply(this,arguments)},p=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){var r;switch(this._type){case"square":r=this._drawSquare;break;case"extra-rounded":r=this._drawExtraRounded;break;default:r=this._drawDot}r.call(this,{x:t,y:e,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(u(u({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+(i+n/2)+" "+r+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+a+"a "+(n/2-a)+" "+(n/2-a)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(u(u({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"v "+-n+"zM "+(i+a)+" "+(r+a)+"h "+(n-2*a)+"v "+(n-2*a)+"h "+(2*a-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(u(u({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+i+" "+(r+2.5*a)+"v "+2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*a+" "+2.5*a+"h "+2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*a+" "+2.5*-a+"v "+-2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*-a+" "+2.5*-a+"h "+-2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*-a+" "+2.5*a+"M "+(i+2.5*a)+" "+(r+a)+"h "+2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*a+" "+1.5*a+"v "+2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*-a+" "+1.5*a+"h "+-2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*-a+" "+1.5*-a+"v "+-2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*a+" "+1.5*-a)}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicDot({x:e,y:n,size:i,rotation:r})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicSquare({x:e,y:n,size:i,rotation:r})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicExtraRounded({x:e,y:n,size:i,rotation:r})},t}();const m=p;var g=function(){return g=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},g.apply(this,arguments)},f=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:t,y:e,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(g(g({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(i+n/2)),e._element.setAttribute("cy",String(r+n/2)),e._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(g(g({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(i)),e._element.setAttribute("y",String(r)),e._element.setAttribute("width",String(n)),e._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicDot({x:e,y:n,size:i,rotation:r})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicSquare({x:e,y:n,size:i,rotation:r})},t}();const y=f,v="circle";var w=function(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))},b=function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},x=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],S=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const A=function(){function t(e){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(e.width)),this._element.setAttribute("height",String(e.height)),this._element.setAttribute("viewBox","0 0 "+e.width+" "+e.height),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._instanceId=t.instanceCount++,this._options=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return w(this,void 0,void 0,(function(){var e,n,i,r,a,o,s,c,h,d,u=this;return b(this,(function(p){switch(p.label){case 0:return e=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===v?n/Math.sqrt(2):n,r=i/e,a={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(p.sent(),!this._image)return[2];o=this._options,s=o.imageOptions,c=o.qrOptions,h=s.imageSize*l[c.errorCorrectionLevel],d=Math.floor(h*e*e),a=function(t){var e=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,r=t.maxHiddenAxisDots,a=t.dotSize,o={x:0,y:0},s={x:0,y:0};if(e<=0||n<=0||i<=0||a<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var l=e/n;return o.x=Math.floor(Math.sqrt(i/l)),o.x<=0&&(o.x=1),r&&r<o.x&&(o.x=r),o.x%2==0&&o.x--,s.x=o.x*a,o.y=1+2*Math.ceil((o.x*l-1)/2),s.y=Math.round(s.x*l),(o.y*o.x>i||r&&r<o.y)&&(r&&r<o.y?(o.y=r,o.y%2==0&&o.x--):o.y-=2,s.y=o.y*a,o.x=1+2*Math.ceil((o.y/l-1)/2),s.x=Math.round(s.y/l)),{height:s.y,width:s.x,hideYDots:o.y,hideXDots:o.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:d,maxHiddenAxisDots:e-14,dotSize:r}),p.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,r,o,s,l,c;return!(u._options.imageOptions.hideBackgroundDots&&t>=(e-a.hideXDots)/2&&t<(e+a.hideXDots)/2&&n>=(e-a.hideYDots)/2&&n<(e+a.hideYDots)/2||(null===(i=x[t])||void 0===i?void 0:i[n])||(null===(r=x[t-e+7])||void 0===r?void 0:r[n])||(null===(o=x[t])||void 0===o?void 0:o[n-e+7])||(null===(s=S[t])||void 0===s?void 0:s[n])||(null===(l=S[t-e+7])||void 0===l?void 0:l[n])||(null===(c=S[t])||void 0===c?void 0:c[n-e+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:a.width,height:a.height,count:e,dotSize:r})]:[3,4];case 3:p.sent(),p.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,e,n,i=this._element,r=this._options;if(i){var a=null===(t=r.backgroundOptions)||void 0===t?void 0:t.gradient,o=null===(e=r.backgroundOptions)||void 0===e?void 0:e.color;if((a||o)&&this._createColor({options:a,color:o,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"background-color"}),null===(n=r.backgroundOptions)||void 0===n?void 0:n.round){var s=Math.min(r.width,r.height),l=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),l.setAttribute("x",String((r.width-s)/2)),l.setAttribute("y",String((r.height-s)/2)),l.setAttribute("width",String(s)),l.setAttribute("height",String(s)),l.setAttribute("rx",String(s/2*r.backgroundOptions.round)),this._backgroundClipPath.appendChild(l)}}},t.prototype.drawDots=function(t){var e,n,i=this;if(!this._qr)throw"QR code is not defined";var r=this._options,a=this._qr.getModuleCount();if(a>r.width||a>r.height)throw"The canvas is too small.";var o=Math.min(r.width,r.height)-2*r.margin,s=(r.shape===v?o/Math.sqrt(2):o)/a,l=(r.width-a*s)/2,c=(r.height-a*s)/2,h=new d({svg:this._element,type:r.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color-"+this._instanceId),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(e=r.dotsOptions)||void 0===e?void 0:e.gradient,color:r.dotsOptions.color,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"dot-color-"+this._instanceId});for(var u=function(e){for(var r=function(r){return t&&!t(e,r)?"continue":(null===(n=p._qr)||void 0===n?void 0:n.isDark(e,r))?(h.draw(l+e*s,c+r*s,s,(function(n,o){return!(e+n<0||r+o<0||e+n>=a||r+o>=a)&&!(t&&!t(e+n,r+o))&&!!i._qr&&i._qr.isDark(e+n,r+o)})),void(h._element&&p._dotsClipPath&&p._dotsClipPath.appendChild(h._element))):"continue"},o=0;o<a;o++)r(o)},p=this,m=0;m<a;m++)u(m);if(r.shape===v){var g=Math.floor((o/s-a)/2),f=a+2*g,y=l-g*s,w=c-g*s,b=[],x=Math.floor(f/2);for(m=0;m<f;m++){b[m]=[];for(var S=0;S<f;S++)m>=g-1&&m<=f-g&&S>=g-1&&S<=f-g||Math.sqrt((m-x)*(m-x)+(S-x)*(S-x))>x?b[m][S]=0:b[m][S]=this._qr.isDark(S-2*g<0?S:S>=a?S-2*g:S-g,m-2*g<0?m:m>=a?m-2*g:m-g)?1:0}var A=function(t){for(var e=function(e){if(!b[t][e])return"continue";h.draw(y+t*s,w+e*s,s,(function(n,i){var r;return!!(null===(r=b[t+n])||void 0===r?void 0:r[e+i])})),h._element&&C._dotsClipPath&&C._dotsClipPath.appendChild(h._element)},n=0;n<f;n++)e(n)},C=this;for(m=0;m<f;m++)A(m)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var e=this._element,n=this._options;if(!e)throw"Element code is not defined";var i=this._qr.getModuleCount(),r=Math.min(n.width,n.height)-2*n.margin,a=(n.shape===v?r/Math.sqrt(2):r)/i,o=7*a,s=3*a,l=(n.width-i*a)/2,c=(n.height-i*a)/2;[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(e){var r,h,u,p,g,f,v,w,b,A,C,k,I=e[0],E=e[1],_=e[2],M=l+I*a*(i-7),D=c+E*a*(i-7),P=t._dotsClipPath,T=t._dotsClipPath;if(((null===(r=n.cornersSquareOptions)||void 0===r?void 0:r.gradient)||(null===(h=n.cornersSquareOptions)||void 0===h?void 0:h.color))&&((P=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+I+"-"+E+"-"+t._instanceId),t._defs.appendChild(P),t._cornersSquareClipPath=t._cornersDotClipPath=T=P,t._createColor({options:null===(u=n.cornersSquareOptions)||void 0===u?void 0:u.gradient,color:null===(p=n.cornersSquareOptions)||void 0===p?void 0:p.color,additionalRotation:_,x:M,y:D,height:o,width:o,name:"corners-square-color-"+I+"-"+E+"-"+t._instanceId})),null===(g=n.cornersSquareOptions)||void 0===g?void 0:g.type){var L=new m({svg:t._element,type:n.cornersSquareOptions.type});L.draw(M,D,o,_),L._element&&P&&P.appendChild(L._element)}else for(var B=new d({svg:t._element,type:n.dotsOptions.type}),F=function(t){for(var e=function(e){if(!(null===(f=x[t])||void 0===f?void 0:f[e]))return"continue";B.draw(M+t*a,D+e*a,a,(function(n,i){var r;return!!(null===(r=x[t+n])||void 0===r?void 0:r[e+i])})),B._element&&P&&P.appendChild(B._element)},n=0;n<x[t].length;n++)e(n)},R=0;R<x.length;R++)F(R);if(((null===(v=n.cornersDotOptions)||void 0===v?void 0:v.gradient)||(null===(w=n.cornersDotOptions)||void 0===w?void 0:w.color))&&((T=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+I+"-"+E+"-"+t._instanceId),t._defs.appendChild(T),t._cornersDotClipPath=T,t._createColor({options:null===(b=n.cornersDotOptions)||void 0===b?void 0:b.gradient,color:null===(A=n.cornersDotOptions)||void 0===A?void 0:A.color,additionalRotation:_,x:M+2*a,y:D+2*a,height:s,width:s,name:"corners-dot-color-"+I+"-"+E+"-"+t._instanceId})),null===(C=n.cornersDotOptions)||void 0===C?void 0:C.type){var N=new y({svg:t._element,type:n.cornersDotOptions.type});N.draw(M+2*a,D+2*a,s,_),N._element&&T&&T.appendChild(N._element)}else{B=new d({svg:t._element,type:n.dotsOptions.type});var V=function(t){for(var e=function(e){if(!(null===(k=S[t])||void 0===k?void 0:k[e]))return"continue";B.draw(M+t*a,D+e*a,a,(function(n,i){var r;return!!(null===(r=S[t+n])||void 0===r?void 0:r[e+i])})),B._element&&T&&T.appendChild(B._element)},n=0;n<S[t].length;n++)e(n)};for(R=0;R<S.length;R++)V(R)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(e,n){var i=t._options,r=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(r.crossOrigin=i.imageOptions.crossOrigin),t._image=r,r.onload=function(){e()},r.src=i.image}))},t.prototype.drawImage=function(t){var e=t.width,n=t.height,i=t.count,r=t.dotSize;return w(this,void 0,void 0,(function(){var t,a,o,l,c,h,d,u,p;return b(this,(function(m){switch(m.label){case 0:return t=this._options,a=(t.width-i*r)/2,o=(t.height-i*r)/2,l=a+t.imageOptions.margin+(i*r-e)/2,c=o+t.imageOptions.margin+(i*r-n)/2,h=e-2*t.imageOptions.margin,d=n-2*t.imageOptions.margin,(u=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(l)),u.setAttribute("y",String(c)),u.setAttribute("width",h+"px"),u.setAttribute("height",d+"px"),[4,s(t.image||"")];case 1:return p=m.sent(),u.setAttribute("href",p||""),this._element.appendChild(u),[2]}}))}))},t.prototype._createColor=function(t){var e=t.options,n=t.color,i=t.additionalRotation,r=t.x,a=t.y,o=t.height,s=t.width,l=t.name,c=s>o?s:o,h=document.createElementNS("http://www.w3.org/2000/svg","rect");if(h.setAttribute("x",String(r)),h.setAttribute("y",String(a)),h.setAttribute("height",String(o)),h.setAttribute("width",String(s)),h.setAttribute("clip-path","url('#clip-path-"+l+"')"),e){var d;if("radial"===e.type)(d=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",l),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("fx",String(r+s/2)),d.setAttribute("fy",String(a+o/2)),d.setAttribute("cx",String(r+s/2)),d.setAttribute("cy",String(a+o/2)),d.setAttribute("r",String(c/2));else{var u=((e.rotation||0)+i)%(2*Math.PI),p=(u+2*Math.PI)%(2*Math.PI),m=r+s/2,g=a+o/2,f=r+s/2,y=a+o/2;p>=0&&p<=.25*Math.PI||p>1.75*Math.PI&&p<=2*Math.PI?(m-=s/2,g-=o/2*Math.tan(u),f+=s/2,y+=o/2*Math.tan(u)):p>.25*Math.PI&&p<=.75*Math.PI?(g-=o/2,m-=s/2/Math.tan(u),y+=o/2,f+=s/2/Math.tan(u)):p>.75*Math.PI&&p<=1.25*Math.PI?(m+=s/2,g+=o/2*Math.tan(u),f-=s/2,y-=o/2*Math.tan(u)):p>1.25*Math.PI&&p<=1.75*Math.PI&&(g+=o/2,m+=s/2/Math.tan(u),y-=o/2,f-=s/2/Math.tan(u)),(d=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",l),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("x1",String(Math.round(m))),d.setAttribute("y1",String(Math.round(g))),d.setAttribute("x2",String(Math.round(f))),d.setAttribute("y2",String(Math.round(y)))}e.colorStops.forEach((function(t){var e=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*e+"%"),i.setAttribute("stop-color",n),d.appendChild(i)})),h.setAttribute("fill","url('#"+l+"')"),this._defs.appendChild(d)}else n&&h.setAttribute("fill",n);this._element.appendChild(h)},t.instanceCount=0,t}(),C="canvas";for(var k={},I=0;I<=40;I++)k[I]=I;const E={type:C,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:k[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var _=function(){return _=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},_.apply(this,arguments)};function M(t){var e=_({},t);if(!e.colorStops||!e.colorStops.length)throw"Field 'colorStops' is required in gradient";return e.rotation?e.rotation=Number(e.rotation):e.rotation=0,e.colorStops=e.colorStops.map((function(t){return _(_({},t),{offset:Number(t.offset)})})),e}function D(t){var e=_({},t);return e.width=Number(e.width),e.height=Number(e.height),e.margin=Number(e.margin),e.imageOptions=_(_({},e.imageOptions),{hideBackgroundDots:Boolean(e.imageOptions.hideBackgroundDots),imageSize:Number(e.imageOptions.imageSize),margin:Number(e.imageOptions.margin)}),e.margin>Math.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=_({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=M(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=_({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=M(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=_({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=M(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=_({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=M(e.backgroundOptions.gradient))),e}var P=n(192),T=n.n(P),L=function(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))},B=function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};const F=function(){function t(t){this._options=t?D(a(E,t)):E,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var e=new A(this._options);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,e.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,e=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(e._svg){var t=e._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),r=new Image;return new Promise((function(t){r.onload=function(){var n,i;null===(i=null===(n=e._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(r,0,0),t()},r.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){return B(this,(function(e){switch(e.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return e.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return e.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(e){t._clearContainer(this._container),this._options=e?D(a(this._options,e)):this._options,this._options.data&&(this._qr=T()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===C?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===C?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),L(this,void 0,void 0,(function(){var e,n,i;return B(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(e=r.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(e),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return e.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return L(this,void 0,void 0,(function(){var e,n,i,r,a;return B(this,(function(s){switch(s.label){case 0:if(!this._qr)throw"QR code is empty";return e="png",n="qr","string"==typeof t?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(e=t.extension)),[4,this._getElement(e)];case 1:return(i=s.sent())?("svg"===e.toLowerCase()?(r=new XMLSerializer,a='<?xml version="1.0" standalone="no"?>\r\n'+(a=r.serializeToString(i)),o("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(a),n+".svg")):o(i.toDataURL("image/"+e),n+"."+e),[2]):[2]}}))}))},t}()}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(676)})().default},1704:(t,e,n)=>{"use strict";n.d(e,{A:()=>Tt});var i={};n.r(i),n.d(i,{decrypt:()=>Pt,encrypt:()=>Dt,generateKey:()=>_t,verifyHmac:()=>Mt});var r=n(2063),a=n(8196),o=function(t,e,n){this.name=t,this.version=e,this.os=n,this.type="browser"},s=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},l=function(t,e,n,i){this.name=t,this.version=e,this.os=n,this.bot=i,this.type="bot-device"},c=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},h=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},d=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,u=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],p=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function m(t){var e=function(t){return""!==t&&u.reduce((function(e,n){var i=n[0],r=n[1];if(e)return e;var a=r.exec(t);return!!a&&[i,a]}),!1)}(t);if(!e)return null;var n=e[0],i=e[1];if("searchbot"===n)return new c;var r=i[1]&&i[1].split(/[._]/).slice(0,3);r?r.length<3&&(r=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}(r,function(t){for(var e=[],n=0;n<t;n++)e.push("0");return e}(3-r.length))):r=[];var a=r.join("."),s=function(t){for(var e=0,n=p.length;e<n;e++){var i=p[e],r=i[0];if(i[1].exec(t))return r}return null}(t),h=d.exec(t);return h&&h[1]?new l(n,a,s,h[1]):new o(n,a,s)}function g(t){return function(t){return t?m(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new h:"undefined"!=typeof navigator?m(navigator.userAgent):"undefined"!=typeof process&&process.version?new s(process.version.slice(1)):null}(t)}function f(){const t=g();return t&&t.os?t.os:void 0}a.getFromWindow,a.getFromWindowOrThrow,a.getDocumentOrThrow,a.getDocument,a.getNavigatorOrThrow;const y=a.getNavigator,v=(a.getLocationOrThrow,a.getLocation),w=(a.getCryptoOrThrow,a.getCrypto,a.getLocalStorageOrThrow,a.getLocalStorage);function b(){return r.g()}function x(t){let e=null,n=null;const i=w();return i&&(n=i.getItem(t)),e=n?function(t){if("string"!=typeof t)throw new Error("Cannot safe json parse value of type "+typeof t);try{return JSON.parse(t)}catch(e){return t}}(n):n,e}function S(t){const e=w();e&&e.removeItem(t)}const A="WALLETCONNECT_DEEPLINK_CHOICE",C=["session_request","session_update","exchange_key","connect","disconnect","display_uri","modal_closed","transport_open","transport_close","transport_error"],k=["eth_sendTransaction","eth_signTransaction","eth_sign","eth_signTypedData","eth_signTypedData_v1","eth_signTypedData_v2","eth_signTypedData_v3","eth_signTypedData_v4","personal_sign","wallet_addEthereumChain","wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode"];var I=n(9404),E=n.n(I),_=(n(9225),n(4527)),M=n.n(_);const D="hex",P="utf8",T="0";function L(t){return new Uint8Array(t)}function B(t,e=!1){const n=t.toString(D);return e?Z(n):n}function F(t){return M()(t)}function R(t,e=!1){return B(F(t),e)}function N(t){return F(t).toString(P)}function V(t){return L(function(t){return Buffer.from(O(t),D)}(t))}function z(t){return Buffer.from(t,P)}function G(...t){let e=[];return t.forEach((t=>e=e.concat(Array.from(t)))),new Uint8Array([...e])}function W(t,e=8,n=T){return function(t,e,n=T){return function(t,e,n,i=T){const r=e-t.length;let a=t;if(r>0){const e=i.repeat(r);a=n?e+t:t+e}return a}(t,e,!0,n)}(t,function(t,e=8){const n=t%e;return n?(t-n)/e*e+e:t}(t.length,e),n)}function O(t){return t.replace(/^0x/,"")}function Z(t){return t.startsWith("0x")?t:`0x${t}`}function Y(t){return(t=W(t=O(t),2))&&(t=Z(t)),t}function H(t){return F(new Uint8Array(t))}function j(t,e){const n=O(Y(new(E())(t).toString(16)));return e?n:Z(n)}var X=n(1176),U=n(5682);function K(t){return Y(t)}const J=function(t=3){return Date.now()*Math.pow(10,t)+Math.floor(Math.random()*Math.pow(10,t))};function q(){return((t,e)=>{for(e=t="";t++<36;e+=51*t&52?(15^t?8^Math.random()*(20^t?16:4):4).toString(16):"-");return e})()}function $(t,e){return function(t,e){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}(t,e)}function Q(t){return void 0!==t.result}function tt(t){return void 0!==t.error}function et(t){return void 0!==t.event}function nt(t){var e,n;return(e=t)&&e.length&&!$(t[0])&&(t[0]=function(t,e=!1){return B(z(t),e)}(t[0],!n)),t}function it(t){if(void 0!==t.type&&"0"!==t.type)return t;if(void 0===t.from||!(e=t.from)||"0x"!==e.toLowerCase().substring(0,2)||!/^(0x)?[0-9a-f]{40}$/i.test(e)||!/^(0x)?[0-9a-f]{40}$/.test(e)&&!/^(0x)?[0-9A-F]{40}$/.test(e)&&e!==function(t){t=O(t.toLowerCase());const e=O((0,X.keccak_256)(z(t)));let n="";for(let i=0;i<t.length;i++)parseInt(e[i],16)>7?n+=t[i].toUpperCase():n+=t[i];return Z(n)}(e))throw new Error("Transaction object must include a valid 'from' value.");var e;function n(t){let e=t;return("number"==typeof t||"string"==typeof t&&!function(t){return""===t||"string"==typeof t&&""===t.trim()}(t))&&($(t)?"string"==typeof t&&(e=K(t)):e=j(t)),"string"==typeof e&&(e=function(t){const e=t.startsWith("0x");return t=(t=O(t)).startsWith(T)?t.substring(1):t,e?Z(t):t}(Z(e))),e}const i={from:K(t.from),to:void 0===t.to?void 0:K(t.to),gasPrice:void 0===t.gasPrice?"":n(t.gasPrice),gas:void 0===t.gas?void 0===t.gasLimit?"":n(t.gasLimit):n(t.gas),value:void 0===t.value?"":n(t.value),nonce:void 0===t.nonce?"":n(t.nonce),data:void 0===t.data?"":K(t.data)||"0x"},r=["gasPrice","gas","value","nonce"];return Object.keys(i).forEach((t=>{(void 0===i[t]||"string"==typeof i[t]&&!i[t].trim().length)&&r.includes(t)&&delete i[t]})),i}var rt=n(6663);function at(t){return rt.parse(t)}const ot=class{constructor(){this._eventEmitters=[],"undefined"!=typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(()=>this.trigger("online"))),window.addEventListener("offline",(()=>this.trigger("offline"))))}on(t,e){this._eventEmitters.push({event:t,callback:e})}trigger(t){let e=[];t&&(e=this._eventEmitters.filter((e=>e.event===t))),e.forEach((t=>{t.callback()}))}},st=void 0!==n.g.WebSocket?n.g.WebSocket:n(1591),lt=class{constructor(t){if(this.opts=t,this._queue=[],this._events=[],this._subscriptions=[],this._protocol=t.protocol,this._version=t.version,this._url="",this._netMonitor=null,this._socket=null,this._nextSocket=null,this._subscriptions=t.subscriptions||[],this._netMonitor=t.netMonitor||new ot,!t.url||"string"!=typeof t.url)throw new Error("Missing or invalid WebSocket url");this._url=t.url,this._netMonitor.on("online",(()=>this._socketCreate()))}set readyState(t){}get readyState(){return this._socket?this._socket.readyState:-1}set connecting(t){}get connecting(){return 0===this.readyState}set connected(t){}get connected(){return 1===this.readyState}set closing(t){}get closing(){return 2===this.readyState}set closed(t){}get closed(){return 3===this.readyState}open(){this._socketCreate()}close(){this._socketClose()}send(t,e,n){if(!e||"string"!=typeof e)throw new Error("Missing or invalid topic field");this._socketSend({topic:e,type:"pub",payload:t,silent:!!n})}subscribe(t){this._socketSend({topic:t,type:"sub",payload:"",silent:!0})}on(t,e){this._events.push({event:t,callback:e})}_socketCreate(){if(this._nextSocket)return;const t=function(t,e,n){var i,r;const a=(t.startsWith("https")?t.replace("https","wss"):t.startsWith("http")?t.replace("http","ws"):t).split("?"),o=!function(){const t=g();return!(!t||!t.name)&&"node"===t.name.toLowerCase()}()&&y()?{protocol:e,version:n,env:"browser",host:(null===(i=v())||void 0===i?void 0:i.host)||""}:{protocol:e,version:n,env:(null===(r=g())||void 0===r?void 0:r.name)||""},s=function(t,e){let n=at(t);return n=Object.assign(Object.assign({},n),e),t=function(t){return rt.stringify(t)}(n),t}(function(t){const e=-1!==t.indexOf("?")?t.indexOf("?"):void 0;return void 0!==e?t.substr(e):""}(a[1]||""),o);return a[0]+"?"+s}(this._url,this._protocol,this._version);if(this._nextSocket=new st(t),!this._nextSocket)throw new Error("Failed to create socket");this._nextSocket.onmessage=t=>this._socketReceive(t),this._nextSocket.onopen=()=>this._socketOpen(),this._nextSocket.onerror=t=>this._socketError(t),this._nextSocket.onclose=()=>{setTimeout((()=>{this._nextSocket=null,this._socketCreate()}),1e3)}}_socketOpen(){this._socketClose(),this._socket=this._nextSocket,this._nextSocket=null,this._queueSubscriptions(),this._pushQueue()}_socketClose(){this._socket&&(this._socket.onclose=()=>{},this._socket.close())}_socketSend(t){const e=JSON.stringify(t);this._socket&&1===this._socket.readyState?this._socket.send(e):(this._setToQueue(t),this._socketCreate())}async _socketReceive(t){let e;try{e=JSON.parse(t.data)}catch(t){return}if(this._socketSend({topic:e.topic,type:"ack",payload:"",silent:!0}),this._socket&&1===this._socket.readyState){const t=this._events.filter((t=>"message"===t.event));t&&t.length&&t.forEach((t=>t.callback(e)))}}_socketError(t){const e=this._events.filter((t=>"error"===t.event));e&&e.length&&e.forEach((e=>e.callback(t)))}_queueSubscriptions(){this._subscriptions.forEach((t=>this._queue.push({topic:t,type:"sub",payload:"",silent:!0}))),this._subscriptions=this.opts.subscriptions||[]}_setToQueue(t){this._queue.push(t)}_pushQueue(){this._queue.forEach((t=>this._socketSend(t))),this._queue=[]}},ct="Session currently connected",ht="Session currently disconnected",dt="JSON RPC response format is invalid",ut="User close QRCode Modal",pt=class{constructor(){this._eventEmitters=[]}subscribe(t){this._eventEmitters.push(t)}unsubscribe(t){this._eventEmitters=this._eventEmitters.filter((e=>e.event!==t))}trigger(t){let e,n=[];e=void 0!==t.method?t.method:Q(t)||tt(t)?`response:${t.id}`:et(t)?t.event:"",e&&(n=this._eventEmitters.filter((t=>t.event===e))),n&&n.length||function(t){return C.includes(t)||t.startsWith("wc_")}(e)||et(e)||(n=this._eventEmitters.filter((t=>"call_request"===t.event))),n.forEach((e=>{if(tt(t)){const n=new Error(t.error.message);e.callback(n,null)}else e.callback(null,t)}))}},mt=class{constructor(t="walletconnect"){this.storageId=t}getSession(){let t=null;const e=x(this.storageId);return e&&void 0!==e.bridge&&(t=e),t}setSession(t){return function(t,e){const n="string"==typeof(r=e)?r:JSON.stringify(r),i=w();var r;i&&i.setItem(t,n)}(this.storageId,t),t}removeSession(){S(this.storageId)}},gt="abcdefghijklmnopqrstuvwxyz0123456789".split("").map((t=>`https://${t}.bridge.walletconnect.org`));const ft=class{constructor(t){if(this.protocol="wc",this.version=1,this._bridge="",this._key=null,this._clientId="",this._clientMeta=null,this._peerId="",this._peerMeta=null,this._handshakeId=0,this._handshakeTopic="",this._connected=!1,this._accounts=[],this._chainId=0,this._networkId=0,this._rpcUrl="",this._eventManager=new pt,this._clientMeta=b()||t.connectorOpts.clientMeta||null,this._cryptoLib=t.cryptoLib,this._sessionStorage=t.sessionStorage||new mt(t.connectorOpts.storageId),this._qrcodeModal=t.connectorOpts.qrcodeModal,this._qrcodeModalOptions=t.connectorOpts.qrcodeModalOptions,this._signingMethods=[...k,...t.connectorOpts.signingMethods||[]],!t.connectorOpts.bridge&&!t.connectorOpts.uri&&!t.connectorOpts.session)throw new Error("Missing one of the required parameters: bridge / uri / session");var e;t.connectorOpts.bridge&&(this.bridge=function(t){return"walletconnect.org"===function(t){return function(t){let e=t.indexOf("//")>-1?t.split("/")[2]:t.split("/")[0];return e=e.split(":")[0],e=e.split("?")[0],e}(t).split(".").slice(-2).join(".")}(t)}(e=t.connectorOpts.bridge)?gt[Math.floor(Math.random()*gt.length)]:e),t.connectorOpts.uri&&(this.uri=t.connectorOpts.uri);const n=t.connectorOpts.session||this._getStorageSession();n&&(this.session=n),this.handshakeId&&this._subscribeToSessionResponse(this.handshakeId,"Session request rejected"),this._transport=t.transport||new lt({protocol:this.protocol,version:this.version,url:this.bridge,subscriptions:[this.clientId]}),this._subscribeToInternalEvents(),this._initTransport(),t.connectorOpts.uri&&this._subscribeToSessionRequest(),t.pushServerOpts&&this._registerPushServer(t.pushServerOpts)}set bridge(t){t&&(this._bridge=t)}get bridge(){return this._bridge}set key(t){if(!t)return;const e=V(t).buffer;this._key=e}get key(){return this._key?(t=this._key,R(new Uint8Array(t),!1)):"";var t}set clientId(t){t&&(this._clientId=t)}get clientId(){let t=this._clientId;return t||(t=this._clientId=q()),this._clientId}set peerId(t){t&&(this._peerId=t)}get peerId(){return this._peerId}set clientMeta(t){}get clientMeta(){let t=this._clientMeta;return t||(t=this._clientMeta=b()),t}set peerMeta(t){this._peerMeta=t}get peerMeta(){return this._peerMeta}set handshakeTopic(t){t&&(this._handshakeTopic=t)}get handshakeTopic(){return this._handshakeTopic}set handshakeId(t){t&&(this._handshakeId=t)}get handshakeId(){return this._handshakeId}get uri(){return this._formatUri()}set uri(t){if(!t)return;const{handshakeTopic:e,bridge:n,key:i}=this._parseUri(t);this.handshakeTopic=e,this.bridge=n,this.key=i}set chainId(t){this._chainId=t}get chainId(){return this._chainId}set networkId(t){this._networkId=t}get networkId(){return this._networkId}set accounts(t){this._accounts=t}get accounts(){return this._accounts}set rpcUrl(t){this._rpcUrl=t}get rpcUrl(){return this._rpcUrl}set connected(t){}get connected(){return this._connected}set pending(t){}get pending(){return!!this._handshakeTopic}get session(){return{connected:this.connected,accounts:this.accounts,chainId:this.chainId,bridge:this.bridge,key:this.key,clientId:this.clientId,clientMeta:this.clientMeta,peerId:this.peerId,peerMeta:this.peerMeta,handshakeId:this.handshakeId,handshakeTopic:this.handshakeTopic}}set session(t){t&&(this._connected=t.connected,this.accounts=t.accounts,this.chainId=t.chainId,this.bridge=t.bridge,this.key=t.key,this.clientId=t.clientId,this.clientMeta=t.clientMeta,this.peerId=t.peerId,this.peerMeta=t.peerMeta,this.handshakeId=t.handshakeId,this.handshakeTopic=t.handshakeTopic)}on(t,e){const n={event:t,callback:e};this._eventManager.subscribe(n)}off(t){this._eventManager.unsubscribe(t)}async createInstantRequest(t){this._key=await this._generateKey();const e=this._formatRequest({method:"wc_instantRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,request:this._formatRequest(t)}]});this.handshakeId=e.id,this.handshakeTopic=q(),this._eventManager.trigger({event:"display_uri",params:[this.uri]}),this.on("modal_closed",(()=>{throw new Error(ut)}));const n=()=>{this.killSession()};try{const t=await this._sendCallRequest(e);return t&&n(),t}catch(t){throw n(),t}}async connect(t){if(!this._qrcodeModal)throw new Error("QRCode Modal not provided");return this.connected?{chainId:this.chainId,accounts:this.accounts}:(await this.createSession(t),new Promise((async(t,e)=>{this.on("modal_closed",(()=>e(new Error(ut)))),this.on("connect",((n,i)=>{if(n)return e(n);t(i.params[0])}))})))}async createSession(t){if(this._connected)throw new Error(ct);if(this.pending)return;this._key=await this._generateKey();const e=this._formatRequest({method:"wc_sessionRequest",params:[{peerId:this.clientId,peerMeta:this.clientMeta,chainId:t&&t.chainId?t.chainId:null}]});this.handshakeId=e.id,this.handshakeTopic=q(),this._sendSessionRequest(e,"Session update rejected",{topic:this.handshakeTopic}),this._eventManager.trigger({event:"display_uri",params:[this.uri]})}approveSession(t){if(this._connected)throw new Error(ct);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl,peerId:this.clientId,peerMeta:this.clientMeta},n={id:this.handshakeId,jsonrpc:"2.0",result:e};this._sendResponse(n),this._connected=!0,this._setStorageSession(),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})}rejectSession(t){if(this._connected)throw new Error(ct);const e=t&&t.message?t.message:"Session Rejected",n=this._formatResponse({id:this.handshakeId,error:{message:e}});this._sendResponse(n),this._connected=!1,this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession()}updateSession(t){if(!this._connected)throw new Error(ht);this.chainId=t.chainId,this.accounts=t.accounts,this.networkId=t.networkId||0,this.rpcUrl=t.rpcUrl||"";const e={approved:!0,chainId:this.chainId,networkId:this.networkId,accounts:this.accounts,rpcUrl:this.rpcUrl},n=this._formatRequest({method:"wc_sessionUpdate",params:[e]});this._sendSessionRequest(n,"Session update rejected"),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]}),this._manageStorageSession()}async killSession(t){const e=t?t.message:"Session Disconnected",n=this._formatRequest({method:"wc_sessionUpdate",params:[{approved:!1,chainId:null,networkId:null,accounts:null}]});await this._sendRequest(n),this._handleSessionDisconnect(e)}async sendTransaction(t){if(!this._connected)throw new Error(ht);const e=it(t),n=this._formatRequest({method:"eth_sendTransaction",params:[e]});return await this._sendCallRequest(n)}async signTransaction(t){if(!this._connected)throw new Error(ht);const e=it(t),n=this._formatRequest({method:"eth_signTransaction",params:[e]});return await this._sendCallRequest(n)}async signMessage(t){if(!this._connected)throw new Error(ht);const e=this._formatRequest({method:"eth_sign",params:t});return await this._sendCallRequest(e)}async signPersonalMessage(t){if(!this._connected)throw new Error(ht);t=nt(t);const e=this._formatRequest({method:"personal_sign",params:t});return await this._sendCallRequest(e)}async signTypedData(t){if(!this._connected)throw new Error(ht);const e=this._formatRequest({method:"eth_signTypedData",params:t});return await this._sendCallRequest(e)}async updateChain(t){if(!this._connected)throw new Error("Session currently disconnected");const e=this._formatRequest({method:"wallet_updateChain",params:[t]});return await this._sendCallRequest(e)}unsafeSend(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),new Promise(((e,n)=>{this._subscribeToResponse(t.id,((t,i)=>{if(t)n(t);else{if(!i)throw new Error("Missing JSON RPC response");e(i)}}))}))}async sendCustomRequest(t,e){if(!this._connected)throw new Error(ht);switch(t.method){case"eth_accounts":return this.accounts;case"eth_chainId":return j(this.chainId);case"eth_sendTransaction":case"eth_signTransaction":t.params&&(t.params[0]=it(t.params[0]));break;case"personal_sign":t.params&&(t.params=nt(t.params))}const n=this._formatRequest(t);return await this._sendCallRequest(n,e)}approveRequest(t){if(!Q(t))throw new Error('JSON-RPC success response must include "result" field');{const e=this._formatResponse(t);this._sendResponse(e)}}rejectRequest(t){if(!tt(t))throw new Error('JSON-RPC error response must include "error" field');{const e=this._formatResponse(t);this._sendResponse(e)}}transportClose(){this._transport.close()}async _sendRequest(t,e){const n=this._formatRequest(t),i=await this._encrypt(n),r=void 0!==(null==e?void 0:e.topic)?e.topic:this.peerId,a=JSON.stringify(i),o=void 0!==(null==e?void 0:e.forcePushNotification)?!e.forcePushNotification:function(t){return!!t.method.startsWith("wc_")||!k.includes(t.method)}(n);this._transport.send(a,r,o)}async _sendResponse(t){const e=await this._encrypt(t),n=this.peerId,i=JSON.stringify(e);this._transport.send(i,n,!0)}async _sendSessionRequest(t,e,n){this._sendRequest(t,n),this._subscribeToSessionResponse(t.id,e)}_sendCallRequest(t,e){return this._sendRequest(t,e),this._eventManager.trigger({event:"call_request_sent",params:[{request:t,options:e}]}),this._subscribeToCallResponse(t.id)}_formatRequest(t){if(void 0===t.method)throw new Error('JSON RPC request must have valid "method" value');return{id:void 0===t.id?J():t.id,jsonrpc:"2.0",method:t.method,params:void 0===t.params?[]:t.params}}_formatResponse(t){if(void 0===t.id)throw new Error('JSON RPC request must have valid "id" value');const e={id:t.id,jsonrpc:"2.0"};if(tt(t)){const n=function(t){const e=t.message||"Failed or Rejected Request";let n=-32e3;if(t&&!t.code)switch(e){case"Parse error":n=-32700;break;case"Invalid request":n=-32600;break;case"Method not found":n=-32601;break;case"Invalid params":n=-32602;break;case"Internal error":n=-32603;break;default:n=-32e3}const i={code:n,message:e};return t.data&&(i.data=t.data),i}(t.error);return Object.assign(Object.assign(Object.assign({},e),t),{error:n})}if(Q(t))return Object.assign(Object.assign({},e),t);throw new Error(dt)}_handleSessionDisconnect(t){const e=t||"Session Disconnected";this._connected||(this._qrcodeModal&&this._qrcodeModal.close(),S(A)),this._connected&&(this._connected=!1),this._handshakeId&&(this._handshakeId=0),this._handshakeTopic&&(this._handshakeTopic=""),this._peerId&&(this._peerId=""),this._eventManager.trigger({event:"disconnect",params:[{message:e}]}),this._removeStorageSession(),this.transportClose()}_handleSessionResponse(t,e){e&&e.approved?(this._connected?(e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),this._eventManager.trigger({event:"session_update",params:[{chainId:this.chainId,accounts:this.accounts}]})):(this._connected=!0,e.chainId&&(this.chainId=e.chainId),e.accounts&&(this.accounts=e.accounts),e.peerId&&!this.peerId&&(this.peerId=e.peerId),e.peerMeta&&!this.peerMeta&&(this.peerMeta=e.peerMeta),this._eventManager.trigger({event:"connect",params:[{peerId:this.peerId,peerMeta:this.peerMeta,chainId:this.chainId,accounts:this.accounts}]})),this._manageStorageSession()):this._handleSessionDisconnect(t)}async _handleIncomingMessages(t){if(![this.clientId,this.handshakeTopic].includes(t.topic))return;let e;try{e=JSON.parse(t.payload)}catch(t){return}const n=await this._decrypt(e);n&&this._eventManager.trigger(n)}_subscribeToSessionRequest(){this._transport.subscribe(this.handshakeTopic)}_subscribeToResponse(t,e){this.on(`response:${t}`,e)}_subscribeToSessionResponse(t,e){this._subscribeToResponse(t,((t,n)=>{t?this._handleSessionResponse(t.message):Q(n)?this._handleSessionResponse(e,n.result):n.error&&n.error.message?this._handleSessionResponse(n.error.message):this._handleSessionResponse(e)}))}_subscribeToCallResponse(t){return new Promise(((e,n)=>{this._subscribeToResponse(t,((t,i)=>{t?n(t):Q(i)?e(i.result):i.error&&i.error.message?n(i.error):n(new Error(dt))}))}))}_subscribeToInternalEvents(){this.on("display_uri",(()=>{this._qrcodeModal&&this._qrcodeModal.open(this.uri,(()=>{this._eventManager.trigger({event:"modal_closed",params:[]})}),this._qrcodeModalOptions)})),this.on("connect",(()=>{this._qrcodeModal&&this._qrcodeModal.close()})),this.on("call_request_sent",((t,e)=>{const{request:n}=e.params[0];if(f()&&(function(){const t=f();return!!t&&t.toLowerCase().includes("android")}()||function(){const t=f();return!!t&&(t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}())&&this._signingMethods.includes(n.method)){const t=x(A);t&&(window.location.href=t.href)}})),this.on("wc_sessionRequest",((t,e)=>{t&&this._eventManager.trigger({event:"error",params:[{code:"SESSION_REQUEST_ERROR",message:t.toString()}]}),this.handshakeId=e.id,this.peerId=e.params[0].peerId,this.peerMeta=e.params[0].peerMeta;const n=Object.assign(Object.assign({},e),{method:"session_request"});this._eventManager.trigger(n)})),this.on("wc_sessionUpdate",((t,e)=>{t&&this._handleSessionResponse(t.message),this._handleSessionResponse("Session disconnected",e.params[0])}))}_initTransport(){this._transport.on("message",(t=>this._handleIncomingMessages(t))),this._transport.on("open",(()=>this._eventManager.trigger({event:"transport_open",params:[]}))),this._transport.on("close",(()=>this._eventManager.trigger({event:"transport_close",params:[]}))),this._transport.on("error",(()=>this._eventManager.trigger({event:"transport_error",params:["Websocket connection failed"]}))),this._transport.open()}_formatUri(){return`${this.protocol}:${this.handshakeTopic}@${this.version}?bridge=${encodeURIComponent(this.bridge)}&key=${this.key}`}_parseUri(t){const e=function(t){const e=t.indexOf(":"),n=-1!==t.indexOf("?")?t.indexOf("?"):void 0,i=t.substring(0,e),r=function(t){const e=t.split("@");return{handshakeTopic:e[0],version:parseInt(e[1],10)}}(t.substring(e+1,n)),a=function(t){const e=at(t);return{key:e.key||"",bridge:e.bridge||""}}(void 0!==n?t.substr(n):"");return Object.assign(Object.assign({protocol:i},r),a)}(t);if(e.protocol===this.protocol){if(!e.handshakeTopic)throw Error("Invalid or missing handshakeTopic parameter value");const t=e.handshakeTopic;if(!e.bridge)throw Error("Invalid or missing bridge url parameter value");const n=decodeURIComponent(e.bridge);if(!e.key)throw Error("Invalid or missing key parameter value");return{handshakeTopic:t,bridge:n,key:e.key}}throw new Error("URI format is invalid")}async _generateKey(){return this._cryptoLib?await this._cryptoLib.generateKey():null}async _encrypt(t){const e=this._key;return this._cryptoLib&&e?await this._cryptoLib.encrypt(t,e):null}async _decrypt(t){const e=this._key;return this._cryptoLib&&e?await this._cryptoLib.decrypt(t,e):null}_getStorageSession(){let t=null;return this._sessionStorage&&(t=this._sessionStorage.getSession()),t}_setStorageSession(){this._sessionStorage&&this._sessionStorage.setSession(this.session)}_removeStorageSession(){this._sessionStorage&&this._sessionStorage.removeSession()}_manageStorageSession(){this._connected?this._setStorageSession():this._removeStorageSession()}_registerPushServer(t){if(!t.url||"string"!=typeof t.url)throw Error("Invalid or missing pushServerOpts.url parameter value");if(!t.type||"string"!=typeof t.type)throw Error("Invalid or missing pushServerOpts.type parameter value");if(!t.token||"string"!=typeof t.token)throw Error("Invalid or missing pushServerOpts.token parameter value");const e={bridge:this.bridge,topic:this.clientId,type:t.type,token:t.token,peerName:"",language:t.language||""};this.on("connect",(async(n,i)=>{if(n)throw n;if(t.peerMeta){const t=i.params[0].peerMeta.name;e.peerName=t}try{const n=await fetch(`${t.url}/new`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!(await n.json()).success)throw Error("Failed to register in Push Server")}catch(n){throw Error("Failed to register in Push Server")}}))}},yt=256,vt=256,wt="AES-CBC",bt=`SHA-${yt}`,xt="HMAC",St="encrypt",At="decrypt",Ct="sign",kt="verify";async function It(t,e=wt){return U.getSubtleCrypto().importKey("raw",t,function(t){return t===wt?{length:yt,name:wt}:{hash:{name:bt},name:xt}}(e),!0,function(t){return t===wt?[St,At]:[Ct,kt]}(e))}async function Et(t,e){const n=await async function(t,e){const n=U.getSubtleCrypto(),i=await It(t,xt),r=await n.sign({length:vt,name:xt},i,e);return new Uint8Array(r)}(t,e);return n}async function _t(t){const e=function(t){return U.getBrowerCrypto().getRandomValues(new Uint8Array(t))}((t||256)/8);return L(F(e)).buffer}async function Mt(t,e){const n=V(t.data),i=V(t.iv),r=R(V(t.hmac),!1),a=G(n,i),o=R(await Et(e,a),!1);return O(r)===O(o)}async function Dt(t,e,n){const i=L(H(e)),r=L(H(n||await _t(128))),a=R(r,!1),o=L(z(JSON.stringify(t))),s=await function(t,e,n){return async function(t,e,n){const i=U.getSubtleCrypto(),r=await It(e,wt),a=await i.encrypt({iv:t,name:wt},r,n);return new Uint8Array(a)}(t,e,n)}(r,i,o),l=R(s,!1),c=G(s,r);return{data:l,hmac:R(await Et(i,c),!1),iv:a}}async function Pt(t,e){const n=L(H(e));if(!n)throw new Error("Missing key: required for decryption");if(!await Mt(t,n))return null;const i=V(t.data),r=V(t.iv),a=N(await function(t,e,n){return async function(t,e,n){const i=U.getSubtleCrypto(),r=await It(e,wt),a=await i.decrypt({iv:t,name:wt},r,n);return new Uint8Array(a)}(t,e,n)}(r,n,i));let o;try{o=JSON.parse(a)}catch(t){return null}return o}const Tt=class extends ft{constructor(t,e){super({cryptoLib:i,connectorOpts:t,pushServerOpts:e})}}},1899:(t,e,n)=>{"use strict";n.r(e),n.d(e,{PeraWalletConnect:()=>i.k,closePeraWalletSignTxnToast:()=>i.l});var i=n(4256);n(1704),n(3899),n(6880)},2042:(t,e,n)=>{"use strict";n.r(e),n.d(e,{DeflyWalletConnect:()=>i.h,closeDeflyWalletSignTxnToast:()=>i.j}),n(8287);var i=n(7425);n(1704),n(3899),n(6880)},2063:(t,e,n)=>{"use strict";e.g=void 0;const i=n(8196);e.g=function(){let t,e;try{t=i.getDocumentOrThrow(),e=i.getLocationOrThrow()}catch(t){return null}function n(...e){const n=t.getElementsByTagName("meta");for(let t=0;t<n.length;t++){const i=n[t],r=["itemprop","property","name"].map((t=>i.getAttribute(t))).filter((t=>!!t&&e.includes(t)));if(r.length&&r){const t=i.getAttribute("content");if(t)return t}}return""}const r=function(){let e=n("name","og:site_name","og:title","twitter:title");return e||(e=t.title),e}();return{description:n("description","og:description","twitter:description","keywords"),url:e.origin,icons:function(){const n=t.getElementsByTagName("link"),i=[];for(let t=0;t<n.length;t++){const r=n[t],a=r.getAttribute("rel");if(a&&a.toLowerCase().indexOf("icon")>-1){const t=r.getAttribute("href");if(t)if(-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let n=e.protocol+"//"+e.host;if(0===t.indexOf("/"))n+=t;else{const i=e.pathname.split("/");i.pop(),n+=i.join("/")+"/"+t}i.push(n)}else if(0===t.indexOf("//")){const n=e.protocol+t;i.push(n)}else i.push(t)}}return i}(),name:r}}},3899:(t,e,n)=>{"use strict";n.d(e,{Ay$:()=>Xl});var i={};n.r(i),n.d(i,{Account:()=>si,AccountApplicationResponse:()=>li,AccountAssetHolding:()=>ci,AccountAssetResponse:()=>hi,AccountAssetsInformationResponse:()=>di,AccountParticipation:()=>ui,AccountStateDelta:()=>pi,AppCallLogs:()=>mi,Application:()=>gi,ApplicationInitialStates:()=>fi,ApplicationKVStorage:()=>yi,ApplicationLocalReference:()=>vi,ApplicationLocalState:()=>wi,ApplicationParams:()=>bi,ApplicationStateOperation:()=>xi,ApplicationStateSchema:()=>Si,Asset:()=>Ai,AssetHolding:()=>Ci,AssetHoldingReference:()=>ki,AssetParams:()=>Ii,AvmKeyValue:()=>Ei,AvmValue:()=>_i,BlockHashResponse:()=>Mi,BlockLogsResponse:()=>Di,BlockResponse:()=>Pi,BlockTxidsResponse:()=>Ti,Box:()=>Li,BoxDescriptor:()=>Bi,BoxReference:()=>Fi,BoxesResponse:()=>Ri,BuildVersion:()=>Ni,CompileResponse:()=>Vi,DisassembleResponse:()=>zi,DryrunRequest:()=>Gi,DryrunResponse:()=>Wi,DryrunSource:()=>Oi,DryrunState:()=>Zi,DryrunTxnResult:()=>Yi,ErrorResponse:()=>Hi,EvalDelta:()=>ji,EvalDeltaKeyValue:()=>Xi,GetBlockTimeStampOffsetResponse:()=>Ui,GetSyncRoundResponse:()=>Ki,KvDelta:()=>Ji,LedgerStateDeltaForTransactionGroup:()=>qi,LightBlockHeaderProof:()=>$i,NodeStatusResponse:()=>Qi,PendingTransactionResponse:()=>tr,PendingTransactionsResponse:()=>er,PostTransactionsResponse:()=>nr,ScratchChange:()=>ir,SimulateInitialStates:()=>rr,SimulateRequest:()=>ar,SimulateRequestTransactionGroup:()=>or,SimulateResponse:()=>sr,SimulateTraceConfig:()=>lr,SimulateTransactionGroupResult:()=>cr,SimulateTransactionResult:()=>hr,SimulateUnnamedResourcesAccessed:()=>dr,SimulationEvalOverrides:()=>ur,SimulationOpcodeTraceUnit:()=>pr,SimulationTransactionExecTrace:()=>mr,StateProof:()=>gr,StateProofMessage:()=>fr,SupplyResponse:()=>yr,TealKeyValue:()=>vr,TealValue:()=>wr,TransactionGroupLedgerStateDeltasForRoundResponse:()=>br,TransactionParametersResponse:()=>xr,TransactionProofResponse:()=>Sr,Version:()=>Ar});var r={};n.r(r),n.d(r,{Account:()=>ua,AccountParticipation:()=>pa,AccountResponse:()=>ma,AccountStateDelta:()=>ga,AccountsResponse:()=>fa,Application:()=>ya,ApplicationLocalState:()=>va,ApplicationLocalStatesResponse:()=>wa,ApplicationLogData:()=>ba,ApplicationLogsResponse:()=>xa,ApplicationParams:()=>Sa,ApplicationResponse:()=>Aa,ApplicationStateSchema:()=>Ca,ApplicationsResponse:()=>ka,Asset:()=>Ia,AssetBalancesResponse:()=>Ea,AssetHolding:()=>_a,AssetHoldingsResponse:()=>Ma,AssetParams:()=>Da,AssetResponse:()=>Pa,AssetsResponse:()=>Ta,Block:()=>La,BlockHeadersResponse:()=>Ba,BlockRewards:()=>Fa,BlockUpgradeState:()=>Ra,BlockUpgradeVote:()=>Na,Box:()=>Va,BoxDescriptor:()=>za,BoxesResponse:()=>Ga,ErrorResponse:()=>Wa,EvalDelta:()=>Oa,EvalDeltaKeyValue:()=>Za,HashFactory:()=>Ya,HbProofFields:()=>Ha,HealthCheck:()=>ja,IndexerStateProofMessage:()=>Xa,MerkleArrayProof:()=>Ua,MiniAssetHolding:()=>Ka,ParticipationUpdates:()=>Ja,StateProofFields:()=>qa,StateProofParticipant:()=>$a,StateProofReveal:()=>Qa,StateProofSigSlot:()=>to,StateProofSignature:()=>eo,StateProofTracking:()=>no,StateProofVerifier:()=>io,StateSchema:()=>ro,TealKeyValue:()=>ao,TealValue:()=>oo,Transaction:()=>so,TransactionApplication:()=>lo,TransactionAssetConfig:()=>co,TransactionAssetFreeze:()=>ho,TransactionAssetTransfer:()=>uo,TransactionHeartbeat:()=>po,TransactionKeyreg:()=>mo,TransactionPayment:()=>go,TransactionResponse:()=>fo,TransactionSignature:()=>yo,TransactionSignatureLogicsig:()=>vo,TransactionSignatureMultisig:()=>wo,TransactionSignatureMultisigSubsignature:()=>bo,TransactionStateProof:()=>xo,TransactionsResponse:()=>So});var a={};n.r(a),n.d(a,{ABIAddressType:()=>vl,ABIArrayDynamicType:()=>Al,ABIArrayStaticType:()=>Sl,ABIBoolType:()=>wl,ABIByteType:()=>bl,ABIContract:()=>Bl,ABIInterface:()=>Fl,ABIMethod:()=>Tl,ABIReferenceType:()=>_l,ABIStringType:()=>xl,ABITransactionType:()=>El,ABITupleType:()=>Cl,ABIType:()=>gl,ABIUfixedType:()=>yl,ABIUintType:()=>fl,ADDR_BYTE_SIZE:()=>cl,ALGORAND_ZERO_ADDRESS_STRING:()=>W,AccountBaseData:()=>qn,AccountData:()=>$n,AccountDeltas:()=>ti,AccountTotals:()=>ai,Address:()=>Y,AlgoCount:()=>ri,Algodv2:()=>ha,AppLocalState:()=>Wn,AppLocalStateDelta:()=>On,AppParams:()=>Gn,AppParamsDelta:()=>Zn,AppResourceRecord:()=>Yn,ApplyData:()=>Ln,AssetHolding:()=>Hn,AssetHoldingDelta:()=>jn,AssetParams:()=>Xn,AssetParamsDelta:()=>Un,AssetResourceRecord:()=>Kn,AtomicTransactionComposer:()=>zl,AtomicTransactionComposerStatus:()=>Nl,BalanceRecord:()=>Qn,Block:()=>Rn,BlockHeader:()=>Dn,ENCODED_MULTISIG_SCHEMA:()=>ln,ENCODED_SUBSIG_SCHEMA:()=>an,ERROR_INVALID_MICROALGOS:()=>jl,ERROR_MULTISIG_BAD_SENDER:()=>Hl,EvalDelta:()=>Tn,FalconSignatureStruct:()=>Ee,FalconVerifier:()=>Ie,HashFactory:()=>Se,INVALID_MICROALGOS_ERROR_MSG:()=>q,IncludedTransactions:()=>ni,Indexer:()=>Ho,IntDecoding:()=>h,Kmd:()=>da,KvValueDelta:()=>ei,LENGTH_ENCODE_BYTE_SIZE:()=>ul,LedgerStateDelta:()=>oi,LogicSig:()=>mn,LogicSigAccount:()=>gn,MAX_LEN:()=>ll,MULTISIG_BAD_SENDER_ERROR_MSG:()=>Wl,MerkleArrayProof:()=>Ae,MerkleSignatureVerifier:()=>Ce,ModifiedCreatable:()=>ii,OnApplicationComplete:()=>Jt,Participant:()=>ke,ParticipationUpdates:()=>Mn,ProgramSourceMap:()=>Ps,Reveal:()=>Me,RewardState:()=>In,SINGLE_BOOL_SIZE:()=>dl,SINGLE_BYTE_SIZE:()=>hl,SignedTransaction:()=>xn,SignedTxnInBlock:()=>Fn,SignedTxnWithAD:()=>Bn,SigslotCommit:()=>_e,StateProof:()=>De,StateProofMessage:()=>Pe,StateProofTrackingData:()=>Cn,StateSchema:()=>zn,TealValue:()=>Vn,Transaction:()=>je,TransactionType:()=>Kt,TxnCommitments:()=>kn,UntypedValue:()=>Nn,UpgradeState:()=>En,UpgradeVote:()=>_n,ValueDelta:()=>Pn,VotingData:()=>Jn,abiCheckTransactionType:()=>Dl,abiTypeIsReference:()=>Pl,abiTypeIsTransaction:()=>Ml,algosToMicroalgos:()=>Q,appendSignMultisigTransaction:()=>Is,appendSignRawMultisigSignature:()=>Es,assignGroupID:()=>ds,base64ToBytes:()=>L,bigIntToBytes:()=>Xo,bytesToBase64:()=>B,bytesToBigInt:()=>Uo,bytesToHex:()=>N,bytesToString:()=>F,coerceToBytes:()=>R,computeGroupID:()=>hs,createDryrun:()=>Bs,createMultisigTransaction:()=>xs,decodeAddress:()=>H,decodeJSON:()=>ee,decodeMsgpack:()=>Qt,decodeObj:()=>Yt,decodeSignedTransaction:()=>Sn,decodeUint64:()=>T,decodeUnsignedTransaction:()=>Ue,dryrunTxnResultAppTrace:()=>zs,dryrunTxnResultLogicSigTrace:()=>Gs,encodeAddress:()=>X,encodeJSON:()=>ne,encodeMsgpack:()=>te,encodeObj:()=>Wt,encodeUint64:()=>P,encodeUnsignedSimulateTransaction:()=>An,encodeUnsignedTransaction:()=>Xe,encodedMultiSigFromEncodingData:()=>cn,encodedMultiSigToEncodingData:()=>hn,encodedSubsigFromEncodingData:()=>on,encodedSubsigToEncodingData:()=>sn,generateAccount:()=>Ko,getApplicationAddress:()=>K,getMethodByName:()=>Ll,hexToBytes:()=>V,indexerModels:()=>r,isOnApplicationComplete:()=>xe,isTransactionType:()=>be,isTransactionWithSigner:()=>sl,isValidAddress:()=>j,logicSigFromByte:()=>fn,makeApplicationCallTxnFromObject:()=>Ks,makeApplicationClearStateTxnFromObject:()=>el,makeApplicationCloseOutTxnFromObject:()=>tl,makeApplicationCreateTxnFromObject:()=>Js,makeApplicationDeleteTxnFromObject:()=>$s,makeApplicationNoOpTxnFromObject:()=>nl,makeApplicationOptInTxnFromObject:()=>Qs,makeApplicationUpdateTxnFromObject:()=>qs,makeAssetConfigTxnWithSuggestedParamsFromObject:()=>Hs,makeAssetCreateTxnWithSuggestedParamsFromObject:()=>Ys,makeAssetDestroyTxnWithSuggestedParamsFromObject:()=>js,makeAssetFreezeTxnWithSuggestedParamsFromObject:()=>Xs,makeAssetTransferTxnWithSuggestedParamsFromObject:()=>Us,makeBaseAssetConfigTxn:()=>Zs,makeBasicAccountTransactionSigner:()=>il,makeEmptyTransactionSigner:()=>ol,makeKeyRegistrationTxnWithSuggestedParamsFromObject:()=>Os,makeLogicSigAccountTransactionSigner:()=>rl,makeMultiSigAccountTransactionSigner:()=>al,makePaymentTxnWithSuggestedParamsFromObject:()=>Ws,masterDerivationKeyToMnemonic:()=>ss,mergeMultisigTransactions:()=>Cs,microalgosToAlgos:()=>$,mnemonicFromSeed:()=>ns,mnemonicToMasterDerivationKey:()=>os,mnemonicToSecretKey:()=>rs,modelsv2:()=>i,msgpackRawDecode:()=>Zt,msgpackRawDecodeAsMap:()=>Ht,msgpackRawEncode:()=>Gt,multisigAddress:()=>rn,parseJSON:()=>u,secretKeyToMnemonic:()=>as,seedFromMnemonic:()=>is,signBytes:()=>Zl,signLogicSigTransaction:()=>ps,signLogicSigTransactionObject:()=>us,signMultisigTransaction:()=>ks,signTransaction:()=>Ol,stringifyJSON:()=>p,tealSign:()=>vn,tealSignFromProgram:()=>bn,verifyBytes:()=>Yl,verifyMultisig:()=>nn,verifyTealSign:()=>wn,waitForConfirmation:()=>jo});var o,s=n(8947),l=n(4462),c=n(1013);!function(t){t.UNSAFE="unsafe",t.SAFE="safe",t.MIXED="mixed",t.BIGINT="bigint"}(o||(o={}));const h=o,d=c({useNativeBigInt:!0,strict:!0});function u(t,{intDecoding:e}){if(e!==h.SAFE&&e!==h.UNSAFE&&e!==h.BIGINT&&e!==h.MIXED)throw new Error(`Invalid intDecoding option: ${e}`);return d.parse(t,((t,n)=>{if(null!=n&&"object"==typeof n&&null==Object.getPrototypeOf(n)&&Object.setPrototypeOf(n,Object.prototype),"bigint"==typeof n){if(e===h.SAFE&&n>Number.MAX_SAFE_INTEGER)throw new Error(`Integer exceeds maximum safe integer: ${n.toString()}. Try parsing with a different intDecoding option.`);return e===h.BIGINT||e===h.MIXED&&n>Number.MAX_SAFE_INTEGER?n:Number(n)}return"number"==typeof n&&e===h.BIGINT&&Number.isInteger(n)?BigInt(n):n}))}function p(t,e,n){return d.stringify(t,e,n)}function m(t,e){return t.length===e.length&&Array.from(t).every(((t,n)=>t===e[n]))}function g(...t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let i=0;for(let e=0;e<t.length;e++)n.set(t[e],i),i+=t[e].length;return n}function f(){return"object"==typeof process&&"object"==typeof process.versions&&void 0!==process.versions.node}function y(t){if(void 0===t)throw new Error("Value is undefined");if("bigint"==typeof t){if(t>BigInt(Number.MAX_SAFE_INTEGER)||t<BigInt(Number.MIN_SAFE_INTEGER))throw new Error(`BigInt value ${t} is not a safe integer`);return Number(t)}if("number"==typeof t){if(Number.isSafeInteger(t))return t;throw new Error(`Value ${t} is not a safe integer`)}throw new Error(`Unexpected type ${typeof t}, ${t}`)}function v(t){const e=y(t);if(e<0)throw new Error(`Value ${e} is negative`);return e}function w(t){if(void 0===t)throw new Error("Value is undefined");if("bigint"==typeof t)return t;if("number"==typeof t){if(!Number.isSafeInteger(t))throw new Error(`Value ${t} is not a safe integer`);return BigInt(t)}throw new Error(`Unexpected type ${typeof t}, ${t}`)}function b(t){const e=w(t);if(e<0||e>BigInt("0xffffffffffffffff"))throw new Error(`Value ${e} is not a uint64`);return e}function x(t){return l.sha512_256.array(t)}function S(t){return s.sign.keyPair.fromSeed(t)}function A(t){return t===s.sign.signatureLength}function C(t){return s.sign.keyPair.fromSecretKey(t)}function k(t,e){return s.sign.detached(t,e)}function I(t,e){return s.verify(t,e)}function E(t,e,n){return s.sign.detached.verify(t,e,n)}const _=s.sign.publicKeyLength,M=(s.sign.secretKeyLength,32);var D=n(5818);function P(t){if("bigint"!=typeof t&&!Number.isInteger(t)||t<0||t>BigInt("0xffffffffffffffff"))throw new Error("Input is not a 64-bit unsigned integer");const e=new Uint8Array(8);return new DataView(e.buffer).setBigUint64(0,BigInt(t)),e}function T(t,e="safe"){if("safe"!==e&&"mixed"!==e&&"bigint"!==e)throw new Error(`Unknown decodingMode option: ${e}`);if(0===t.byteLength||t.byteLength>8)throw new Error(`Data has unacceptable length. Expected length is between 1 and 8, got ${t.byteLength}`);const n=g(new Uint8Array(8-t.byteLength),t),i=new DataView(n.buffer).getBigUint64(0),r=i>BigInt(Number.MAX_SAFE_INTEGER);if("safe"===e){if(r)throw new Error(`Integer exceeds maximum safe integer: ${i.toString()}. Try decoding with "mixed" or "safe" decodingMode.`);return Number(i)}return"mixed"!==e||r?i:Number(i)}function L(t){if(f())return new Uint8Array(Buffer.from(t,"base64"));const e=atob(t);return Uint8Array.from(e,(t=>t.codePointAt(0)))}function B(t){if(f())return Buffer.from(t).toString("base64");const e=Array.from(t,(t=>String.fromCodePoint(t))).join("");return btoa(e)}function F(t){return(new TextDecoder).decode(t)}function R(t){return"string"==typeof t?(new TextEncoder).encode(t):t}function N(t){return f()?Buffer.from(t).toString("hex"):Array.from(t).map((t=>t.toString(16).padStart(2,"0"))).join("")}function V(t){if(f())return Buffer.from(t,"hex");let e=t;t.length%2!=0&&(e=t.padStart(1,"0"));const n=new Uint8Array(e.length/2);for(let t=0;t<e.length/2;t++)n[t]=parseInt(e.slice(2*t,2*t+2),16);return n}const z=36,G=4,W="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ",O="address seems to be malformed";function Z(t){return Uint8Array.from(x(t).slice(32-G,32))}class Y{constructor(t){if(!(t instanceof Uint8Array))throw new Error(`${O}: ${t} is not Uint8Array, type ${typeof t}`);if(t.length!==z-G)throw new Error(`${O}: 0x${N(t)}, length ${t.length}`);this.publicKey=t}equals(t){return t instanceof Y&&m(this.publicKey,t.publicKey)}checksum(){return Z(this.publicKey)}toString(){return D.encode(g(this.publicKey,this.checksum())).slice(0,58)}static fromString(t){if("string"!=typeof t)throw new Error(`${O}: expected string, got ${typeof t}, ${t}`);if(58!==t.length)throw new Error(`${O}: expected length 58, got ${t.length}: ${t}`);const e=D.decode.asBytes(t);if(e.length!==z)throw new Error(`${O}: expected byte length ${z}, got ${e.length}`);const n=new Uint8Array(e.slice(0,z-G)),i=new Uint8Array(e.slice(_,z));if(!m(Z(n),i))throw new Error("wrong checksum for address");return new Y(n)}static zeroAddress(){return new Y(new Uint8Array(z-G))}}function H(t){return Y.fromString(t)}function j(t){try{Y.fromString(t)}catch(t){return!1}return!0}function X(t){return new Y(t).toString()}const U=(new TextEncoder).encode("appID");function K(t){const e=x(g(U,P(t)));return new Y(Uint8Array.from(e))}const J=1e6,q="Microalgos should be positive and less than 2^53 - 1.";function $(t){if(t<0||!Number.isSafeInteger(t))throw new Error(q);return t/J}function Q(t){const e=t*J;return Math.round(e)}class tt extends Error{constructor(t,e){super(t),this.response=e,this.name="URLTokenBaseHTTPError",this.response=e}}class et{constructor(t,e,n,i={}){this.defaultHeaders=i;const r=e.endsWith("/")?e:`${e}/`,a=new URL(r);if(void 0!==n&&(a.port=n.toString()),0===a.protocol.length)throw new Error("Invalid base server URL, protocol must be defined.");this.baseURL=a,this.tokenHeader=t}getURL(t,e){let n;n=t.startsWith("./")?t:t.startsWith("/")?`.${t}`:`./${t}`;const i=new URL(n,this.baseURL);if(e)for(const[t,n]of Object.entries(e))i.searchParams.set(t,n.toString());return i.toString()}static formatFetchResponseHeaders(t){const e={};return t.forEach(((t,n)=>{e[t]=n})),e}static async checkHttpError(t){if(t.ok)return;let e,n;try{e=new Uint8Array(await t.arrayBuffer());const i=JSON.parse((new TextDecoder).decode(e));i.message&&(n=i.message)}catch(t){}let i=`Network request error. Received status ${t.status} (${t.statusText})`;throw n&&(i+=`: ${n}`),new tt(i,{body:e??new Uint8Array,status:t.status,headers:et.formatFetchResponseHeaders(t.headers)})}static async formatFetchResponse(t){return await this.checkHttpError(t),{body:new Uint8Array(await t.arrayBuffer()),status:t.status,headers:et.formatFetchResponseHeaders(t.headers)}}async get(t,e,n,i){const r={...this.tokenHeader,...this.defaultHeaders,...n??{}},a=await fetch(this.getURL(t,e),{headers:r,...i??{}});return et.formatFetchResponse(a)}async post(t,e,n,i,r){const a={...this.tokenHeader,...this.defaultHeaders,...i??{}},o=await fetch(this.getURL(t,n),{method:"POST",body:e,headers:a,...r??{}});return et.formatFetchResponse(o)}async delete(t,e,n,i,r){const a={...this.tokenHeader,...this.defaultHeaders,...i??{}},o=await fetch(this.getURL(t,n),{method:"DELETE",body:e,headers:a,...r??{}});return et.formatFetchResponse(o)}}class nt{constructor(t){this.body=t.body,this.text=t.text,this.format=t.format,this.headers=t.headers,this.status=t.status,this.ok=t.ok}getJSONText(){if(void 0===this.text)throw new Error(`Response body does not contain JSON data. Format is ${this.format}`);return this.text}parseBodyAsJSON(t){if(void 0===this.text)throw new Error(`Response body does not contain JSON data. Format is ${this.format}`);return rt.parseJSON(this.text,this.status,t)}}function it(t){return Object.keys(t).reduce(((e,n)=>(e[n.toLowerCase()]=t[n],e)),{})}class rt{constructor(t,e,n,i={}){this.bc=void 0!==e?new et(t,e,n,i):t}static parseJSON(t,e,n){try{return t?u(t,n):null}catch(n){const i=n;throw i.rawResponse=t||null,i.statusCode=e,i}}static serializeData(t,e){if(!t)return new Uint8Array(0);if("application/json"===e["content-type"])return(new TextEncoder).encode(p(t));if("string"==typeof t)return(new TextEncoder).encode(t);if(t instanceof Uint8Array)return t;throw new Error("provided data is neither a string nor a Uint8Array and content-type is not application/json")}static prepareResponse(t,e){const{body:n}=t;let i;return"application/msgpack"!==e&&(i=n&&(new TextDecoder).decode(n)||""),new nt({...t,format:e,text:i,ok:2===Math.trunc(t.status/100)})}static prepareResponseError(t){return t.response&&(t.response=rt.prepareResponse(t.response,"application/json"),t.status=t.response.status),t}async get({relativePath:t,query:e,requestHeaders:n,customOptions:i}){const r=function(t){return void 0!==t&&Object.prototype.hasOwnProperty.call(t,"format")&&"msgpack"===t.format?"application/msgpack":"application/json"}(e),a={...n??{},accept:r};try{const n=await this.bc.get(t,e?function(t){for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]&&0!==t[e].length||delete t[e]);return t}(e):void 0,a,i);return rt.prepareResponse(n,r)}catch(t){throw rt.prepareResponseError(t)}}async post({relativePath:t,data:e,query:n,requestHeaders:i,customOptions:r}){const a={"content-type":"application/json",...it(i??{})};try{const i=await this.bc.post(t,rt.serializeData(e,a),n,a,r);return rt.prepareResponse(i,"application/json")}catch(t){throw rt.prepareResponseError(t)}}async delete({relativePath:t,data:e,requestHeaders:n,customOptions:i}){const r={"content-type":"application/json",...it(n??{})};try{const n=await this.bc.delete(t,void 0!==e?rt.serializeData(e,r):void 0,void 0,r,i);return rt.prepareResponse(n,"application/json")}catch(t){throw rt.prepareResponseError(t)}}}class at{constructor(t,e,n,i,r={}){if("function"==typeof e.get)this.c=new rt(e);else{let a;a="string"==typeof e?function(t,e=""){const n={};return""===e||(n[t]=e),n}(t,e):e,this.c=new rt(a,n,i,r)}}}var ot=new TextEncoder;function st(t,e,n){for(var i=e,r=i+n,a=[],o="";i<r;){var s=t[i++];if(128&s)if(192==(224&s)){var l=63&t[i++];a.push((31&s)<<6|l)}else if(224==(240&s)){l=63&t[i++];var c=63&t[i++];a.push((31&s)<<12|l<<6|c)}else if(240==(248&s)){var h=(7&s)<<18|(l=63&t[i++])<<12|(c=63&t[i++])<<6|63&t[i++];h>65535&&(h-=65536,a.push(h>>>10&1023|55296),h=56320|1023&h),a.push(h)}else a.push(s);else a.push(s);a.length>=4096&&(o+=String.fromCharCode.apply(String,a),a.length=0)}return a.length>0&&(o+=String.fromCharCode.apply(String,a)),o}var lt=new TextDecoder;var ct,ht,dt=function(t,e){this.type=t,this.data=e},ut=(ct=function(t,e){return ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},ct(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ct(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),pt=function(t){function e(n){var i=t.call(this,n)||this,r=Object.create(e.prototype);return Object.setPrototypeOf(i,r),Object.defineProperty(i,"name",{configurable:!0,enumerable:!1,value:e.name}),i}return ut(e,t),e}(Error);!function(t){t[t.UNSAFE_NUMBER=0]="UNSAFE_NUMBER",t[t.SAFE_NUMBER=1]="SAFE_NUMBER",t[t.AS_ENCODED=2]="AS_ENCODED",t[t.MIXED=3]="MIXED",t[t.BIGINT=4]="BIGINT"}(ht||(ht={}));var mt=4294967295;function gt(t,e,n){var i=Math.floor(n/4294967296),r=n;t.setUint32(e,i),t.setUint32(e+4,r)}function ft(t,e,n){if(n===ht.UNSAFE_NUMBER||n===ht.SAFE_NUMBER){var i=t.getInt32(e),r=t.getUint32(e+4);if(n===ht.SAFE_NUMBER&&(i<Math.floor(Number.MIN_SAFE_INTEGER/4294967296)||i===Math.floor(Number.MIN_SAFE_INTEGER/4294967296)&&0===r||i>(Number.MAX_SAFE_INTEGER-r)/4294967296)){var a="".concat(i<0?"-":"","0x").concat(Math.abs(i).toString(16)).concat(r.toString(16).padStart(8,"0"));throw new Error("Mode is IntMode.SAFE_NUMBER and value is not a safe integer: ".concat(a))}return 4294967296*i+r}var o=t.getBigInt64(e);return n===ht.MIXED&&o>=Number.MIN_SAFE_INTEGER&&o<=Number.MAX_SAFE_INTEGER?Number(o):o}var yt={type:-1,encode:function(t){var e,n,i,r;return t instanceof Date?function(t){var e,n=t.sec,i=t.nsec;if(n>=0&&i>=0&&n<=17179869183){if(0===i&&n<=4294967295){var r=new Uint8Array(4);return(e=new DataView(r.buffer)).setUint32(0,n),r}var a=n/4294967296,o=4294967295&n;return r=new Uint8Array(8),(e=new DataView(r.buffer)).setUint32(0,i<<2|3&a),e.setUint32(4,o),r}return r=new Uint8Array(12),(e=new DataView(r.buffer)).setUint32(0,i),gt(e,4,n),r}((i=1e6*((e=t.getTime())-1e3*(n=Math.floor(e/1e3))),{sec:n+(r=Math.floor(i/1e9)),nsec:i-1e9*r})):null},decode:function(t){var e=function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:var n=e.getUint32(0);return{sec:4294967296*(3&n)+e.getUint32(4),nsec:n>>>2};case 12:return{sec:ft(e,4,ht.UNSAFE_NUMBER),nsec:e.getUint32(0)};default:throw new pt("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(t.length))}}(t);return new Date(1e3*e.sec+e.nsec/1e6)}},vt=function(){function t(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(yt)}return t.prototype.register=function(t){var e=t.type,n=t.encode,i=t.decode;if(e>=0)this.encoders[e]=n,this.decoders[e]=i;else{var r=1+e;this.builtInEncoders[r]=n,this.builtInDecoders[r]=i}},t.prototype.tryToEncode=function(t,e){for(var n=0;n<this.builtInEncoders.length;n++)if(null!=(i=this.builtInEncoders[n])&&null!=(r=i(t,e)))return new dt(-1-n,r);for(n=0;n<this.encoders.length;n++){var i,r;if(null!=(i=this.encoders[n])&&null!=(r=i(t,e)))return new dt(n,r)}return t instanceof dt?t:null},t.prototype.decode=function(t,e,n){var i=e<0?this.builtInDecoders[-1-e]:this.decoders[e];return i?i(t,e,n):new dt(e,t)},t.defaultCodec=new t,t}();function wt(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):t instanceof ArrayBuffer?new Uint8Array(t):Uint8Array.from(t)}function bt(t,e){for(var n=Math.min(t.length,e.length),i=0;i<n;i++){var r=t[i]-e[i];if(0!==r)return r}return t.length-e.length}var xt=function(t){if(this.rawBinaryValue=t,!ArrayBuffer.isView(t))throw new TypeError("RawBinaryString: rawBinaryValue must be an ArrayBufferView")},St=function(){function t(t){var e,n,i,r,a,o,s,l;this.extensionCodec=null!==(e=null==t?void 0:t.extensionCodec)&&void 0!==e?e:vt.defaultCodec,this.context=null==t?void 0:t.context,this.forceBigIntToInt64=null!==(n=null==t?void 0:t.forceBigIntToInt64)&&void 0!==n&&n,this.maxDepth=null!==(i=null==t?void 0:t.maxDepth)&&void 0!==i?i:100,this.initialBufferSize=null!==(r=null==t?void 0:t.initialBufferSize)&&void 0!==r?r:2048,this.sortKeys=null!==(a=null==t?void 0:t.sortKeys)&&void 0!==a&&a,this.forceFloat32=null!==(o=null==t?void 0:t.forceFloat32)&&void 0!==o&&o,this.ignoreUndefined=null!==(s=null==t?void 0:t.ignoreUndefined)&&void 0!==s&&s,this.forceIntegerToFloat=null!==(l=null==t?void 0:t.forceIntegerToFloat)&&void 0!==l&&l,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}return t.prototype.reinitializeState=function(){this.pos=0},t.prototype.encodeSharedRef=function(t){return this.reinitializeState(),this.doEncode(t,1),this.bytes.subarray(0,this.pos)},t.prototype.encode=function(t){return this.reinitializeState(),this.doEncode(t,1),this.bytes.slice(0,this.pos)},t.prototype.doEncode=function(t,e){if(e>this.maxDepth)throw new Error("Too deep objects in depth ".concat(e));null==t?this.encodeNil():"boolean"==typeof t?this.encodeBoolean(t):"number"==typeof t?this.encodeNumber(t):"string"==typeof t?this.encodeString(t):this.encodeObject(t,e)},t.prototype.ensureBufferSizeToWrite=function(t){var e=this.pos+t;this.view.byteLength<e&&this.resizeBuffer(2*e)},t.prototype.resizeBuffer=function(t){var e=new ArrayBuffer(t),n=new Uint8Array(e),i=new DataView(e);n.set(this.bytes),this.view=i,this.bytes=n},t.prototype.encodeNil=function(){this.writeU8(192)},t.prototype.encodeBoolean=function(t){!1===t?this.writeU8(194):this.writeU8(195)},t.prototype.encodeNumber=function(t){!this.forceIntegerToFloat&&Number.isSafeInteger(t)?t>=0?t<128?this.writeU8(t):t<256?(this.writeU8(204),this.writeU8(t)):t<65536?(this.writeU8(205),this.writeU16(t)):t<4294967296?(this.writeU8(206),this.writeU32(t)):(this.writeU8(207),this.writeU64(t)):t>=-32?this.writeU8(224|t+32):t>=-128?(this.writeU8(208),this.writeI8(t)):t>=-32768?(this.writeU8(209),this.writeI16(t)):t>=-2147483648?(this.writeU8(210),this.writeI32(t)):(this.writeU8(211),this.writeI64(t)):this.encodeNumberAsFloat(t)},t.prototype.encodeNumberAsFloat=function(t){this.forceFloat32?(this.writeU8(202),this.writeF32(t)):(this.writeU8(203),this.writeF64(t))},t.prototype.encodeBigInt=function(t){if(this.forceBigIntToInt64)this.encodeBigIntAsInt64(t);else if(t>=0)if(t<4294967296||this.forceIntegerToFloat)this.encodeNumber(Number(t));else{if(!(t<BigInt("0x10000000000000000")))throw new Error("Bigint is too large for uint64: ".concat(t));this.encodeBigIntAsInt64(t)}else if(t>=-2147483648||this.forceIntegerToFloat)this.encodeNumber(Number(t));else{if(!(t>=BigInt(-1)*BigInt("0x8000000000000000")))throw new Error("Bigint is too small for int64: ".concat(t));this.encodeBigIntAsInt64(t)}},t.prototype.encodeBigIntAsInt64=function(t){t>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(t)):(this.writeU8(211),this.writeBigInt64(t))},t.prototype.writeStringHeader=function(t){if(t<32)this.writeU8(160+t);else if(t<256)this.writeU8(217),this.writeU8(t);else if(t<65536)this.writeU8(218),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too long string: ".concat(t," bytes in UTF-8"));this.writeU8(219),this.writeU32(t)}},t.prototype.encodeString=function(t){var e,n,i,r=function(t){for(var e=t.length,n=0,i=0;i<e;){var r=t.charCodeAt(i++);if(4294967168&r)if(4294965248&r){if(r>=55296&&r<=56319&&i<e){var a=t.charCodeAt(i);56320==(64512&a)&&(++i,r=((1023&r)<<10)+(1023&a)+65536)}n+=4294901760&r?4:3}else n+=2;else n++}return n}(t);this.ensureBufferSizeToWrite(5+r),this.writeStringHeader(r),e=t,n=this.bytes,i=this.pos,e.length>50?function(t,e,n){ot.encodeInto(t,e.subarray(n))}(e,n,i):function(t,e,n){for(var i=t.length,r=n,a=0;a<i;){var o=t.charCodeAt(a++);if(4294967168&o){if(4294965248&o){if(o>=55296&&o<=56319&&a<i){var s=t.charCodeAt(a);56320==(64512&s)&&(++a,o=((1023&o)<<10)+(1023&s)+65536)}4294901760&o?(e[r++]=o>>18&7|240,e[r++]=o>>12&63|128,e[r++]=o>>6&63|128):(e[r++]=o>>12&15|224,e[r++]=o>>6&63|128)}else e[r++]=o>>6&31|192;e[r++]=63&o|128}else e[r++]=o}}(e,n,i),this.pos+=r},t.prototype.encodeObject=function(t,e){var n=this.extensionCodec.tryToEncode(t,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(t))this.encodeArray(t,e);else if(ArrayBuffer.isView(t))this.encodeBinary(t);else if(t instanceof xt)this.encodeBinaryAsString(t);else if("bigint"==typeof t)this.encodeBigInt(t);else if(t instanceof Map)this.encodeMap(t,e);else{if("object"!=typeof t)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(t)));this.encodeMapObject(t,e)}},t.prototype.encodeBinary=function(t){var e=t.byteLength;if(e<256)this.writeU8(196),this.writeU8(e);else if(e<65536)this.writeU8(197),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too large binary: ".concat(e));this.writeU8(198),this.writeU32(e)}var n=wt(t);this.writeU8a(n)},t.prototype.encodeBinaryAsString=function(t){var e=t.rawBinaryValue;this.writeStringHeader(e.byteLength);var n=wt(e);this.writeU8a(n)},t.prototype.encodeArray=function(t,e){var n=t.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var i=0,r=t;i<r.length;i++){var a=r[i];this.doEncode(a,e+1)}},t.prototype.countWithoutUndefined=function(t,e){for(var n=0,i=0,r=e;i<r.length;i++){var a=r[i];void 0!==t.get(a)&&n++}return n},t.prototype.sortMapKeys=function(t){for(var e=[],n=[],i=[],r=[],a=0,o=t;a<o.length;a++){var s=o[a];if("number"==typeof s){if(isNaN(s))throw new Error("Cannot sort map keys with NaN value");e.push(s)}else if("bigint"==typeof s)e.push(s);else if("string"==typeof s)n.push(s);else if(ArrayBuffer.isView(s))r.push(wt(s));else{if(!(s instanceof xt))throw new Error("Unsupported map key type: ".concat(Object.prototype.toString.apply(s)));i.push(s)}}return e.sort((function(t,e){return t<e?-1:t>e?1:0})),n.sort(),i.sort((function(t,e){return bt(wt(t.rawBinaryValue),wt(e.rawBinaryValue))})),r.sort(bt),[].concat(e,n,i,r)},t.prototype.encodeMapObject=function(t,e){this.encodeMap(new Map(Object.entries(t)),e)},t.prototype.encodeMap=function(t,e){var n=Array.from(t.keys());this.sortKeys&&(n=this.sortMapKeys(n));var i=this.ignoreUndefined?this.countWithoutUndefined(t,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else{if(!(i<4294967296))throw new Error("Too large map object: ".concat(i));this.writeU8(223),this.writeU32(i)}for(var r=0,a=n;r<a.length;r++){var o=a[r],s=t.get(o);if(!this.ignoreUndefined||void 0!==s){if("string"==typeof o)this.encodeString(o);else if("number"==typeof o)this.encodeNumber(o);else if("bigint"==typeof o)this.encodeBigInt(o);else if(ArrayBuffer.isView(o))this.encodeBinary(o);else{if(!(o instanceof xt))throw new Error("Unsupported map key type: ".concat(Object.prototype.toString.apply(o)));this.encodeBinaryAsString(o)}this.doEncode(s,e+1)}}},t.prototype.encodeExtension=function(t){var e=t.data.length;if(1===e)this.writeU8(212);else if(2===e)this.writeU8(213);else if(4===e)this.writeU8(214);else if(8===e)this.writeU8(215);else if(16===e)this.writeU8(216);else if(e<256)this.writeU8(199),this.writeU8(e);else if(e<65536)this.writeU8(200),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too large extension object: ".concat(e));this.writeU8(201),this.writeU32(e)}this.writeI8(t.type),this.writeU8a(t.data)},t.prototype.writeU8=function(t){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,t),this.pos++},t.prototype.writeU8a=function(t){var e=t.length;this.ensureBufferSizeToWrite(e),this.bytes.set(t,this.pos),this.pos+=e},t.prototype.writeI8=function(t){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,t),this.pos++},t.prototype.writeU16=function(t){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,t),this.pos+=2},t.prototype.writeI16=function(t){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,t),this.pos+=2},t.prototype.writeU32=function(t){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,t),this.pos+=4},t.prototype.writeI32=function(t){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,t),this.pos+=4},t.prototype.writeF32=function(t){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,t),this.pos+=4},t.prototype.writeF64=function(t){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,t),this.pos+=8},t.prototype.writeU64=function(t){this.ensureBufferSizeToWrite(8),function(t,e,n){var i=n/4294967296,r=n;t.setUint32(e,i),t.setUint32(e+4,r)}(this.view,this.pos,t),this.pos+=8},t.prototype.writeI64=function(t){this.ensureBufferSizeToWrite(8),gt(this.view,this.pos,t),this.pos+=8},t.prototype.writeBigUint64=function(t){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,t),this.pos+=8},t.prototype.writeBigInt64=function(t){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,t),this.pos+=8},t}();function At(t){return"".concat(t<0?"-":"","0x").concat(Math.abs(t).toString(16).padStart(2,"0"))}var Ct=function(){function t(t,e){void 0===t&&(t=16),void 0===e&&(e=16),this.maxKeyLength=t,this.maxLengthPerKey=e,this.hit=0,this.miss=0,this.caches=[];for(var n=0;n<this.maxKeyLength;n++)this.caches.push([])}return t.prototype.canBeCached=function(t){return t>0&&t<=this.maxKeyLength},t.prototype.find=function(t,e,n){t:for(var i=0,r=this.caches[n-1];i<r.length;i++){for(var a=r[i],o=a.bytes,s=0;s<n;s++)if(o[s]!==t[e+s])continue t;return a.str}return null},t.prototype.store=function(t,e){var n=this.caches[t.length-1],i={bytes:t,str:e};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)},t.prototype.decode=function(t,e,n){var i=this.find(t,e,n);if(null!=i)return this.hit++,i;this.miss++;var r=st(t,e,n),a=Uint8Array.prototype.slice.call(t,e,e+n);return this.store(a,r),r},t}(),kt=function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(t,o)}catch(t){s=[6,t],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},It=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}},Et=function(t){return this instanceof Et?(this.v=t,this):new Et(t)},_t="array",Mt="map_key",Dt="map_value",Pt=function(){function t(t){this.useMap=t,this.stack=[],this.stackHeadPosition=-1}return Object.defineProperty(t.prototype,"length",{get:function(){return this.stackHeadPosition+1},enumerable:!1,configurable:!0}),t.prototype.top=function(){return this.stack[this.stackHeadPosition]},t.prototype.pushArrayState=function(t){var e=this.getUninitializedStateFromPool();e.type=_t,e.position=0,e.size=t,e.array=new Array(t)},t.prototype.pushMapState=function(t){var e=this.getUninitializedStateFromPool();e.type=Mt,e.readCount=0,e.size=t,e.map=this.useMap?new Map:{}},t.prototype.getUninitializedStateFromPool=function(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null})}return this.stack[this.stackHeadPosition]},t.prototype.release=function(t){var e;if(this.stack[this.stackHeadPosition]!==t)throw new Error("Invalid stack state. Released state is not on top of the stack.");t.type===_t&&((e=t).size=0,e.array=void 0,e.position=0,e.type=void 0),t.type!==Mt&&t.type!==Dt||((e=t).size=0,e.map=void 0,e.readCount=0,e.type=void 0),this.stackHeadPosition--},t.prototype.reset=function(){this.stack.length=0,this.stackHeadPosition=-1},t}(),Tt=new DataView(new ArrayBuffer(0)),Lt=new Uint8Array(Tt.buffer);try{Tt.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Bt=RangeError,Ft=new Bt("Insufficient data"),Rt=new Ct,Nt=function(){function t(t){var e,n,i,r,a,o,s,l,c,h,d,u;if(this.totalPos=0,this.pos=0,this.view=Tt,this.bytes=Lt,this.headByte=-1,this.extensionCodec=null!==(e=null==t?void 0:t.extensionCodec)&&void 0!==e?e:vt.defaultCodec,this.context=null==t?void 0:t.context,this.intMode=null!==(n=null==t?void 0:t.intMode)&&void 0!==n?n:(null==t?void 0:t.useBigInt64)?ht.AS_ENCODED:ht.UNSAFE_NUMBER,this.rawBinaryStringValues=null!==(i=null==t?void 0:t.rawBinaryStringValues)&&void 0!==i&&i,this.rawBinaryStringKeys=null!==(r=null==t?void 0:t.rawBinaryStringKeys)&&void 0!==r&&r,this.useRawBinaryStringClass=null!==(a=null==t?void 0:t.useRawBinaryStringClass)&&void 0!==a&&a,this.useMap=null!==(o=null==t?void 0:t.useMap)&&void 0!==o&&o,this.supportObjectNumberKeys=null!==(s=null==t?void 0:t.supportObjectNumberKeys)&&void 0!==s&&s,this.maxStrLength=null!==(l=null==t?void 0:t.maxStrLength)&&void 0!==l?l:mt,this.maxBinLength=null!==(c=null==t?void 0:t.maxBinLength)&&void 0!==c?c:mt,this.maxArrayLength=null!==(h=null==t?void 0:t.maxArrayLength)&&void 0!==h?h:mt,this.maxMapLength=null!==(d=null==t?void 0:t.maxMapLength)&&void 0!==d?d:mt,this.maxExtLength=null!==(u=null==t?void 0:t.maxExtLength)&&void 0!==u?u:mt,this.keyDecoder=void 0!==(null==t?void 0:t.keyDecoder)?t.keyDecoder:Rt,this.rawBinaryStringKeys&&!this.useMap)throw new Error("rawBinaryStringKeys is only supported when useMap is true");this.stack=new Pt(this.useMap)}return t.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1,this.stack.reset()},t.prototype.setBuffer=function(t){this.bytes=wt(t),this.view=function(t){if(t instanceof ArrayBuffer)return new DataView(t);var e=wt(t);return new DataView(e.buffer,e.byteOffset,e.byteLength)}(this.bytes),this.pos=0},t.prototype.appendBuffer=function(t){if(-1!==this.headByte||this.hasRemaining(1)){var e=this.bytes.subarray(this.pos),n=wt(t),i=new Uint8Array(e.length+n.length);i.set(e),i.set(n,e.length),this.setBuffer(i)}else this.setBuffer(t)},t.prototype.hasRemaining=function(t){return this.view.byteLength-this.pos>=t},t.prototype.createExtraByteError=function(t){var e=this.view,n=this.pos;return new RangeError("Extra ".concat(e.byteLength-n," of ").concat(e.byteLength," byte(s) found at buffer[").concat(t,"]"))},t.prototype.decode=function(t){this.reinitializeState(),this.setBuffer(t);var e=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return e},t.prototype.decodeMulti=function(t){return kt(this,(function(e){switch(e.label){case 0:this.reinitializeState(),this.setBuffer(t),e.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}}))},t.prototype.decodeAsync=function(t){var e,n,i,r,a,o,s,l,c,h,d;return l=this,c=void 0,d=function(){var l,c,h,d,u,p,m,g;return kt(this,(function(f){switch(f.label){case 0:l=!1,f.label=1;case 1:f.trys.push([1,6,7,12]),e=!0,n=It(t),f.label=2;case 2:return[4,n.next()];case 3:if(i=f.sent(),r=i.done)return[3,5];if(s=i.value,e=!1,h=s,l)throw this.createExtraByteError(this.totalPos);this.appendBuffer(h);try{c=this.doDecodeSync(),l=!0}catch(t){if(!(t instanceof Bt))throw t}this.totalPos+=this.pos,f.label=4;case 4:return e=!0,[3,2];case 5:return[3,12];case 6:return d=f.sent(),a={error:d},[3,12];case 7:return f.trys.push([7,,10,11]),e||r||!(o=n.return)?[3,9]:[4,o.call(n)];case 8:f.sent(),f.label=9;case 9:return[3,11];case 10:if(a)throw a.error;return[7];case 11:return[7];case 12:if(l){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,c]}throw p=(u=this).headByte,m=u.pos,g=u.totalPos,new RangeError("Insufficient data in parsing ".concat(At(p)," at ").concat(g," (").concat(m," in the current buffer)"))}}))},new((h=void 0)||(h=Promise))((function(t,e){function n(t){try{r(d.next(t))}catch(t){e(t)}}function i(t){try{r(d.throw(t))}catch(t){e(t)}}function r(e){var r;e.done?t(e.value):(r=e.value,r instanceof h?r:new h((function(t){t(r)}))).then(n,i)}r((d=d.apply(l,c||[])).next())}))},t.prototype.decodeArrayStream=function(t){return this.decodeMultiAsync(t,!0)},t.prototype.decodeStream=function(t){return this.decodeMultiAsync(t,!1)},t.prototype.decodeMultiAsync=function(t,e){return function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(t){r[t]&&(i[t]=function(e){return new Promise((function(n,i){a.push([t,e,n,i])>1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof Et?Promise.resolve(n.value.v).then(l,c):h(a[0][2],n)}catch(t){h(a[0][3],t)}var n}function l(t){s("next",t)}function c(t){s("throw",t)}function h(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}(this,arguments,(function(){var n,i,r,a,o,s,l,c,h,d,u,p;return kt(this,(function(m){switch(m.label){case 0:n=e,i=-1,m.label=1;case 1:m.trys.push([1,13,14,19]),r=!0,a=It(t),m.label=2;case 2:return[4,Et(a.next())];case 3:if(o=m.sent(),h=o.done)return[3,12];if(p=o.value,r=!1,s=p,e&&0===i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete()),m.label=4;case 4:m.trys.push([4,9,,10]),m.label=5;case 5:return[4,Et(this.doDecodeSync())];case 6:return[4,m.sent()];case 7:return m.sent(),0==--i?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((l=m.sent())instanceof Bt))throw l;return[3,10];case 10:this.totalPos+=this.pos,m.label=11;case 11:return r=!0,[3,2];case 12:return[3,19];case 13:return c=m.sent(),d={error:c},[3,19];case 14:return m.trys.push([14,,17,18]),r||h||!(u=a.return)?[3,16]:[4,Et(u.call(a))];case 15:m.sent(),m.label=16;case 16:return[3,18];case 17:if(d)throw d.error;return[7];case 18:return[7];case 19:return[2]}}))}))},t.prototype.doDecodeSync=function(){t:for(;;){var t=this.readHeadByte(),e=void 0;if(t>=224)e=this.convertNumber(t-256);else if(t<192)if(t<128)e=this.convertNumber(t);else if(t<144){if(0!=(i=t-128)){this.pushMapState(i),this.complete();continue t}e=this.useMap?new Map:{}}else if(t<160){if(0!=(i=t-144)){this.pushArrayState(i),this.complete();continue t}e=[]}else{var n=t-160;e=this.decodeString(n,0)}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.convertNumber(this.readU8());else if(205===t)e=this.convertNumber(this.readU16());else if(206===t)e=this.convertNumber(this.readU32());else if(207===t)e=this.readU64();else if(208===t)e=this.convertNumber(this.readI8());else if(209===t)e=this.convertNumber(this.readI16());else if(210===t)e=this.convertNumber(this.readI32());else if(211===t)e=this.readI64();else if(217===t)n=this.lookU8(),e=this.decodeString(n,1);else if(218===t)n=this.lookU16(),e=this.decodeString(n,2);else if(219===t)n=this.lookU32(),e=this.decodeString(n,4);else if(220===t){if(0!==(i=this.readU16())){this.pushArrayState(i),this.complete();continue t}e=[]}else if(221===t){if(0!==(i=this.readU32())){this.pushArrayState(i),this.complete();continue t}e=[]}else if(222===t){if(0!==(i=this.readU16())){this.pushMapState(i),this.complete();continue t}e={}}else if(223===t){if(0!==(i=this.readU32())){this.pushMapState(i),this.complete();continue t}e={}}else if(196===t){var i=this.lookU8();e=this.decodeBinary(i,1)}else if(197===t)i=this.lookU16(),e=this.decodeBinary(i,2);else if(198===t)i=this.lookU32(),e=this.decodeBinary(i,4);else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t)i=this.lookU8(),e=this.decodeExtension(i,1);else if(200===t)i=this.lookU16(),e=this.decodeExtension(i,2);else{if(201!==t)throw new pt("Unrecognized type byte: ".concat(At(t)));i=this.lookU32(),e=this.decodeExtension(i,4)}this.complete();for(var r=this.stack;r.length>0;){var a=r.top();if(a.type===_t){if(a.array[a.position]=e,a.position++,a.position!==a.size)continue t;e=a.array,r.release(a)}else{if(a.type===Mt){if(s=e,l=this.useMap,c=this.supportObjectNumberKeys,!(l?"string"==typeof s||"number"==typeof s||"bigint"==typeof s||s instanceof Uint8Array||s instanceof xt:"string"==typeof s||c&&"number"==typeof s)){var o=this.useMap?"string, number, bigint, or Uint8Array":this.supportObjectNumberKeys?"string or number":"string";throw new pt("The type of key must be ".concat(o," but got ").concat(typeof e))}if(!this.useMap&&"__proto__"===e)throw new pt("The key __proto__ is not allowed");a.key=e,a.type=Dt;continue t}if(this.useMap?a.map.set(a.key,e):a.map[a.key]=e,a.readCount++,a.readCount!==a.size){a.key=null,a.type=Mt;continue t}e=a.map,r.release(a)}}return e}var s,l,c},t.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},t.prototype.complete=function(){this.headByte=-1},t.prototype.readArraySize=function(){var t=this.readHeadByte();switch(t){case 220:return this.readU16();case 221:return this.readU32();default:if(t<160)return t-144;throw new pt("Unrecognized array type byte: ".concat(At(t)))}},t.prototype.pushMapState=function(t){if(t>this.maxMapLength)throw new pt("Max length exceeded: map length (".concat(t,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.pushMapState(t)},t.prototype.pushArrayState=function(t){if(t>this.maxArrayLength)throw new pt("Max length exceeded: array length (".concat(t,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.pushArrayState(t)},t.prototype.decodeString=function(t,e){if(this.stateIsMapKey()?this.rawBinaryStringKeys:this.rawBinaryStringValues){var n=this.decodeBinary(t,e);return this.useRawBinaryStringClass?new xt(n):n}return this.decodeUtf8String(t,e)},t.prototype.decodeUtf8String=function(t,e){var n;if(t>this.maxStrLength)throw new pt("Max length exceeded: UTF-8 byte length (".concat(t,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLength<this.pos+e+t)throw Ft;var i,r=this.pos+e;return i=this.stateIsMapKey()&&(null===(n=this.keyDecoder)||void 0===n?void 0:n.canBeCached(t))?this.keyDecoder.decode(this.bytes,r,t):function(t,e,n){return n>200?function(t,e,n){var i=t.subarray(e,e+n);return lt.decode(i)}(t,e,n):st(t,e,n)}(this.bytes,r,t),this.pos+=e+t,i},t.prototype.stateIsMapKey=function(){return this.stack.length>0&&this.stack.top().type===Mt},t.prototype.decodeBinary=function(t,e){if(t>this.maxBinLength)throw new pt("Max length exceeded: bin length (".concat(t,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(t+e))throw Ft;var n=this.pos+e,i=this.bytes.subarray(n,n+t);return this.pos+=e+t,i},t.prototype.decodeExtension=function(t,e){if(t>this.maxExtLength)throw new pt("Max length exceeded: ext length (".concat(t,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+e),i=this.decodeBinary(t,e+1);return this.extensionCodec.decode(i,n,this.context)},t.prototype.convertNumber=function(t){return function(t,e){return e===ht.BIGINT?BigInt(t):Number(t)}(t,this.intMode)},t.prototype.lookU8=function(){return this.view.getUint8(this.pos)},t.prototype.lookU16=function(){return this.view.getUint16(this.pos)},t.prototype.lookU32=function(){return this.view.getUint32(this.pos)},t.prototype.readU8=function(){var t=this.view.getUint8(this.pos);return this.pos++,t},t.prototype.readI8=function(){var t=this.view.getInt8(this.pos);return this.pos++,t},t.prototype.readU16=function(){var t=this.view.getUint16(this.pos);return this.pos+=2,t},t.prototype.readI16=function(){var t=this.view.getInt16(this.pos);return this.pos+=2,t},t.prototype.readU32=function(){var t=this.view.getUint32(this.pos);return this.pos+=4,t},t.prototype.readI32=function(){var t=this.view.getInt32(this.pos);return this.pos+=4,t},t.prototype.readU64=function(){var t=function(t,e,n){if(n===ht.UNSAFE_NUMBER||n===ht.SAFE_NUMBER){var i=t.getUint32(e),r=t.getUint32(e+4);if(n===ht.SAFE_NUMBER&&i>(Number.MAX_SAFE_INTEGER-r)/4294967296){var a="0x".concat(i.toString(16)).concat(r.toString(16).padStart(8,"0"));throw new Error("Mode is IntMode.SAFE_NUMBER and value is not a safe integer: ".concat(a))}return 4294967296*i+r}var o=t.getBigUint64(e);return n===ht.MIXED&&o<=Number.MAX_SAFE_INTEGER?Number(o):o}(this.view,this.pos,this.intMode);return this.pos+=8,t},t.prototype.readI64=function(){var t=ft(this.view,this.pos,this.intMode);return this.pos+=8,t},t.prototype.readF32=function(){var t=this.view.getFloat32(this.pos);return this.pos+=4,t},t.prototype.readF64=function(){var t=this.view.getFloat64(this.pos);return this.pos+=8,t},t}();function Vt(t,e){return new Nt(e).decode(t)}const zt="The object contains empty or 0 values. First empty or 0 value encountered during encoding: ";function Gt(t){return e=t,new St({sortKeys:!0}).encodeSharedRef(e);var e}function Wt(t){const e=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&(!t[e]||0===t[e].length))return{containsEmpty:!0,firstEmptyKey:e};return{containsEmpty:!1,firstEmptyKey:void 0}}(t);if(e.containsEmpty)throw new Error(zt+e.firstEmptyKey);return Gt(t)}function Ot(t){switch(t){case h.UNSAFE:return ht.UNSAFE_NUMBER;case h.SAFE:return ht.SAFE_NUMBER;case h.MIXED:return ht.MIXED;case h.BIGINT:return ht.BIGINT;default:throw new Error(`Invalid intDecoding: ${t}`)}}function Zt(t,e){return Vt(t,{intMode:e?.intDecoding?Ot(e?.intDecoding):ht.BIGINT})}function Yt(t){return Zt(t,{intDecoding:h.MIXED})}function Ht(t,e){return Vt(t,{intMode:e?.intDecoding?Ot(e?.intDecoding):ht.BIGINT,useMap:!0})}function jt(t){if(null==t)return t;if(t instanceof Uint8Array)return B(t);if(Array.isArray(t))return t.map(jt);if(t instanceof Map){const e={};for(const[n,i]of t){if("string"!=typeof n)throw new Error(`JSON map key must be a string: ${n}`);e[n]=jt(i)}return e}return t}function Xt(t){if(null==t)return t;if("string"==typeof t||"number"==typeof t||"bigint"==typeof t||"boolean"==typeof t)return t;if(Array.isArray(t))return t.map(Xt);if("object"==typeof t){const e=new Map;for(const[n,i]of Object.entries(t))e.set(n,Xt(i));return e}throw new Error(`Invalid JSON encoding data: ${t}`)}var Ut,Kt,Jt;!function(t){t[t.MAP_VALUE=0]="MAP_VALUE",t[t.ARRAY_ELEMENT=1]="ARRAY_ELEMENT"}(Ut||(Ut={}));class qt{constructor({parent:t,segment:e,baseObjectBytes:n}){this.resolvedCache=null,this.resolvedCachePresent=!1,this.parent=t,this.segment=e,this.baseObjectBytes=n}withMapValue(t){return new qt({parent:this,segment:{kind:Ut.MAP_VALUE,key:t}})}withArrayElement(t){return new qt({parent:this,segment:{kind:Ut.ARRAY_ELEMENT,key:t}})}getRawStringAtCurrentLocation(){const t=this.resolve();if(t instanceof xt)return t.rawBinaryValue;throw new Error(`Invalid type. Expected RawBinaryString, got ${t} (${typeof t})`)}getRawStringKeysAndValuesAtCurrentLocation(){const t=this.resolve();if(!(t instanceof Map))throw new Error(`Invalid type. Expected Map, got ${t} (${typeof t})`);const e=new Map;for(const[n,i]of t){if(!(n instanceof xt))throw new Error(`Invalid type for map key. Expected RawBinaryString, got ${n} (${typeof n})`);e.set(n.rawBinaryValue,i)}return e}resolve(){if(this.resolvedCachePresent)return this.resolvedCache;let t;if(t=this.parent?this.parent.resolve():Vt(this.baseObjectBytes,{intMode:ht.BIGINT,useMap:!0,rawBinaryStringKeys:!0,rawBinaryStringValues:!0,useRawBinaryStringClass:!0}),!this.segment)return this.resolvedCache=t,this.resolvedCachePresent=!0,t;if(this.segment.kind===Ut.MAP_VALUE){if(!(t instanceof Map))throw new Error(`Invalid type. Expected Map, got ${t} (${typeof t})`);if("string"==typeof this.segment.key||this.segment.key instanceof Uint8Array||this.segment.key instanceof xt){const e=this.segment.key instanceof xt?this.segment.key.rawBinaryValue:R(this.segment.key),n="string"==typeof this.segment.key||this.segment.key instanceof xt;for(const[i,r]of t){let t;if(n?i instanceof xt&&(t=i.rawBinaryValue):i instanceof Uint8Array&&(t=i),t&&m(e,t)){this.resolvedCache=r;break}}}else this.resolvedCache=t.get(this.segment.key);return this.resolvedCachePresent=!0,this.resolvedCache}if(this.segment.kind===Ut.ARRAY_ELEMENT){if(!Array.isArray(t))throw new Error(`Invalid type. Expected Array, got ${t} (${typeof t})`);return this.resolvedCache=t[this.segment.key],this.resolvedCachePresent=!0,this.resolvedCache}throw new Error(`Invalid segment kind: ${this.segment.kind}`)}getPathString(){const t=this.parent?this.parent.getPathString():"root";return this.segment?this.segment.kind===Ut.MAP_VALUE?`${t} -> map key "${this.segment.key}" (${typeof this.segment.key})`:this.segment.kind===Ut.ARRAY_ELEMENT?`${t} -> array index ${this.segment.key} (${typeof this.segment.key})`:`${t} -> unknown segment kind ${this.segment.kind}`:t}}class $t{}function Qt(t,e){const n=Ht(t),i=new qt({baseObjectBytes:t});return e.fromEncodingData(e.encodingSchema.fromPreparedMsgpack(n,i))}function te(t){return Gt(t.getEncodingSchema().prepareMsgpack(t.toEncodingData()))}function ee(t,e){const n=u(t,{intDecoding:h.BIGINT});return e.fromEncodingData(e.encodingSchema.fromPreparedJSON(n))}function ne(t,e){const{space:n,...i}=e??{};return p(t.getEncodingSchema().prepareJSON(t.toEncodingData(),i),void 0,n)}class ie extends $t{defaultValue(){return!1}isDefaultValue(t){return!1===t}prepareMsgpack(t){if("boolean"==typeof t)return t;throw new Error("Invalid boolean")}fromPreparedMsgpack(t,e){if("boolean"==typeof t)return t;throw new Error("Invalid boolean")}prepareJSON(t,e){if("boolean"==typeof t)return t;throw new Error("Invalid boolean")}fromPreparedJSON(t){if("boolean"==typeof t)return t;throw new Error("Invalid boolean")}}class re extends $t{defaultValue(){return""}isDefaultValue(t){return""===t}prepareMsgpack(t){if("string"==typeof t)return t;throw new Error(`Invalid string: (${typeof t}) ${t}`)}fromPreparedMsgpack(t,e){if("string"==typeof t)return t;throw new Error(`Invalid string: (${typeof t}) ${t}`)}prepareJSON(t,e){if("string"==typeof t)return t;throw new Error(`Invalid string: (${typeof t}) ${t}`)}fromPreparedJSON(t){if("string"==typeof t)return t;throw new Error(`Invalid string: (${typeof t}) ${t}`)}}class ae extends $t{defaultValue(){return BigInt(0)}isDefaultValue(t){return"bigint"==typeof t?t===BigInt(0):"number"==typeof t&&0===t}prepareMsgpack(t){return b(t)}fromPreparedMsgpack(t,e){return b(t)}prepareJSON(t,e){return b(t)}fromPreparedJSON(t){return b(t)}}class oe extends $t{defaultValue(){return Y.zeroAddress()}isDefaultValue(t){return Y.zeroAddress().equals(t)}prepareMsgpack(t){if(t instanceof Y)return t.publicKey;throw new Error(`Invalid address: (${typeof t}) ${t}`)}fromPreparedMsgpack(t,e){return new Y(t)}prepareJSON(t,e){if(t instanceof Y)return t.toString();throw new Error(`Invalid address: (${typeof t}) ${t}`)}fromPreparedJSON(t){return Y.fromString(t)}}class se extends $t{defaultValue(){return new Uint8Array}isDefaultValue(t){return t instanceof Uint8Array&&0===t.byteLength}prepareMsgpack(t){if(t instanceof Uint8Array)return t;throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}fromPreparedMsgpack(t,e){if(t instanceof Uint8Array)return t;throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}prepareJSON(t,e){if(t instanceof Uint8Array)return B(t);throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}fromPreparedJSON(t){if("string"==typeof t)return L(t);throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}}class le extends $t{constructor(t){super(),this.length=t}defaultValue(){return new Uint8Array(this.length)}isDefaultValue(t){return t instanceof Uint8Array&&t.byteLength===this.length&&t.every((t=>0===t))}prepareMsgpack(t){if(t instanceof Uint8Array){if(t.byteLength===this.length)return t;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${t.byteLength}`)}throw new Error("Invalid byte array")}fromPreparedMsgpack(t,e){if(t instanceof Uint8Array){if(t.byteLength===this.length)return t;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${t.byteLength}`)}throw new Error("Invalid byte array")}prepareJSON(t){if(t instanceof Uint8Array){if(t.byteLength===this.length)return B(t);throw new Error(`Invalid byte array length: wanted ${this.length}, got ${t.byteLength}`)}throw new Error("Invalid byte array")}fromPreparedJSON(t){if("string"==typeof t){const e=L(t);if(e.byteLength===this.length)return e;throw new Error(`Invalid byte array length: wanted ${this.length}, got ${e.byteLength}`)}throw new Error("Invalid base64 byte array")}}class ce extends $t{defaultValue(){return new Uint8Array}isDefaultValue(t){return t instanceof Uint8Array&&0===t.byteLength}prepareMsgpack(t){if(t instanceof Uint8Array)return new xt(t);throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}fromPreparedMsgpack(t,e){return e.getRawStringAtCurrentLocation()}prepareJSON(t,e){if(t instanceof Uint8Array){const n=F(t);if(!e.lossyBinaryStringConversion&&!m(R(n),t))throw new Error(`Invalid UTF-8 byte array encountered. Encode with lossyBinaryStringConversion enabled to bypass this check. Base64 value: ${B(t)}`);return n}throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}fromPreparedJSON(t){if("string"==typeof t)return R(t);throw new Error(`Invalid byte array: (${typeof t}) ${t}`)}}class he extends $t{constructor(t){super(),this.itemSchema=t}defaultValue(){return[]}isDefaultValue(t){return Array.isArray(t)&&0===t.length}prepareMsgpack(t){if(Array.isArray(t))return t.map((t=>this.itemSchema.prepareMsgpack(t)));throw new Error("ArraySchema data must be an array")}fromPreparedMsgpack(t,e){if(Array.isArray(t))return t.map(((t,n)=>this.itemSchema.fromPreparedMsgpack(t,e.withArrayElement(n))));throw new Error(`ArraySchema encoded data must be an array: ${t} (${typeof t})`)}prepareJSON(t,e){if(Array.isArray(t))return t.map((t=>this.itemSchema.prepareJSON(t,e)));throw new Error("ArraySchema data must be an array")}fromPreparedJSON(t){if(Array.isArray(t))return t.map((t=>this.itemSchema.fromPreparedJSON(t)));throw new Error(`ArraySchema encoded data must be an array: ${t} (${typeof t})`)}}function de(t){return t.map((t=>({...t,omitEmpty:!0})))}class ue extends $t{constructor(t){super(),this.entries=t,this.checkEntries()}pushEntries(...t){this.entries.push(...t),this.checkEntries()}checkEntries(){for(const t of this.entries)if(t.embedded){if(""!==t.key)throw new Error("Embedded entries must have an empty key");if(!(t.valueSchema instanceof ue))throw new Error("Embedded entry valueSchema must be a NamedMapSchema")}const t=new Set;for(const e of this.getEntries()){if(t.has(e.key))throw new Error(`Duplicate key: ${e.key}`);t.add(e.key)}}getEntries(){const t=[];for(const e of this.entries)if(e.embedded){const n=e.valueSchema;t.push(...n.getEntries())}else t.push(e);return t}defaultValue(){const t=new Map;for(const e of this.getEntries())t.set(e.key,e.valueSchema.defaultValue());return t}isDefaultValue(t){if(!(t instanceof Map))return!1;for(const e of this.getEntries())if(!e.valueSchema.isDefaultValue(t.get(e.key)))return!1;return!0}prepareMsgpack(t){if(!(t instanceof Map))throw new Error(`NamedMapSchema data must be a Map. Got (${typeof t}) ${t}`);const e=new Map;for(const n of this.getEntries()){const i=t.get(n.key);n.omitEmpty&&n.valueSchema.isDefaultValue(i)||e.set(n.key,n.valueSchema.prepareMsgpack(i))}return e}fromPreparedMsgpack(t,e){if(!(t instanceof Map))throw new Error("NamedMapSchema data must be a Map");const n=new Map;for(const i of this.getEntries())if(t.has(i.key))n.set(i.key,i.valueSchema.fromPreparedMsgpack(t.get(i.key),e.withMapValue(i.key)));else{if(!i.omitEmpty)throw new Error(`Missing key: ${i.key}`);n.set(i.key,i.valueSchema.defaultValue())}return n}prepareJSON(t,e){if(!(t instanceof Map))throw new Error("NamedMapSchema data must be a Map");const n={};for(const i of this.getEntries()){const r=t.get(i.key);i.omitEmpty&&i.valueSchema.isDefaultValue(r)||(n[i.key]=i.valueSchema.prepareJSON(r,e))}return n}fromPreparedJSON(t){if(null==t||"object"!=typeof t||Array.isArray(t))throw new Error("NamedMapSchema data must be an object");const e=new Map;for(const n of this.getEntries())if(Object.prototype.hasOwnProperty.call(t,n.key))e.set(n.key,n.valueSchema.fromPreparedJSON(t[n.key]));else{if(!n.omitEmpty)throw new Error(`Missing key: ${n.key}`);e.set(n.key,n.valueSchema.defaultValue())}return e}}function pe(...t){const e=new Map;for(const n of t)for(const[t,i]of n){if(e.has(t))throw new Error(`Duplicate key: ${t}`);e.set(t,i)}return e}function me(t,e){const n=new Map;for(const[i,r]of t){const[t,a]=e(i,r);n.set(t,a)}return n}class ge extends $t{constructor(t){super(),this.valueSchema=t}defaultValue(){return new Map}isDefaultValue(t){return t instanceof Map&&0===t.size}prepareMsgpack(t){if(!(t instanceof Map))throw new Error(`Uint64MapSchema data must be a Map. Got (${typeof t}) ${t}`);const e=new Map;for(const[n,i]of t){const t=b(n);if(e.has(t))throw new Error(`Duplicate key: ${t}`);e.set(t,this.valueSchema.prepareMsgpack(i))}return e}fromPreparedMsgpack(t,e){if(!(t instanceof Map))throw new Error("Uint64MapSchema data must be a Map");const n=new Map;for(const[i,r]of t){const t=b(i);if(n.has(t))throw new Error(`Duplicate key: ${t}`);n.set(t,this.valueSchema.fromPreparedMsgpack(r,e.withMapValue(i)))}return n}prepareJSON(t,e){if(!(t instanceof Map))throw new Error(`Uint64MapSchema data must be a Map. Got (${typeof t}) ${t}`);const n=new Map;for(const[i,r]of t){const t=b(i);if(n.has(t))throw new Error(`Duplicate key: ${t}`);n.set(t,this.valueSchema.prepareJSON(r,e))}const i={};for(const[t,e]of n)i[t.toString()]=e;return i}fromPreparedJSON(t){if(null==t||"object"!=typeof t||Array.isArray(t))throw new Error("Uint64MapSchema data must be an object");const e=new Map;for(const[n,i]of Object.entries(t)){const t=BigInt(n);if(e.has(t))throw new Error(`Duplicate key: ${t}`);e.set(t,this.valueSchema.fromPreparedJSON(i))}return e}}function fe(t){if(t instanceof xt)return F(t.rawBinaryValue);if(t instanceof Map){const e=new Map;for(const[n,i]of t)e.set(fe(n),fe(i));return e}return Array.isArray(t)?t.map(fe):t}class ye extends $t{constructor(t){super(),this.valueSchema=t}defaultValue(){return new Map}isDefaultValue(t){return t instanceof Map&&0===t.size}prepareMsgpack(t){if(!(t instanceof Map))throw new Error(`SpecialCaseBinaryStringMapSchema data must be a Map. Got (${typeof t}) ${t}`);const e=new Map;for(const[n,i]of t){if(!(n instanceof Uint8Array))throw new Error(`Invalid key: ${n} (${typeof n})`);e.set(new xt(n),this.valueSchema.prepareMsgpack(i))}return e}fromPreparedMsgpack(t,e){const n=new Map,i=e.getRawStringKeysAndValuesAtCurrentLocation();for(const[t,r]of i)n.set(t,this.valueSchema.fromPreparedMsgpack(fe(r),e.withMapValue(new xt(t))));return n}prepareJSON(t,e){if(!(t instanceof Map))throw new Error(`SpecialCaseBinaryStringMapSchema data must be a Map. Got (${typeof t}) ${t}`);const n=new Map;for(const[i,r]of t){if(!(i instanceof Uint8Array))throw new Error(`Invalid key: ${i}`);const t=F(i);if(!e.lossyBinaryStringConversion&&!m(R(t),i))throw new Error(`Invalid UTF-8 byte array encountered. Encode with lossyBinaryStringConversion enabled to bypass this check. Base64 value: ${B(i)}`);n.set(t,this.valueSchema.prepareJSON(r,e))}const i={};for(const[t,e]of n)i[t]=e;return i}fromPreparedJSON(t){if(null==t||"object"!=typeof t||Array.isArray(t))throw new Error("SpecialCaseBinaryStringMapSchema data must be an object");const e=new Map;for(const[n,i]of Object.entries(t))e.set(R(n),this.valueSchema.fromPreparedJSON(i));return e}}class ve extends $t{constructor(t){super(),this.valueSchema=t}defaultValue(){}isDefaultValue(t){return void 0===t||this.valueSchema.isDefaultValue(t)}prepareMsgpack(t){if(void 0!==t)return this.valueSchema.prepareMsgpack(t)}fromPreparedMsgpack(t,e){if(null!=t)return this.valueSchema.fromPreparedMsgpack(t,e)}prepareJSON(t,e){return void 0===t?null:this.valueSchema.prepareJSON(t,e)}fromPreparedJSON(t){if(null!=t)return this.valueSchema.fromPreparedJSON(t)}}class we extends $t{defaultValue(){}isDefaultValue(t){return void 0===t}prepareMsgpack(t){return t}fromPreparedMsgpack(t,e){return t}prepareJSON(t,e){return jt(t)}fromPreparedJSON(t){return Xt(t)}}function be(t){return t===Kt.pay||t===Kt.keyreg||t===Kt.acfg||t===Kt.axfer||t===Kt.afrz||t===Kt.appl||t===Kt.stpf||t===Kt.hb}function xe(t){return t===Jt.NoOpOC||t===Jt.OptInOC||t===Jt.CloseOutOC||t===Jt.ClearStateOC||t===Jt.UpdateApplicationOC||t===Jt.DeleteApplicationOC}!function(t){t.pay="pay",t.keyreg="keyreg",t.acfg="acfg",t.axfer="axfer",t.afrz="afrz",t.appl="appl",t.stpf="stpf",t.hb="hb"}(Kt||(Kt={})),function(t){t[t.NoOpOC=0]="NoOpOC",t[t.OptInOC=1]="OptInOC",t[t.CloseOutOC=2]="CloseOutOC",t[t.ClearStateOC=3]="ClearStateOC",t[t.UpdateApplicationOC=4]="UpdateApplicationOC",t[t.DeleteApplicationOC=5]="DeleteApplicationOC"}(Jt||(Jt={}));class Se{constructor(t){this.hashType=t.hashType}getEncodingSchema(){return Se.encodingSchema}toEncodingData(){return new Map([["t",this.hashType]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded HashFactory: ${t}`);return new Se({hashType:Number(t.get("t"))})}}Se.encodingSchema=new ue(de([{key:"t",valueSchema:new ae}]));class Ae{constructor(t){this.path=t.path,this.hashFactory=t.hashFactory,this.treeDepth=t.treeDepth}getEncodingSchema(){return Ae.encodingSchema}toEncodingData(){return new Map([["pth",this.path],["hsh",this.hashFactory.toEncodingData()],["td",this.treeDepth]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded MerkleArrayProof: ${t}`);return new Ae({path:t.get("pth"),hashFactory:Se.fromEncodingData(t.get("hsh")),treeDepth:Number(t.get("td"))})}}Ae.encodingSchema=new ue(de([{key:"pth",valueSchema:new he(new se)},{key:"hsh",valueSchema:Se.encodingSchema},{key:"td",valueSchema:new ae}]));class Ce{constructor(t){this.commitment=t.commitment,this.keyLifetime=t.keyLifetime}getEncodingSchema(){return Ce.encodingSchema}toEncodingData(){return new Map([["cmt",this.commitment],["lf",this.keyLifetime]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded MerkleSignatureVerifier: ${t}`);return new Ce({commitment:t.get("cmt"),keyLifetime:t.get("lf")})}}Ce.encodingSchema=new ue(de([{key:"cmt",valueSchema:new le(64)},{key:"lf",valueSchema:new ae}]));class ke{constructor(t){this.pk=t.pk,this.weight=t.weight}getEncodingSchema(){return ke.encodingSchema}toEncodingData(){return new Map([["p",this.pk.toEncodingData()],["w",this.weight]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Participant: ${t}`);return new ke({pk:Ce.fromEncodingData(t.get("p")),weight:t.get("w")})}}ke.encodingSchema=new ue(de([{key:"p",valueSchema:Ce.encodingSchema},{key:"w",valueSchema:new ae}]));class Ie{constructor(t){this.publicKey=t.publicKey}getEncodingSchema(){return Ie.encodingSchema}toEncodingData(){return new Map([["k",this.publicKey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded FalconVerifier: ${t}`);return new Ie({publicKey:t.get("k")})}}Ie.encodingSchema=new ue(de([{key:"k",valueSchema:new le(1793)}]));class Ee{constructor(t){this.signature=t.signature,this.vectorCommitmentIndex=t.index,this.proof=t.proof,this.verifyingKey=t.verifyingKey}getEncodingSchema(){return Ee.encodingSchema}toEncodingData(){return new Map([["sig",this.signature],["idx",this.vectorCommitmentIndex],["prf",this.proof.toEncodingData()],["vkey",this.verifyingKey.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded FalconSignatureStruct: ${t}`);return new Ee({signature:t.get("sig"),index:t.get("idx"),proof:Ae.fromEncodingData(t.get("prf")),verifyingKey:Ie.fromEncodingData(t.get("vkey"))})}}Ee.encodingSchema=new ue(de([{key:"sig",valueSchema:new se},{key:"idx",valueSchema:new ae},{key:"prf",valueSchema:Ae.encodingSchema},{key:"vkey",valueSchema:Ie.encodingSchema}]));class _e{constructor(t){this.sig=t.sig,this.l=t.l}getEncodingSchema(){return _e.encodingSchema}toEncodingData(){return new Map([["s",this.sig.toEncodingData()],["l",this.l]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SigslotCommit: ${t}`);return new _e({sig:Ee.fromEncodingData(t.get("s")),l:t.get("l")})}}_e.encodingSchema=new ue(de([{key:"s",valueSchema:Ee.encodingSchema},{key:"l",valueSchema:new ae}]));class Me{constructor(t){this.sigslot=t.sigslot,this.participant=t.participant}getEncodingSchema(){return Me.encodingSchema}toEncodingData(){return new Map([["s",this.sigslot.toEncodingData()],["p",this.participant.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Reveal: ${t}`);return new Me({sigslot:_e.fromEncodingData(t.get("s")),participant:ke.fromEncodingData(t.get("p"))})}}Me.encodingSchema=new ue(de([{key:"s",valueSchema:_e.encodingSchema},{key:"p",valueSchema:ke.encodingSchema}]));class De{constructor(t){this.sigCommit=t.sigCommit,this.signedWeight=t.signedWeight,this.sigProofs=t.sigProofs,this.partProofs=t.partProofs,this.merkleSignatureSaltVersion=t.merkleSignatureSaltVersion,this.reveals=t.reveals,this.positionsToReveal=t.positionsToReveal}getEncodingSchema(){return De.encodingSchema}toEncodingData(){return new Map([["c",this.sigCommit],["w",this.signedWeight],["S",this.sigProofs.toEncodingData()],["P",this.partProofs.toEncodingData()],["v",this.merkleSignatureSaltVersion],["r",me(this.reveals,((t,e)=>[t,e.toEncodingData()]))],["pr",this.positionsToReveal]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProof: ${t}`);return new De({sigCommit:t.get("c"),signedWeight:t.get("w"),sigProofs:Ae.fromEncodingData(t.get("S")),partProofs:Ae.fromEncodingData(t.get("P")),merkleSignatureSaltVersion:Number(t.get("v")),reveals:me(t.get("r"),((t,e)=>[t,Me.fromEncodingData(e)])),positionsToReveal:t.get("pr")})}}De.encodingSchema=new ue(de([{key:"c",valueSchema:new se},{key:"w",valueSchema:new ae},{key:"S",valueSchema:Ae.encodingSchema},{key:"P",valueSchema:Ae.encodingSchema},{key:"v",valueSchema:new ae},{key:"r",valueSchema:new ge(Me.encodingSchema)},{key:"pr",valueSchema:new he(new ae)}]));class Pe{constructor(t){this.blockHeadersCommitment=t.blockHeadersCommitment,this.votersCommitment=t.votersCommitment,this.lnProvenWeight=t.lnProvenWeight,this.firstAttestedRound=t.firstAttestedRound,this.lastAttestedRound=t.lastAttestedRound}getEncodingSchema(){return Pe.encodingSchema}toEncodingData(){return new Map([["b",this.blockHeadersCommitment],["v",this.votersCommitment],["P",this.lnProvenWeight],["f",this.firstAttestedRound],["l",this.lastAttestedRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofMessage: ${t}`);return new Pe({blockHeadersCommitment:t.get("b"),votersCommitment:t.get("v"),lnProvenWeight:t.get("P"),firstAttestedRound:t.get("f"),lastAttestedRound:t.get("l")})}static fromMap(t){return new Pe({blockHeadersCommitment:t.get("b"),votersCommitment:t.get("v"),lnProvenWeight:t.get("P"),firstAttestedRound:t.get("f"),lastAttestedRound:t.get("l")})}}Pe.encodingSchema=new ue(de([{key:"b",valueSchema:new se},{key:"v",valueSchema:new se},{key:"P",valueSchema:new ae},{key:"f",valueSchema:new ae},{key:"l",valueSchema:new ae}]));class Te{constructor(t){this.sig=t.sig,this.pk=t.pk,this.pk2=t.pk2,this.pk1Sig=t.pk1Sig,this.pk2Sig=t.pk2Sig}getEncodingSchema(){return Te.encodingSchema}toEncodingData(){return new Map([["s",this.sig],["p",this.pk],["p2",this.pk2],["p1s",this.pk1Sig],["p2s",this.pk2Sig]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded HeartbeatProof: ${t}`);return new Te({sig:t.get("s"),pk:t.get("p"),pk2:t.get("p2"),pk1Sig:t.get("p1s"),pk2Sig:t.get("p2s")})}}Te.encodingSchema=new ue(de([{key:"s",valueSchema:new le(64)},{key:"p",valueSchema:new le(32)},{key:"p2",valueSchema:new le(32)},{key:"p1s",valueSchema:new le(64)},{key:"p2s",valueSchema:new le(64)}]));class Le{constructor(t){this.address=t.address,this.proof=t.proof,this.seed=t.seed,this.voteID=t.voteID,this.keyDilution=t.keyDilution}getEncodingSchema(){return Le.encodingSchema}toEncodingData(){return new Map([["a",this.address],["prf",this.proof.toEncodingData()],["sd",this.seed],["vid",this.voteID],["kd",this.keyDilution]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Heartbeat: ${t}`);return new Le({address:t.get("a"),proof:Te.fromEncodingData(t.get("prf")),seed:t.get("sd"),voteID:t.get("vid"),keyDilution:t.get("kd")})}}function Be(t){return t.every((t=>0===t))}function Fe(t,e,n){if(null==t)return;let i;if(t instanceof Uint8Array&&(i=t),null==i||i.byteLength!==n)throw Error(`${e} must be a ${n} byte Uint8Array`);return i}function Re(t){if(null==t)throw new Error("Address must not be null or undefined");if("string"==typeof t)return Y.fromString(t);if(t instanceof Y)return t;throw new Error(`Not an address: ${t}`)}function Ne(t){if(null==t)return;let e;if(t instanceof Y)e=t;else{if("string"!=typeof t)throw new Error(`Not an address: ${t}`);e=Y.fromString(t)}if(Be(e.publicKey))throw new Error("Invalid use of the zero address. To omit this value, pass in undefined");return e}function Ve(t){if(void 0!==t){if(t instanceof Uint8Array)return t;throw new Error(`Not a Uint8Array: ${t}`)}}function ze(t){if(t instanceof Uint8Array)return t;throw new Error(`Not a Uint8Array: ${t}`)}function Ge(t){if(void 0!==t)return b(t)}function We(t){if(!0===t||!1===t)return t;throw new Error(`Not a boolean: ${t}`)}function Oe(t){if(Array.isArray(t))return t.slice();throw new Error(`Not an array: ${t}`)}function Ze(t,e,n){const i=Ve(t);if(void 0!==i){if(i.byteLength!==e)throw new Error(`${n} must be ${e} bytes long, was ${i.byteLength}`);if(!Be(i))return i}}function Ye(t){if(null!=t&&"object"==typeof t){const{appIndex:e,name:n}=t;return{appIndex:b(e),name:ze(n)}}throw new Error(`Not a box reference: ${t}`)}Le.encodingSchema=new ue(de([{key:"a",valueSchema:new oe},{key:"prf",valueSchema:Te.encodingSchema},{key:"sd",valueSchema:new se},{key:"vid",valueSchema:new le(32)},{key:"kd",valueSchema:new ae}]));const He=(new TextEncoder).encode("TX");class je{constructor(t){if(!be(t.type))throw new Error(`Invalid transaction type: ${t.type}`);if(this.type=t.type,this.sender=Re(t.sender),this.note=ze(t.note??new Uint8Array),this.lease=Ze(t.lease,32,"lease"),this.rekeyTo=Ne(t.rekeyTo),this.group=void 0,this.firstValid=b(t.suggestedParams.firstValid),this.lastValid=b(t.suggestedParams.lastValid),t.suggestedParams.genesisID){if("string"!=typeof t.suggestedParams.genesisID)throw new Error("Genesis ID must be a string if present");this.genesisID=t.suggestedParams.genesisID}this.genesisHash=Ve(t.suggestedParams.genesisHash);const e=[];if(t.paymentParams&&e.push(Kt.pay),t.keyregParams&&e.push(Kt.keyreg),t.assetConfigParams&&e.push(Kt.acfg),t.assetTransferParams&&e.push(Kt.axfer),t.assetFreezeParams&&e.push(Kt.afrz),t.appCallParams&&e.push(Kt.appl),t.stateProofParams&&e.push(Kt.stpf),t.heartbeatParams&&e.push(Kt.hb),1!==e.length)throw new Error(`Transaction has wrong number of type fields present (${e.length}): ${e}`);if(this.type!==e[0])throw new Error(`Transaction has type ${this.type} but fields present for ${e[0]}`);if(t.paymentParams&&(this.payment={receiver:Re(t.paymentParams.receiver),amount:b(t.paymentParams.amount),closeRemainderTo:Ne(t.paymentParams.closeRemainderTo)}),t.keyregParams){if(this.keyreg={voteKey:Fe(t.keyregParams.voteKey,"voteKey",32),selectionKey:Fe(t.keyregParams.selectionKey,"selectionKey",32),stateProofKey:Fe(t.keyregParams.stateProofKey,"stateProofKey",64),voteFirst:Ge(t.keyregParams.voteFirst),voteLast:Ge(t.keyregParams.voteLast),voteKeyDilution:Ge(t.keyregParams.voteKeyDilution),nonParticipation:We(t.keyregParams.nonParticipation??!1)},this.keyreg.nonParticipation&&(this.keyreg.voteKey||this.keyreg.selectionKey||this.keyreg.stateProofKey||void 0!==this.keyreg.voteFirst||void 0!==this.keyreg.voteLast||void 0!==this.keyreg.voteKeyDilution))throw new Error("nonParticipation is true but participation params are present.");if(!this.keyreg.nonParticipation&&(this.keyreg.voteKey||this.keyreg.selectionKey||this.keyreg.stateProofKey||void 0!==this.keyreg.voteFirst||void 0!==this.keyreg.voteLast||void 0!==this.keyreg.voteKeyDilution)&&(!this.keyreg.voteKey||!this.keyreg.selectionKey||void 0===this.keyreg.voteFirst||void 0===this.keyreg.voteLast||void 0===this.keyreg.voteKeyDilution))throw new Error("Online key registration missing at least one of the following fields: voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution")}if(t.assetConfigParams&&(this.assetConfig={assetIndex:b(t.assetConfigParams.assetIndex??0),total:b(t.assetConfigParams.total??0),decimals:v(t.assetConfigParams.decimals??0),defaultFrozen:We(t.assetConfigParams.defaultFrozen??!1),manager:Ne(t.assetConfigParams.manager),reserve:Ne(t.assetConfigParams.reserve),freeze:Ne(t.assetConfigParams.freeze),clawback:Ne(t.assetConfigParams.clawback),unitName:t.assetConfigParams.unitName,assetName:t.assetConfigParams.assetName,assetURL:t.assetConfigParams.assetURL,assetMetadataHash:Ze(t.assetConfigParams.assetMetadataHash,32,"assetMetadataHash")}),t.assetTransferParams&&(this.assetTransfer={assetIndex:b(t.assetTransferParams.assetIndex),amount:b(t.assetTransferParams.amount),assetSender:Ne(t.assetTransferParams.assetSender),receiver:Re(t.assetTransferParams.receiver),closeRemainderTo:Ne(t.assetTransferParams.closeRemainderTo)}),t.assetFreezeParams&&(this.assetFreeze={assetIndex:b(t.assetFreezeParams.assetIndex),freezeAccount:Re(t.assetFreezeParams.freezeTarget),frozen:We(t.assetFreezeParams.frozen)}),t.appCallParams){const{onComplete:e}=t.appCallParams;if(!xe(e))throw new Error(`Invalid onCompletion value: ${e}`);this.applicationCall={appIndex:b(t.appCallParams.appIndex),onComplete:e,numLocalInts:v(t.appCallParams.numLocalInts??0),numLocalByteSlices:v(t.appCallParams.numLocalByteSlices??0),numGlobalInts:v(t.appCallParams.numGlobalInts??0),numGlobalByteSlices:v(t.appCallParams.numGlobalByteSlices??0),extraPages:v(t.appCallParams.extraPages??0),approvalProgram:ze(t.appCallParams.approvalProgram??new Uint8Array),clearProgram:ze(t.appCallParams.clearProgram??new Uint8Array),appArgs:Oe(t.appCallParams.appArgs??[]).map(ze),accounts:Oe(t.appCallParams.accounts??[]).map(Re),foreignApps:Oe(t.appCallParams.foreignApps??[]).map(b),foreignAssets:Oe(t.appCallParams.foreignAssets??[]).map(b),boxes:Oe(t.appCallParams.boxes??[]).map(Ye)}}if(t.stateProofParams&&(this.stateProof={stateProofType:v(t.stateProofParams.stateProofType??0),stateProof:t.stateProofParams.stateProof,message:t.stateProofParams.message}),t.heartbeatParams&&(this.heartbeat=new Le({address:t.heartbeatParams.address,proof:t.heartbeatParams.proof,seed:t.heartbeatParams.seed,voteID:t.heartbeatParams.voteID,keyDilution:t.heartbeatParams.keyDilution})),this.fee=b(t.suggestedParams.fee),!We(t.suggestedParams.flatFee??!1)){const e=b(t.suggestedParams.minFee);this.fee*=BigInt(this.estimateSize()),this.fee<e&&(this.fee=e)}}getEncodingSchema(){return je.encodingSchema}toEncodingData(){const t=new Map([["type",this.type],["fv",this.firstValid],["lv",this.lastValid],["snd",this.sender],["gen",this.genesisID],["gh",this.genesisHash],["fee",this.fee],["note",this.note],["lx",this.lease],["rekey",this.rekeyTo],["grp",this.group]]);if(this.payment)return t.set("amt",this.payment.amount),t.set("rcv",this.payment.receiver),t.set("close",this.payment.closeRemainderTo),t;if(this.keyreg)return t.set("votekey",this.keyreg.voteKey),t.set("selkey",this.keyreg.selectionKey),t.set("sprfkey",this.keyreg.stateProofKey),t.set("votefst",this.keyreg.voteFirst),t.set("votelst",this.keyreg.voteLast),t.set("votekd",this.keyreg.voteKeyDilution),t.set("nonpart",this.keyreg.nonParticipation),t;if(this.assetConfig){t.set("caid",this.assetConfig.assetIndex);const e=new Map([["t",this.assetConfig.total],["dc",this.assetConfig.decimals],["df",this.assetConfig.defaultFrozen],["m",this.assetConfig.manager],["r",this.assetConfig.reserve],["f",this.assetConfig.freeze],["c",this.assetConfig.clawback],["un",this.assetConfig.unitName],["an",this.assetConfig.assetName],["au",this.assetConfig.assetURL],["am",this.assetConfig.assetMetadataHash]]);return t.set("apar",e),t}if(this.assetTransfer)return t.set("xaid",this.assetTransfer.assetIndex),t.set("aamt",this.assetTransfer.amount),t.set("arcv",this.assetTransfer.receiver),t.set("aclose",this.assetTransfer.closeRemainderTo),t.set("asnd",this.assetTransfer.assetSender),t;if(this.assetFreeze)return t.set("faid",this.assetFreeze.assetIndex),t.set("afrz",this.assetFreeze.frozen),t.set("fadd",this.assetFreeze.freezeAccount),t;if(this.applicationCall)return t.set("apid",this.applicationCall.appIndex),t.set("apan",this.applicationCall.onComplete),t.set("apaa",this.applicationCall.appArgs),t.set("apat",this.applicationCall.accounts),t.set("apas",this.applicationCall.foreignAssets),t.set("apfa",this.applicationCall.foreignApps),t.set("apbx",function(t,e,n){const i=BigInt(n),r=e.map(BigInt);return t.map((t=>function(t,e,n){const i=BigInt(t.appIndex),r=t.name,a=i===BigInt(0)||i===n,o=e.indexOf(i)+1;if(0===o&&!a)throw new Error(`Box ref with appId ${i} not in foreign-apps`);return new Map([["i",o],["n",r]])}(t,r,i)))}(this.applicationCall.boxes,this.applicationCall.foreignApps,this.applicationCall.appIndex)),t.set("apap",this.applicationCall.approvalProgram),t.set("apsu",this.applicationCall.clearProgram),t.set("apls",new Map([["nui",this.applicationCall.numLocalInts],["nbs",this.applicationCall.numLocalByteSlices]])),t.set("apgs",new Map([["nui",this.applicationCall.numGlobalInts],["nbs",this.applicationCall.numGlobalByteSlices]])),t.set("apep",this.applicationCall.extraPages),t;if(this.stateProof)return t.set("sptype",this.stateProof.stateProofType),t.set("sp",this.stateProof.stateProof?this.stateProof.stateProof.toEncodingData():void 0),t.set("spmsg",this.stateProof.message?this.stateProof.message.toEncodingData():void 0),t;if(this.heartbeat){const e=new Le({address:this.heartbeat.address,proof:this.heartbeat.proof,seed:this.heartbeat.seed,voteID:this.heartbeat.voteID,keyDilution:this.heartbeat.keyDilution});return t.set("hb",e.toEncodingData()),t}throw new Error(`Unexpected transaction type: ${this.type}`)}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded logic sig account: ${t}`);const e={minFee:BigInt(0),flatFee:!0,fee:t.get("fee")??0,firstValid:t.get("fv")??0,lastValid:t.get("lv")??0,genesisHash:t.get("gh"),genesisID:t.get("gen")},n=t.get("type");if(!be(n))throw new Error(`Unrecognized transaction type: ${n}`);const i={type:n,sender:t.get("snd")??Y.zeroAddress(),note:t.get("note"),lease:t.get("lx"),suggestedParams:e};if(t.get("rekey")&&(i.rekeyTo=t.get("rekey")),i.type===Kt.pay){const e={amount:t.get("amt")??0,receiver:t.get("rcv")??Y.zeroAddress()};t.get("close")&&(e.closeRemainderTo=t.get("close")),i.paymentParams=e}else if(i.type===Kt.keyreg){const e={voteKey:t.get("votekey"),selectionKey:t.get("selkey"),stateProofKey:t.get("sprfkey"),voteFirst:t.get("votefst"),voteLast:t.get("votelst"),voteKeyDilution:t.get("votekd"),nonParticipation:t.get("nonpart")};i.keyregParams=e}else if(i.type===Kt.acfg){const e={assetIndex:t.get("caid")};if(t.get("apar")){const n=t.get("apar");e.total=n.get("t"),e.decimals=n.get("dc"),e.defaultFrozen=n.get("df"),e.unitName=n.get("un"),e.assetName=n.get("an"),e.assetURL=n.get("au"),e.assetMetadataHash=n.get("am"),n.get("m")&&(e.manager=n.get("m")),n.get("r")&&(e.reserve=n.get("r")),n.get("f")&&(e.freeze=n.get("f")),n.get("c")&&(e.clawback=n.get("c"))}i.assetConfigParams=e}else if(i.type===Kt.axfer){const e={assetIndex:t.get("xaid")??0,amount:t.get("aamt")??0,receiver:t.get("arcv")??Y.zeroAddress()};t.get("aclose")&&(e.closeRemainderTo=t.get("aclose")),t.get("asnd")&&(e.assetSender=t.get("asnd")),i.assetTransferParams=e}else if(i.type===Kt.afrz){const e={assetIndex:t.get("faid")??0,freezeTarget:t.get("fadd")??Y.zeroAddress(),frozen:t.get("afrz")??!1};i.assetFreezeParams=e}else if(i.type===Kt.appl){const e={appIndex:t.get("apid")??0,onComplete:v(t.get("apan")??0),appArgs:t.get("apaa"),accounts:t.get("apat"),foreignAssets:t.get("apas"),foreignApps:t.get("apfa"),approvalProgram:t.get("apap"),clearProgram:t.get("apsu"),extraPages:t.get("apep")},n=t.get("apls");n&&(e.numLocalInts=n.get("nui"),e.numLocalByteSlices=n.get("nbs"));const r=t.get("apgs");r&&(e.numGlobalInts=r.get("nui"),e.numGlobalByteSlices=r.get("nbs"));const a=t.get("apbx");a&&(e.boxes=a.map((t=>{const n=v(t.get("i")??0),i=ze(t.get("n")??new Uint8Array);if(0===n)return{appIndex:0,name:i};if(!e.foreignApps||n>e.foreignApps.length)throw new Error(`Cannot find foreign app index ${n} in ${e.foreignApps}`);return{appIndex:e.foreignApps[n-1],name:i}}))),i.appCallParams=e}else if(i.type===Kt.stpf){const e={stateProofType:t.get("sptype"),stateProof:t.get("sp")?De.fromEncodingData(t.get("sp")):void 0,message:t.get("spmsg")?Pe.fromEncodingData(t.get("spmsg")):void 0};i.stateProofParams=e}else{if(i.type!==Kt.hb){const t=i.type;throw new Error(`Unexpected transaction type: ${t}`)}{const e=Le.fromEncodingData(t.get("hb")),n={address:e.address,proof:e.proof,seed:e.seed,voteID:e.voteID,keyDilution:e.keyDilution};i.heartbeatParams=n}}const r=new je(i);if(t.get("grp")){const e=ze(t.get("grp"));if(32!==e.byteLength)throw new Error(`Invalid group length: ${e.byteLength}`);r.group=e}return r}estimateSize(){return this.toByte().length+75}bytesToSign(){const t=this.toByte();return g(He,t)}toByte(){return te(this)}rawSignTxn(t){return k(this.bytesToSign(),t)}signTxn(t){const e=C(t),n=new Y(e.publicKey),i=this.rawSignTxn(t);return this.attachSignature(n,i)}attachSignature(t,e){if(!A(e.length))throw new Error("Invalid signature length");const n=new Map([["sig",e],["txn",this.toEncodingData()]]),i=Re(t);return this.sender.equals(i)||n.set("sgnr",i),Gt(new ue(de([{key:"txn",valueSchema:je.encodingSchema},{key:"sig",valueSchema:new le(64)},{key:"sgnr",valueSchema:new ve(new oe)}])).prepareMsgpack(n))}rawTxID(){const t=this.toByte(),e=g(He,t);return Uint8Array.from(x(e))}txID(){const t=this.rawTxID();return D.encode(t).slice(0,52)}}function Xe(t){return te(t)}function Ue(t){return Qt(t,je)}je.encodingSchema=new ue(de([{key:"type",valueSchema:new re},{key:"snd",valueSchema:new oe},{key:"lv",valueSchema:new ae},{key:"gen",valueSchema:new ve(new re)},{key:"gh",valueSchema:new ve(new le(32))},{key:"fee",valueSchema:new ae},{key:"fv",valueSchema:new ae},{key:"note",valueSchema:new se},{key:"lx",valueSchema:new ve(new le(32))},{key:"rekey",valueSchema:new ve(new oe)},{key:"grp",valueSchema:new ve(new le(32))},{key:"amt",valueSchema:new ve(new ae)},{key:"rcv",valueSchema:new ve(new oe)},{key:"close",valueSchema:new ve(new oe)},{key:"votekey",valueSchema:new ve(new le(32))},{key:"selkey",valueSchema:new ve(new le(32))},{key:"sprfkey",valueSchema:new ve(new le(64))},{key:"votefst",valueSchema:new ve(new ae)},{key:"votelst",valueSchema:new ve(new ae)},{key:"votekd",valueSchema:new ve(new ae)},{key:"nonpart",valueSchema:new ve(new ie)},{key:"caid",valueSchema:new ve(new ae)},{key:"apar",valueSchema:new ve(new ue(de([{key:"t",valueSchema:new ae},{key:"dc",valueSchema:new ae},{key:"df",valueSchema:new ie},{key:"m",valueSchema:new ve(new oe)},{key:"r",valueSchema:new ve(new oe)},{key:"f",valueSchema:new ve(new oe)},{key:"c",valueSchema:new ve(new oe)},{key:"un",valueSchema:new ve(new re)},{key:"an",valueSchema:new ve(new re)},{key:"au",valueSchema:new ve(new re)},{key:"am",valueSchema:new ve(new le(32))}])))},{key:"xaid",valueSchema:new ve(new ae)},{key:"aamt",valueSchema:new ve(new ae)},{key:"arcv",valueSchema:new ve(new oe)},{key:"aclose",valueSchema:new ve(new oe)},{key:"asnd",valueSchema:new ve(new oe)},{key:"faid",valueSchema:new ve(new ae)},{key:"afrz",valueSchema:new ve(new ie)},{key:"fadd",valueSchema:new ve(new oe)},{key:"apid",valueSchema:new ve(new ae)},{key:"apan",valueSchema:new ve(new ae)},{key:"apaa",valueSchema:new ve(new he(new se))},{key:"apat",valueSchema:new ve(new he(new oe))},{key:"apas",valueSchema:new ve(new he(new ae))},{key:"apfa",valueSchema:new ve(new he(new ae))},{key:"apbx",valueSchema:new ve(new he(new ue(de([{key:"i",valueSchema:new ae},{key:"n",valueSchema:new se}]))))},{key:"apap",valueSchema:new ve(new se)},{key:"apsu",valueSchema:new ve(new se)},{key:"apls",valueSchema:new ve(new ue(de([{key:"nui",valueSchema:new ae},{key:"nbs",valueSchema:new ae}])))},{key:"apgs",valueSchema:new ve(new ue(de([{key:"nui",valueSchema:new ae},{key:"nbs",valueSchema:new ae}])))},{key:"apep",valueSchema:new ve(new ae)},{key:"sptype",valueSchema:new ve(new ae)},{key:"sp",valueSchema:new ve(De.encodingSchema)},{key:"spmsg",valueSchema:new ve(Pe.encodingSchema)},{key:"hb",valueSchema:new ve(Le.encodingSchema)}]));const Ke=new Uint8Array([77,117,108,116,105,115,105,103,65,100,100,114]),Je="invalid multisig version",qe="bad multisig threshold",$e="bad multisig public key - wrong length",Qe="nacl public key length is not 32 bytes";function tn(t){return t.map((t=>"string"==typeof t?Y.fromString(t).publicKey:t.publicKey))}function en({version:t,threshold:e,pks:n}){if(1!==t||t>255||t<0)throw new Error(Je);if(0===e||0===n.length||e>n.length||e>255)throw new Error(qe);const i=z-G;if(i!==_)throw new Error(Qe);const r=new Uint8Array(Ke.length+2+i*n.length);r.set(Ke,0),r.set([t],Ke.length),r.set([e],Ke.length+1);for(let t=0;t<n.length;t++){if(n[t].length!==i)throw new Error($e);r.set(n[t],Ke.length+2+t*i)}return new Y(Uint8Array.from(x(r)))}function nn(t,e,n){const i=e.v,r=e.thr,a=e.subsig,o=a.map((t=>t.pk));if(e.subsig.length<r)return!1;let s;try{s=en({version:i,threshold:r,pks:o}).publicKey}catch(t){return!1}if(!m(s,n))return!1;let l=0;for(const t of a)void 0!==t.s&&(l+=1);if(l<r)return!1;let c=0;for(const e of a)void 0!==e.s&&E(t,e.s,e.pk)&&(c+=1);return!(c<r)}function rn({version:t,threshold:e,addrs:n}){return function({version:t,threshold:e,addrs:n}){return en({version:t,threshold:e,pks:tn(n)})}({version:t,threshold:e,addrs:n})}const an=new ue(de([{key:"pk",valueSchema:new le(32)},{key:"s",valueSchema:new ve(new le(64))}]));function on(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EncodedSubsig: ${t}`);const e={pk:t.get("pk")};return t.get("s")&&(e.s=t.get("s")),e}function sn(t){const e=new Map([["pk",t.pk]]);return t.s&&e.set("s",t.s),e}const ln=new ue(de([{key:"v",valueSchema:new ae},{key:"thr",valueSchema:new ae},{key:"subsig",valueSchema:new he(an)}]));function cn(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EncodedMultiSig: ${t}`);return{v:v(t.get("v")),thr:v(t.get("thr")),subsig:t.get("subsig").map(on)}}function hn(t){return new Map([["v",t.v],["thr",t.thr],["subsig",t.subsig.map(sn)]])}const dn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;function un(t){if(!t||0===t.length)throw new Error("empty program");const e="\n".charCodeAt(0),n=" ".charCodeAt(0),i="~".charCodeAt(0);if(t.every((t=>t===e||(t=>n<=t&&t<=i)(t)))){const e=(new TextDecoder).decode(t);if(j(e))throw new Error("requesting program bytes, get Algorand address");if(dn.test(e))throw new Error("program should not be b64 encoded");throw new Error("program bytes are all ASCII printable characters, not looking like Teal byte code")}}const pn=(new TextEncoder).encode("Program");class mn{constructor(t,e){if(e&&(!Array.isArray(e)||!e.every((t=>t.constructor===Uint8Array))))throw new TypeError("Invalid arguments");let n=[];null!=e&&(n=e.map((t=>new Uint8Array(t)))),un(t),this.logic=t,this.args=n,this.sig=void 0,this.msig=void 0}getEncodingSchema(){return mn.encodingSchema}toEncodingData(){const t=new Map([["l",this.logic],["arg",this.args],["sig",this.sig]]);return this.msig&&t.set("msig",hn(this.msig)),t}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded logic sig: ${t}`);const e=new mn(t.get("l"),t.get("arg"));return e.sig=t.get("sig"),t.get("msig")&&(e.msig=cn(t.get("msig"))),e}verify(t){if(this.sig&&this.msig)return!1;try{un(this.logic)}catch(t){return!1}const e=g(pn,this.logic);return this.sig||this.msig?this.sig?E(e,this.sig,t):nn(e,this.msig,t):m(x(e),t)}address(){const t=x(g(pn,this.logic));return new Y(Uint8Array.from(t))}sign(t,e){if(null==e)this.sig=this.signProgram(t);else{const n=tn(e.addrs).map((t=>({pk:t})));this.msig={v:e.version,thr:e.threshold,subsig:n};const[i,r]=this.singleSignMultisig(t,this.msig);this.msig.subsig[r].s=i}}appendToMultisig(t){if(void 0===this.msig)throw new Error("no multisig present");const[e,n]=this.singleSignMultisig(t,this.msig);this.msig.subsig[n].s=e}signProgram(t){return k(g(pn,this.logic),t)}singleSignMultisig(t,e){let n=-1;const i=C(t).publicKey;for(let t=0;t<e.subsig.length;t++){const{pk:r}=e.subsig[t];if(m(r,i)){n=t;break}}if(-1===n)throw new Error("invalid secret key");return[this.signProgram(t),n]}toByte(){return te(this)}static fromByte(t){return Qt(t,mn)}}mn.encodingSchema=new ue(de([{key:"l",valueSchema:new se},{key:"arg",valueSchema:new he(new se)},{key:"sig",valueSchema:new ve(new le(64))},{key:"msig",valueSchema:new ve(ln)}]));class gn{constructor(t,e){this.lsig=new mn(t,e),this.sigkey=void 0}getEncodingSchema(){return gn.encodingSchema}toEncodingData(){return new Map([["lsig",this.lsig.toEncodingData()],["sigkey",this.sigkey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded logic sig account: ${t}`);const e=t,n=mn.fromEncodingData(e.get("lsig")),i=new gn(n.logic,n.args);return i.lsig=n,i.sigkey=e.get("sigkey"),i}toByte(){return te(this)}static fromByte(t){return Qt(t,gn)}isDelegated(){return!(!this.lsig.sig&&!this.lsig.msig)}verify(){const t=this.address();return this.lsig.verify(t.publicKey)}address(){if(this.lsig.sig&&this.lsig.msig)throw new Error("LogicSig has too many signatures. At most one of sig or msig may be present");if(this.lsig.sig){if(!this.sigkey)throw new Error("Signing key for delegated account is missing");return new Y(this.sigkey)}return this.lsig.msig?en({version:this.lsig.msig.v,threshold:this.lsig.msig.thr,pks:this.lsig.msig.subsig.map((t=>t.pk))}):this.lsig.address()}signMultisig(t,e){this.lsig.sign(e,t)}appendToMultisig(t){this.lsig.appendToMultisig(t)}sign(t){this.lsig.sign(t),this.sigkey=C(t).publicKey}}function fn(t){return Qt(t,mn)}gn.encodingSchema=new ue(de([{key:"lsig",valueSchema:mn.encodingSchema},{key:"sigkey",valueSchema:new ve(new le(32))}]));const yn=(new TextEncoder).encode("ProgData");function vn(t,e,n){const i=g(("string"==typeof n?Y.fromString(n):n).publicKey,e);return k(g(yn,i),t)}function wn(t,e,n,i){const r=g(("string"==typeof e?Y.fromString(e):e).publicKey,t);return E(g(yn,r),n,i)}function bn(t,e,n){return vn(t,e,new mn(n).address())}class xn{constructor({txn:t,sig:e,msig:n,lsig:i,sgnr:r}){this.txn=t,this.sig=e,this.msig=n,this.lsig=i,this.sgnr=r;let a=0;if(e&&(a+=1),n&&(a+=1),i&&(a+=1),a>1)throw new Error(`SignedTransaction must not have more than 1 signature. Got ${a}`)}getEncodingSchema(){return xn.encodingSchema}toEncodingData(){return new Map([["txn",this.txn.toEncodingData()],["sig",this.sig],["msig",this.msig?hn(this.msig):void 0],["lsig",this.lsig?this.lsig.toEncodingData():void 0],["sgnr",this.sgnr]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SignedTransaction: ${t}`);return new xn({txn:je.fromEncodingData(t.get("txn")),sig:t.get("sig"),msig:t.get("msig")?cn(t.get("msig")):void 0,lsig:t.get("lsig")?mn.fromEncodingData(t.get("lsig")):void 0,sgnr:t.get("sgnr")})}}function Sn(t){return Qt(t,xn)}function An(t){return te(new xn({txn:t}))}xn.encodingSchema=new ue(de([{key:"txn",valueSchema:je.encodingSchema},{key:"sig",valueSchema:new ve(new le(64))},{key:"msig",valueSchema:new ve(ln)},{key:"lsig",valueSchema:new ve(mn.encodingSchema)},{key:"sgnr",valueSchema:new ve(new oe)}]));class Cn{constructor(t){this.stateProofVotersCommitment=t.stateProofVotersCommitment,this.stateProofOnlineTotalWeight=t.stateProofOnlineTotalWeight,this.stateProofNextRound=t.stateProofNextRound}getEncodingSchema(){return Cn.encodingSchema}toEncodingData(){return new Map([["v",this.stateProofVotersCommitment],["t",this.stateProofOnlineTotalWeight],["n",this.stateProofNextRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofTrackingData: ${t}`);return new Cn({stateProofVotersCommitment:t.get("v"),stateProofOnlineTotalWeight:t.get("t"),stateProofNextRound:t.get("n")})}}Cn.encodingSchema=new ue(de([{key:"v",valueSchema:new se},{key:"t",valueSchema:new ae},{key:"n",valueSchema:new ae}]));class kn{constructor(t){this.nativeSha512_256Commitment=t.nativeSha512_256Commitment,this.sha256Commitment=t.sha256Commitment}getEncodingSchema(){return kn.encodingSchema}toEncodingData(){return new Map([["txn",this.nativeSha512_256Commitment],["txn256",this.sha256Commitment]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TxnCommitments: ${t}`);return new kn({nativeSha512_256Commitment:t.get("txn"),sha256Commitment:t.get("txn256")})}}kn.encodingSchema=new ue(de([{key:"txn",valueSchema:new le(32)},{key:"txn256",valueSchema:new le(32)}]));class In{constructor(t){this.feeSink=t.feeSink,this.rewardsPool=t.rewardsPool,this.rewardsLevel=t.rewardsLevel,this.rewardsRate=t.rewardsRate,this.rewardsResidue=t.rewardsResidue,this.rewardsRecalculationRound=t.rewardsRecalculationRound}getEncodingSchema(){return In.encodingSchema}toEncodingData(){return new Map([["fees",this.feeSink],["rwd",this.rewardsPool],["earn",this.rewardsLevel],["rate",this.rewardsRate],["frac",this.rewardsResidue],["rwcalr",this.rewardsRecalculationRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded RewardState: ${t}`);return new In({feeSink:t.get("fees"),rewardsPool:t.get("rwd"),rewardsLevel:t.get("earn"),rewardsRate:t.get("rate"),rewardsResidue:t.get("frac"),rewardsRecalculationRound:t.get("rwcalr")})}}In.encodingSchema=new ue(de([{key:"fees",valueSchema:new oe},{key:"rwd",valueSchema:new oe},{key:"earn",valueSchema:new ae},{key:"rate",valueSchema:new ae},{key:"frac",valueSchema:new ae},{key:"rwcalr",valueSchema:new ae}]));class En{constructor(t){this.currentProtocol=t.currentProtocol,this.nextProtocol=t.nextProtocol,this.nextProtocolApprovals=t.nextProtocolApprovals,this.nextProtocolVoteBefore=t.nextProtocolVoteBefore,this.nextProtocolSwitchOn=t.nextProtocolSwitchOn}getEncodingSchema(){return En.encodingSchema}toEncodingData(){return new Map([["proto",this.currentProtocol],["nextproto",this.nextProtocol],["nextyes",this.nextProtocolApprovals],["nextbefore",this.nextProtocolVoteBefore],["nextswitch",this.nextProtocolSwitchOn]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded UpgradeState: ${t}`);return new En({currentProtocol:t.get("proto"),nextProtocol:t.get("nextproto"),nextProtocolApprovals:t.get("nextyes"),nextProtocolVoteBefore:t.get("nextbefore"),nextProtocolSwitchOn:t.get("nextswitch")})}}En.encodingSchema=new ue(de([{key:"proto",valueSchema:new re},{key:"nextproto",valueSchema:new re},{key:"nextyes",valueSchema:new ae},{key:"nextbefore",valueSchema:new ae},{key:"nextswitch",valueSchema:new ae}]));class _n{constructor(t){this.upgradePropose=t.upgradePropose,this.upgradeDelay=t.upgradeDelay,this.upgradeApprove=t.upgradeApprove}getEncodingSchema(){return _n.encodingSchema}toEncodingData(){return new Map([["upgradeprop",this.upgradePropose],["upgradedelay",this.upgradeDelay],["upgradeyes",this.upgradeApprove]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded UpgradeVote: ${t}`);return new _n({upgradePropose:t.get("upgradeprop"),upgradeDelay:t.get("upgradedelay"),upgradeApprove:t.get("upgradeyes")})}}_n.encodingSchema=new ue(de([{key:"upgradeprop",valueSchema:new re},{key:"upgradedelay",valueSchema:new ae},{key:"upgradeyes",valueSchema:new ie}]));class Mn{constructor(t){this.expiredParticipationAccounts=t.expiredParticipationAccounts,this.absentParticipationAccounts=t.absentParticipationAccounts}getEncodingSchema(){return Mn.encodingSchema}toEncodingData(){return new Map([["partupdrmv",this.expiredParticipationAccounts],["partupdabs",this.absentParticipationAccounts]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ParticipationUpdates: ${t}`);return new Mn({expiredParticipationAccounts:t.get("partupdrmv"),absentParticipationAccounts:t.get("partupdabs")})}}Mn.encodingSchema=new ue(de([{key:"partupdrmv",valueSchema:new he(new oe)},{key:"partupdabs",valueSchema:new he(new oe)}]));class Dn{constructor(t){this.round=t.round,this.branch=t.branch,this.seed=t.seed,this.txnCommitments=t.txnCommitments,this.timestamp=t.timestamp,this.genesisID=t.genesisID,this.genesisHash=t.genesisHash,this.proposer=t.proposer,this.feesCollected=t.feesCollected,this.bonus=t.bonus,this.proposerPayout=t.proposerPayout,this.rewardState=t.rewardState,this.upgradeState=t.upgradeState,this.upgradeVote=t.upgradeVote,this.txnCounter=t.txnCounter,this.stateproofTracking=t.stateproofTracking,this.participationUpdates=t.participationUpdates}getEncodingSchema(){return Dn.encodingSchema}toEncodingData(){return pe(new Map([["rnd",this.round],["prev",this.branch],["seed",this.seed],["ts",this.timestamp],["gen",this.genesisID],["gh",this.genesisHash],["prp",this.proposer],["fc",this.feesCollected],["bi",this.bonus],["pp",this.proposerPayout],["tc",this.txnCounter],["spt",me(this.stateproofTracking,((t,e)=>[t,e.toEncodingData()]))]]),this.txnCommitments.toEncodingData(),this.rewardState.toEncodingData(),this.upgradeState.toEncodingData(),this.upgradeVote.toEncodingData(),this.participationUpdates.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockHeader: ${t}`);return new Dn({round:t.get("rnd"),branch:t.get("prev"),seed:t.get("seed"),txnCommitments:kn.fromEncodingData(t),timestamp:t.get("ts"),genesisID:t.get("gen"),genesisHash:t.get("gh"),proposer:t.get("prp"),feesCollected:t.get("fc"),bonus:t.get("bi"),proposerPayout:t.get("pp"),rewardState:In.fromEncodingData(t),upgradeState:En.fromEncodingData(t),upgradeVote:_n.fromEncodingData(t),txnCounter:t.get("tc"),stateproofTracking:me(t.get("spt"),((t,e)=>[Number(t),Cn.fromEncodingData(e)])),participationUpdates:Mn.fromEncodingData(t)})}}Dn.encodingSchema=new ue(de([{key:"rnd",valueSchema:new ae},{key:"prev",valueSchema:new class extends $t{defaultValue(){return new Uint8Array(32)}isDefaultValue(t){return t instanceof Uint8Array&&32===t.byteLength&&t.every((t=>0===t))}prepareMsgpack(t){if(t instanceof Uint8Array&&32===t.byteLength)return t;throw new Error(`Invalid block hash: (${typeof t}) ${t}`)}fromPreparedMsgpack(t,e){if(t instanceof Uint8Array&&32===t.byteLength)return t;throw new Error(`Invalid block hash: (${typeof t}) ${t}`)}prepareJSON(t,e){if(t instanceof Uint8Array&&32===t.byteLength)return`blk-${D.encode(t).slice(0,52)}`;throw new Error(`Invalid block hash: (${typeof t}) ${t}`)}fromPreparedJSON(t){if("string"==typeof t&&56===t.length&&t.startsWith("blk-"))return Uint8Array.from(D.decode.asBytes(t.slice(4)));throw new Error(`Invalid block hash: (${typeof t}) ${t}`)}}},{key:"seed",valueSchema:new se},{key:"",valueSchema:kn.encodingSchema,embedded:!0},{key:"ts",valueSchema:new ae},{key:"gen",valueSchema:new re},{key:"gh",valueSchema:new le(32)},{key:"prp",valueSchema:new oe},{key:"fc",valueSchema:new ae},{key:"bi",valueSchema:new ae},{key:"pp",valueSchema:new ae},{key:"",valueSchema:In.encodingSchema,embedded:!0},{key:"",valueSchema:En.encodingSchema,embedded:!0},{key:"",valueSchema:_n.encodingSchema,embedded:!0},{key:"tc",valueSchema:new ae},{key:"spt",valueSchema:new ge(Cn.encodingSchema)},{key:"",valueSchema:Mn.encodingSchema,embedded:!0}]));class Pn{constructor(t){this.action=t.action,this.bytes=t.bytes,this.uint=t.uint}getEncodingSchema(){return Pn.encodingSchema}toEncodingData(){return new Map([["at",this.action],["bs",this.bytes],["ui",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ValueDelta: ${t}`);return new Pn({action:Number(t.get("at")),bytes:t.get("bs"),uint:t.get("ui")})}}Pn.encodingSchema=new ue(de([{key:"at",valueSchema:new ae},{key:"bs",valueSchema:new ce},{key:"ui",valueSchema:new ae}]));class Tn{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries(...de([{key:"gd",valueSchema:new ve(new ye(Pn.encodingSchema))},{key:"ld",valueSchema:new ve(new ge(new ye(Pn.encodingSchema)))},{key:"sa",valueSchema:new ve(new he(new oe))},{key:"lg",valueSchema:new ve(new he(new ce))},{key:"itx",valueSchema:new ve(new he(Bn.encodingSchema))}]))),this.encodingSchemaValue}constructor(t){this.globalDelta=t.globalDelta??new Map,this.localDeltas=t.localDeltas??new Map,this.sharedAccts=t.sharedAccts??[],this.logs=t.logs??[],this.innerTxns=t.innerTxns??[]}getEncodingSchema(){return Tn.encodingSchema}toEncodingData(){return new Map([["gd",me(this.globalDelta,((t,e)=>[t,e.toEncodingData()]))],["ld",me(this.localDeltas,((t,e)=>[t,me(e,((t,e)=>[t,e.toEncodingData()]))]))],["sa",this.sharedAccts],["lg",this.logs],["itx",this.innerTxns.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${t}`);return new Tn({globalDelta:t.get("gd")?me(t.get("gd"),((t,e)=>[t,Pn.fromEncodingData(e)])):void 0,localDeltas:t.get("ld")?me(t.get("ld"),((t,e)=>[Number(t),me(e,((t,e)=>[t,Pn.fromEncodingData(e)]))])):void 0,sharedAccts:t.get("sa"),logs:t.get("lg"),innerTxns:(t.get("itx")??[]).map(Bn.fromEncodingData)})}}class Ln{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries(...de([{key:"ca",valueSchema:new ve(new ae)},{key:"aca",valueSchema:new ve(new ae)},{key:"rs",valueSchema:new ve(new ae)},{key:"rr",valueSchema:new ve(new ae)},{key:"rc",valueSchema:new ve(new ae)},{key:"dt",valueSchema:new ve(Tn.encodingSchema)},{key:"caid",valueSchema:new ve(new ae)},{key:"apid",valueSchema:new ve(new ae)}]))),this.encodingSchemaValue}constructor(t){this.closingAmount=t.closingAmount,this.assetClosingAmount=t.assetClosingAmount,this.senderRewards=t.senderRewards,this.receiverRewards=t.receiverRewards,this.closeRewards=t.closeRewards,this.evalDelta=t.evalDelta,this.configAsset=t.configAsset,this.applicationID=t.applicationID}getEncodingSchema(){return Ln.encodingSchema}toEncodingData(){return new Map([["ca",this.closingAmount],["aca",this.assetClosingAmount],["rs",this.senderRewards],["rr",this.receiverRewards],["rc",this.closeRewards],["dt",this.evalDelta?this.evalDelta.toEncodingData():void 0],["caid",this.configAsset],["apid",this.applicationID]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplyData: ${t}`);return new Ln({closingAmount:t.get("ca"),assetClosingAmount:t.get("aca"),senderRewards:t.get("rs"),receiverRewards:t.get("rr"),closeRewards:t.get("rc"),evalDelta:t.get("dt")?Tn.fromEncodingData(t.get("dt")):void 0,configAsset:t.get("caid"),applicationID:t.get("apid")})}}class Bn{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries(...de([{key:"",valueSchema:xn.encodingSchema,embedded:!0},{key:"",valueSchema:Ln.encodingSchema,embedded:!0}]))),this.encodingSchemaValue}constructor(t){this.signedTxn=t.signedTxn,this.applyData=t.applyData}getEncodingSchema(){return Bn.encodingSchema}toEncodingData(){return pe(this.signedTxn.toEncodingData(),this.applyData.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SignedTxnWithAD: ${t}`);return new Bn({signedTxn:xn.fromEncodingData(t),applyData:Ln.fromEncodingData(t)})}}class Fn{constructor(t){this.signedTxn=t.signedTxn,this.hasGenesisID=t.hasGenesisID,this.hasGenesisHash=t.hasGenesisHash}getEncodingSchema(){return Fn.encodingSchema}toEncodingData(){return pe(new Map([["hgi",this.hasGenesisID],["hgh",this.hasGenesisHash]]),this.signedTxn.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SignedTxnInBlock: ${t}`);return new Fn({signedTxn:Bn.fromEncodingData(t),hasGenesisID:t.get("hgi"),hasGenesisHash:t.get("hgh")})}}Fn.encodingSchema=new ue(de([{key:"",valueSchema:Bn.encodingSchema,embedded:!0},{key:"hgi",valueSchema:new ie},{key:"hgh",valueSchema:new ie}]));class Rn{constructor(t){this.header=t.header,this.payset=t.payset}getEncodingSchema(){return Rn.encodingSchema}toEncodingData(){return pe(new Map([["txns",this.payset.map((t=>t.toEncodingData()))]]),this.header.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockHeader: ${t}`);return new Rn({header:Dn.fromEncodingData(t),payset:t.get("txns").map(Fn.fromEncodingData)})}}Rn.encodingSchema=new ue(de([{key:"",valueSchema:Dn.encodingSchema,embedded:!0},{key:"txns",valueSchema:new he(Fn.encodingSchema)}]));class Nn{constructor(t){this.data=t}getEncodingSchema(){return Nn.encodingSchema}toEncodingData(){return this.data}static fromEncodingData(t){return new Nn(t)}}Nn.encodingSchema=new we;class Vn{constructor(t){this.type=t.type,this.bytes=t.bytes,this.uint=t.uint}getEncodingSchema(){return Vn.encodingSchema}toEncodingData(){return new Map([["tt",this.type],["tb",this.bytes],["ui",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TealValue: ${t}`);return new Vn({type:Number(t.get("tt")),bytes:t.get("tb"),uint:t.get("ui")})}}Vn.encodingSchema=new ue(de([{key:"tt",valueSchema:new ae},{key:"tb",valueSchema:new ve(new ce)},{key:"ui",valueSchema:new ve(new ae)}]));class zn{constructor(t){this.numUints=t.numUints,this.numByteSlices=t.numByteSlices}getEncodingSchema(){return zn.encodingSchema}toEncodingData(){return new Map([["nui",this.numUints],["nbs",this.numByteSlices]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateSchema: ${t}`);return new zn({numUints:Number(t.get("nui")),numByteSlices:Number(t.get("nbs"))})}}zn.encodingSchema=new ue(de([{key:"nui",valueSchema:new ae},{key:"nbs",valueSchema:new ae}]));class Gn{constructor(t){this.approvalProgram=t.approvalProgram,this.clearStateProgram=t.clearStateProgram,this.globalState=t.globalState,this.localStateSchema=t.localStateSchema,this.globalStateSchema=t.globalStateSchema,this.extraProgramPages=t.extraProgramPages}getEncodingSchema(){return Gn.encodingSchema}toEncodingData(){return new Map([["approv",this.approvalProgram],["clearp",this.clearStateProgram],["gs",me(this.globalState,((t,e)=>[t,e.toEncodingData()]))],["lsch",this.localStateSchema.toEncodingData()],["gsch",this.globalStateSchema.toEncodingData()],["epp",this.extraProgramPages]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppParams: ${t}`);return new Gn({approvalProgram:t.get("approv"),clearStateProgram:t.get("clearp"),globalState:me(t.get("gs"),((t,e)=>[t,Vn.fromEncodingData(e)])),localStateSchema:zn.fromEncodingData(t.get("lsch")),globalStateSchema:zn.fromEncodingData(t.get("gsch")),extraProgramPages:Number(t.get("epp"))})}}Gn.encodingSchema=new ue(de([{key:"approv",valueSchema:new se},{key:"clearp",valueSchema:new se},{key:"gs",valueSchema:new ye(Vn.encodingSchema)},{key:"lsch",valueSchema:zn.encodingSchema},{key:"gsch",valueSchema:zn.encodingSchema},{key:"epp",valueSchema:new ae}]));class Wn{constructor(t){this.schema=t.schema,this.keyValue=t.keyValue}getEncodingSchema(){return Wn.encodingSchema}toEncodingData(){return new Map([["hsch",this.schema.toEncodingData()],["tkv",me(this.keyValue,((t,e)=>[t,e.toEncodingData()]))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppLocalState: ${t}`);return new Wn({schema:zn.fromEncodingData(t.get("hsch")),keyValue:me(t.get("tkv"),((t,e)=>[t,Vn.fromEncodingData(e)]))})}}Wn.encodingSchema=new ue(de([{key:"hsch",valueSchema:zn.encodingSchema},{key:"tkv",valueSchema:new ye(Vn.encodingSchema)}]));class On{constructor(t){this.localState=t.localState,this.deleted=t.deleted}getEncodingSchema(){return On.encodingSchema}toEncodingData(){return new Map([["LocalState",this.localState?this.localState.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppLocalStateDelta: ${t}`);return new On({localState:t.get("LocalState")?Wn.fromEncodingData(t.get("LocalState")):void 0,deleted:t.get("Deleted")})}}On.encodingSchema=new ue(de([{key:"LocalState",valueSchema:new ve(Wn.encodingSchema)},{key:"Deleted",valueSchema:new ie}]));class Zn{constructor(t){this.params=t.params,this.deleted=t.deleted}getEncodingSchema(){return Zn.encodingSchema}toEncodingData(){return new Map([["Params",this.params?this.params.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppParamsDelta: ${t}`);return new Zn({params:t.get("Params")?Gn.fromEncodingData(t.get("Params")):void 0,deleted:t.get("Deleted")})}}Zn.encodingSchema=new ue(de([{key:"Params",valueSchema:new ve(Gn.encodingSchema)},{key:"Deleted",valueSchema:new ie}]));class Yn{constructor(t){this.id=t.id,this.address=t.address,this.params=t.params,this.state=t.state}getEncodingSchema(){return Yn.encodingSchema}toEncodingData(){return new Map([["Aidx",this.id],["Addr",this.address],["Params",this.params.toEncodingData()],["State",this.state.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppResourceRecord: ${t}`);return new Yn({id:t.get("Aidx"),address:t.get("Addr"),params:Zn.fromEncodingData(t.get("Params")),state:On.fromEncodingData(t.get("State"))})}}Yn.encodingSchema=new ue(de([{key:"Aidx",valueSchema:new ae},{key:"Addr",valueSchema:new oe},{key:"Params",valueSchema:Zn.encodingSchema},{key:"State",valueSchema:On.encodingSchema}]));class Hn{constructor(t){this.amount=t.amount,this.frozen=t.frozen}getEncodingSchema(){return Hn.encodingSchema}toEncodingData(){return new Map([["a",this.amount],["f",this.frozen]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${t}`);return new Hn({amount:t.get("a"),frozen:t.get("f")})}}Hn.encodingSchema=new ue(de([{key:"a",valueSchema:new ae},{key:"f",valueSchema:new ie}]));class jn{constructor(t){this.holding=t.holding,this.deleted=t.deleted}getEncodingSchema(){return jn.encodingSchema}toEncodingData(){return new Map([["Holding",this.holding?this.holding.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHoldingDelta: ${t}`);return new jn({holding:t.get("Holding")?Hn.fromEncodingData(t.get("Holding")):void 0,deleted:t.get("Deleted")})}}jn.encodingSchema=new ue(de([{key:"Holding",valueSchema:new ve(Hn.encodingSchema)},{key:"Deleted",valueSchema:new ie}]));class Xn{constructor(t){this.total=t.total,this.decimals=t.decimals,this.defaultFrozen=t.defaultFrozen,this.unitName=t.unitName,this.assetName=t.assetName,this.url=t.url,this.metadataHash=t.metadataHash,this.manager=t.manager,this.reserve=t.reserve,this.freeze=t.freeze,this.clawback=t.clawback}getEncodingSchema(){return Xn.encodingSchema}toEncodingData(){return new Map([["t",this.total],["dc",this.decimals],["df",this.defaultFrozen],["un",this.unitName],["an",this.assetName],["au",this.url],["am",this.metadataHash],["m",this.manager],["r",this.reserve],["f",this.freeze],["c",this.clawback]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetParams: ${t}`);return new Xn({total:t.get("t"),decimals:t.get("dc"),defaultFrozen:t.get("df"),unitName:t.get("un"),assetName:t.get("an"),url:t.get("au"),metadataHash:t.get("am"),manager:t.get("m"),reserve:t.get("r"),freeze:t.get("f"),clawback:t.get("c")})}}Xn.encodingSchema=new ue(de([{key:"t",valueSchema:new ae},{key:"dc",valueSchema:new ae},{key:"df",valueSchema:new ie},{key:"un",valueSchema:new ve(new ce)},{key:"an",valueSchema:new ve(new ce)},{key:"au",valueSchema:new ve(new ce)},{key:"am",valueSchema:new le(32)},{key:"m",valueSchema:new ve(new oe)},{key:"r",valueSchema:new ve(new oe)},{key:"f",valueSchema:new ve(new oe)},{key:"c",valueSchema:new ve(new oe)}]));class Un{constructor(t){this.params=t.params,this.deleted=t.deleted}getEncodingSchema(){return Un.encodingSchema}toEncodingData(){return new Map([["Params",this.params?this.params.toEncodingData():void 0],["Deleted",this.deleted]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetParamsDelta: ${t}`);return new Un({params:t.get("Params")?Xn.fromEncodingData(t.get("Params")):void 0,deleted:t.get("Deleted")})}}Un.encodingSchema=new ue(de([{key:"Params",valueSchema:new ve(Xn.encodingSchema)},{key:"Deleted",valueSchema:new ie}]));class Kn{constructor(t){this.id=t.id,this.address=t.address,this.params=t.params,this.holding=t.holding}getEncodingSchema(){return Kn.encodingSchema}toEncodingData(){return new Map([["Aidx",this.id],["Addr",this.address],["Params",this.params.toEncodingData()],["Holding",this.holding.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetResourceRecord: ${t}`);return new Kn({id:t.get("Aidx"),address:t.get("Addr"),params:Un.fromEncodingData(t.get("Params")),holding:jn.fromEncodingData(t.get("Holding"))})}}Kn.encodingSchema=new ue(de([{key:"Aidx",valueSchema:new ae},{key:"Addr",valueSchema:new oe},{key:"Params",valueSchema:Un.encodingSchema},{key:"Holding",valueSchema:jn.encodingSchema}]));class Jn{constructor(t){this.voteID=t.voteID,this.selectionID=t.selectionID,this.stateProofID=t.stateProofID,this.voteFirstValid=t.voteFirstValid,this.voteLastValid=t.voteLastValid,this.voteKeyDilution=t.voteKeyDilution}getEncodingSchema(){return Jn.encodingSchema}toEncodingData(){return new Map([["VoteID",this.voteID],["SelectionID",this.selectionID],["StateProofID",this.stateProofID],["VoteFirstValid",this.voteFirstValid],["VoteLastValid",this.voteLastValid],["VoteKeyDilution",this.voteKeyDilution]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded VotingData: ${t}`);return new Jn({voteID:t.get("VoteID"),selectionID:t.get("SelectionID"),stateProofID:t.get("StateProofID"),voteFirstValid:t.get("VoteFirstValid"),voteLastValid:t.get("VoteLastValid"),voteKeyDilution:t.get("VoteKeyDilution")})}}Jn.encodingSchema=new ue(de([{key:"VoteID",valueSchema:new le(32)},{key:"SelectionID",valueSchema:new le(32)},{key:"StateProofID",valueSchema:new le(64)},{key:"VoteFirstValid",valueSchema:new ae},{key:"VoteLastValid",valueSchema:new ae},{key:"VoteKeyDilution",valueSchema:new ae}]));class qn{constructor(t){this.status=t.status,this.microAlgos=t.microAlgos,this.rewardsBase=t.rewardsBase,this.rewardedMicroAlgos=t.rewardedMicroAlgos,this.authAddr=t.authAddr,this.incentiveEligible=t.incentiveEligible,this.totalAppSchema=t.totalAppSchema,this.totalExtraAppPages=t.totalExtraAppPages,this.totalAppParams=t.totalAppParams,this.totalAppLocalStates=t.totalAppLocalStates,this.totalAssetParams=t.totalAssetParams,this.totalAssets=t.totalAssets,this.totalBoxes=t.totalBoxes,this.totalBoxBytes=t.totalBoxBytes,this.lastProposed=t.lastProposed,this.lastHeartbeat=t.lastHeartbeat}getEncodingSchema(){return qn.encodingSchema}toEncodingData(){return new Map([["Status",this.status],["MicroAlgos",this.microAlgos],["RewardsBase",this.rewardsBase],["RewardedMicroAlgos",this.rewardedMicroAlgos],["AuthAddr",this.authAddr],["IncentiveEligible",this.incentiveEligible],["TotalAppSchema",this.totalAppSchema.toEncodingData()],["TotalExtraAppPages",this.totalExtraAppPages],["TotalAppParams",this.totalAppParams],["TotalAppLocalStates",this.totalAppLocalStates],["TotalAssetParams",this.totalAssetParams],["TotalAssets",this.totalAssets],["TotalBoxes",this.totalBoxes],["TotalBoxBytes",this.totalBoxBytes],["LastProposed",this.lastProposed],["LastHeartbeat",this.lastHeartbeat]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountBaseData: ${t}`);return new qn({status:Number(t.get("Status")),microAlgos:t.get("MicroAlgos"),rewardsBase:t.get("RewardsBase"),rewardedMicroAlgos:t.get("RewardedMicroAlgos"),authAddr:t.get("AuthAddr"),incentiveEligible:t.get("IncentiveEligible"),totalAppSchema:zn.fromEncodingData(t.get("TotalAppSchema")),totalExtraAppPages:Number(t.get("TotalExtraAppPages")),totalAppParams:t.get("TotalAppParams"),totalAppLocalStates:t.get("TotalAppLocalStates"),totalAssetParams:t.get("TotalAssetParams"),totalAssets:t.get("TotalAssets"),totalBoxes:t.get("TotalBoxes"),totalBoxBytes:t.get("TotalBoxBytes"),lastProposed:t.get("LastProposed"),lastHeartbeat:t.get("LastHeartbeat")})}}qn.encodingSchema=new ue(de([{key:"Status",valueSchema:new ae},{key:"MicroAlgos",valueSchema:new ae},{key:"RewardsBase",valueSchema:new ae},{key:"RewardedMicroAlgos",valueSchema:new ae},{key:"AuthAddr",valueSchema:new oe},{key:"IncentiveEligible",valueSchema:new ie},{key:"TotalAppSchema",valueSchema:zn.encodingSchema},{key:"TotalExtraAppPages",valueSchema:new ae},{key:"TotalAppParams",valueSchema:new ae},{key:"TotalAppLocalStates",valueSchema:new ae},{key:"TotalAssetParams",valueSchema:new ae},{key:"TotalAssets",valueSchema:new ae},{key:"TotalBoxes",valueSchema:new ae},{key:"TotalBoxBytes",valueSchema:new ae},{key:"LastProposed",valueSchema:new ae},{key:"LastHeartbeat",valueSchema:new ae}]));class $n{constructor(t){this.accountBaseData=t.accountBaseData,this.votingData=t.votingData}getEncodingSchema(){return $n.encodingSchema}toEncodingData(){return pe(this.accountBaseData.toEncodingData(),this.votingData.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountData: ${t}`);return new $n({accountBaseData:qn.fromEncodingData(t),votingData:Jn.fromEncodingData(t)})}}$n.encodingSchema=new ue(de([{key:"",valueSchema:qn.encodingSchema,embedded:!0},{key:"",valueSchema:Jn.encodingSchema,embedded:!0}]));class Qn{constructor(t){this.addr=t.addr,this.accountData=t.accountData}getEncodingSchema(){return Qn.encodingSchema}toEncodingData(){return pe(new Map([["Addr",this.addr]]),this.accountData.toEncodingData())}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BalanceRecord: ${t}`);return new Qn({addr:t.get("Addr"),accountData:$n.fromEncodingData(t)})}}Qn.encodingSchema=new ue(de([{key:"Addr",valueSchema:new oe},{key:"",valueSchema:$n.encodingSchema,embedded:!0}]));class ti{constructor(t){this.accounts=t.accounts,this.appResources=t.appResources,this.assetResources=t.assetResources}getEncodingSchema(){return ti.encodingSchema}toEncodingData(){return new Map([["Accts",this.accounts.map((t=>t.toEncodingData()))],["AppResources",0===this.appResources.length?void 0:this.appResources.map((t=>t.toEncodingData()))],["AssetResources",0===this.assetResources.length?void 0:this.assetResources.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountDeltas: ${t}`);return new ti({accounts:(t.get("Accts")??[]).map(Qn.fromEncodingData),appResources:(t.get("AppResources")??[]).map(Yn.fromEncodingData),assetResources:(t.get("AssetResources")??[]).map(Kn.fromEncodingData)})}}ti.encodingSchema=new ue(de([{key:"Accts",valueSchema:new he(Qn.encodingSchema)},{key:"AppResources",valueSchema:new ve(new he(Yn.encodingSchema))},{key:"AssetResources",valueSchema:new ve(new he(Kn.encodingSchema))}]));class ei{constructor(t){this.data=t.data,this.oldData=t.oldData}getEncodingSchema(){return ei.encodingSchema}toEncodingData(){return new Map([["Data",this.data],["OldData",this.oldData]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded KvValueDelta: ${t}`);return new ei({data:t.get("Data"),oldData:t.get("OldData")})}}ei.encodingSchema=new ue(de([{key:"Data",valueSchema:new ve(new se)},{key:"OldData",valueSchema:new ve(new se)}]));class ni{constructor(t){this.lastValid=t.lastValid,this.intra=t.intra}getEncodingSchema(){return ni.encodingSchema}toEncodingData(){return new Map([["LastValid",this.lastValid],["Intra",this.intra]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded IncludedTransactions: ${t}`);return new ni({lastValid:t.get("LastValid"),intra:Number(t.get("Intra"))})}}ni.encodingSchema=new ue(de([{key:"LastValid",valueSchema:new ae},{key:"Intra",valueSchema:new ae}]));class ii{constructor(t){this.creatableType=t.creatableType,this.created=t.created,this.creator=t.creator,this.ndeltas=t.ndeltas}getEncodingSchema(){return ii.encodingSchema}toEncodingData(){return new Map([["Ctype",this.creatableType],["Created",this.created],["Creator",this.creator],["Ndeltas",this.ndeltas]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ModifiedCreatable: ${t}`);return new ii({creatableType:Number(t.get("Ctype")),created:t.get("Created"),creator:t.get("Creator"),ndeltas:Number(t.get("Ndeltas"))})}}ii.encodingSchema=new ue(de([{key:"Ctype",valueSchema:new ae},{key:"Created",valueSchema:new ie},{key:"Creator",valueSchema:new oe},{key:"Ndeltas",valueSchema:new ae}]));class ri{constructor(t){this.money=t.money,this.rewardUnits=t.rewardUnits}getEncodingSchema(){return ri.encodingSchema}toEncodingData(){return new Map([["mon",this.money],["rwd",this.rewardUnits]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AlgoCount: ${t}`);return new ri({money:t.get("mon"),rewardUnits:t.get("rwd")})}}ri.encodingSchema=new ue(de([{key:"mon",valueSchema:new ae},{key:"rwd",valueSchema:new ae}]));class ai{constructor(t){this.online=t.online,this.offline=t.offline,this.notParticipating=t.notParticipating,this.rewardsLevel=t.rewardsLevel}getEncodingSchema(){return ai.encodingSchema}toEncodingData(){return new Map([["online",this.online.toEncodingData()],["offline",this.offline.toEncodingData()],["notpart",this.notParticipating.toEncodingData()],["rwdlvl",this.rewardsLevel]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountTotals: ${t}`);return new ai({online:ri.fromEncodingData(t.get("online")),offline:ri.fromEncodingData(t.get("offline")),notParticipating:ri.fromEncodingData(t.get("notpart")),rewardsLevel:t.get("rwdlvl")})}}ai.encodingSchema=new ue(de([{key:"online",valueSchema:ri.encodingSchema},{key:"offline",valueSchema:ri.encodingSchema},{key:"notpart",valueSchema:ri.encodingSchema},{key:"rwdlvl",valueSchema:new ae}]));class oi{constructor(t){this.accounts=t.accounts,this.kvMods=t.kvMods,this.txids=t.txids,this.txleases=t.txleases,this.creatables=t.creatables,this.blockHeader=t.blockHeader,this.stateProofNext=t.stateProofNext,this.prevTimestamp=t.prevTimestamp,this.totals=t.totals}getEncodingSchema(){return oi.encodingSchema}toEncodingData(){return new Map([["Accts",this.accounts.toEncodingData()],["KvMods",0===this.kvMods.size?void 0:me(this.kvMods,((t,e)=>[t,e.toEncodingData()]))],["Txids",me(this.txids,((t,e)=>[t,e.toEncodingData()]))],["Txleases",this.txleases.toEncodingData()],["Creatables",0===this.creatables.size?void 0:me(this.creatables,((t,e)=>[t,e.toEncodingData()]))],["Hdr",this.blockHeader.toEncodingData()],["StateProofNext",this.stateProofNext],["PrevTimestamp",this.prevTimestamp],["Totals",this.totals.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded LedgerStateDelta: ${t}`);return new oi({accounts:ti.fromEncodingData(t.get("Accts")),kvMods:me(t.get("KvMods")??new Map,((t,e)=>[t,ei.fromEncodingData(e)])),txids:me(t.get("Txids"),((t,e)=>[t,ni.fromEncodingData(e)])),txleases:Nn.fromEncodingData(t.get("Txleases")),creatables:me(t.get("Creatables")??new Map,((t,e)=>[t,ii.fromEncodingData(e)])),blockHeader:Dn.fromEncodingData(t.get("Hdr")),stateProofNext:t.get("StateProofNext"),prevTimestamp:t.get("PrevTimestamp"),totals:ai.fromEncodingData(t.get("Totals"))})}}oi.encodingSchema=new ue(de([{key:"Accts",valueSchema:ti.encodingSchema},{key:"KvMods",valueSchema:new ve(new ye(ei.encodingSchema))},{key:"Txids",valueSchema:new class extends $t{constructor(t){super(),this.valueSchema=t}defaultValue(){return new Map}isDefaultValue(t){return t instanceof Map&&0===t.size}prepareMsgpack(t){if(!(t instanceof Map))throw new Error(`ByteArrayMapSchema data must be a Map. Got (${typeof t}) ${t}`);const e=new Map;for(const[n,i]of t){if(!(n instanceof Uint8Array))throw new Error(`Invalid key: ${n} (${typeof n})`);e.set(n,this.valueSchema.prepareMsgpack(i))}return e}fromPreparedMsgpack(t,e){if(!(t instanceof Map))throw new Error("ByteArrayMapSchema data must be a Map");const n=new Map;for(const[i,r]of t){if(!(i instanceof Uint8Array))throw new Error(`Invalid key: ${i} (${typeof i})`);n.set(i,this.valueSchema.fromPreparedMsgpack(r,e.withMapValue(i)))}return n}prepareJSON(t,e){if(!(t instanceof Map))throw new Error(`ByteArrayMapSchema data must be a Map. Got (${typeof t}) ${t}`);const n=new Map;for(const[i,r]of t){if(!(i instanceof Uint8Array))throw new Error(`Invalid key: ${i} (${typeof i})`);const t=B(i);if(n.has(t))throw new Error(`Duplicate key (base64): ${t}`);n.set(t,this.valueSchema.prepareJSON(r,e))}const i={};for(const[t,e]of n)i[t]=e;return i}fromPreparedJSON(t){if(null==t||"object"!=typeof t||Array.isArray(t))throw new Error("ByteArrayMapSchema data must be an object");const e=new Map;for(const[n,i]of Object.entries(t))e.set(L(n),this.valueSchema.fromPreparedJSON(i));return e}}(ni.encodingSchema)},{key:"Txleases",valueSchema:new ve(new we)},{key:"Creatables",valueSchema:new ve(new ge(ii.encodingSchema))},{key:"Hdr",valueSchema:Dn.encodingSchema},{key:"StateProofNext",valueSchema:new ae},{key:"PrevTimestamp",valueSchema:new ae},{key:"Totals",valueSchema:ai.encodingSchema}]));class si{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"amount-without-pending-rewards",valueSchema:new ae,omitEmpty:!0},{key:"min-balance",valueSchema:new ae,omitEmpty:!0},{key:"pending-rewards",valueSchema:new ae,omitEmpty:!0},{key:"rewards",valueSchema:new ae,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"status",valueSchema:new re,omitEmpty:!0},{key:"total-apps-opted-in",valueSchema:new ae,omitEmpty:!0},{key:"total-assets-opted-in",valueSchema:new ae,omitEmpty:!0},{key:"total-created-apps",valueSchema:new ae,omitEmpty:!0},{key:"total-created-assets",valueSchema:new ae,omitEmpty:!0},{key:"apps-local-state",valueSchema:new ve(new he(wi.encodingSchema)),omitEmpty:!0},{key:"apps-total-extra-pages",valueSchema:new ve(new ae),omitEmpty:!0},{key:"apps-total-schema",valueSchema:new ve(Si.encodingSchema),omitEmpty:!0},{key:"assets",valueSchema:new ve(new he(Ci.encodingSchema)),omitEmpty:!0},{key:"auth-addr",valueSchema:new ve(new re),omitEmpty:!0},{key:"created-apps",valueSchema:new ve(new he(gi.encodingSchema)),omitEmpty:!0},{key:"created-assets",valueSchema:new ve(new he(Ai.encodingSchema)),omitEmpty:!0},{key:"incentive-eligible",valueSchema:new ve(new ie),omitEmpty:!0},{key:"last-heartbeat",valueSchema:new ve(new ae),omitEmpty:!0},{key:"last-proposed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"participation",valueSchema:new ve(ui.encodingSchema),omitEmpty:!0},{key:"reward-base",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sig-type",valueSchema:new ve(new re),omitEmpty:!0},{key:"total-box-bytes",valueSchema:new ve(new ae),omitEmpty:!0},{key:"total-boxes",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,amount:e,amountWithoutPendingRewards:n,minBalance:i,pendingRewards:r,rewards:a,round:o,status:s,totalAppsOptedIn:l,totalAssetsOptedIn:c,totalCreatedApps:h,totalCreatedAssets:d,appsLocalState:u,appsTotalExtraPages:p,appsTotalSchema:m,assets:g,authAddr:f,createdApps:v,createdAssets:b,incentiveEligible:x,lastHeartbeat:S,lastProposed:A,participation:C,rewardBase:k,sigType:I,totalBoxBytes:E,totalBoxes:_}){this.address=t,this.amount=w(e),this.amountWithoutPendingRewards=w(n),this.minBalance=w(i),this.pendingRewards=w(r),this.rewards=w(a),this.round=w(o),this.status=s,this.totalAppsOptedIn=y(l),this.totalAssetsOptedIn=y(c),this.totalCreatedApps=y(h),this.totalCreatedAssets=y(d),this.appsLocalState=u,this.appsTotalExtraPages=void 0===p?void 0:y(p),this.appsTotalSchema=m,this.assets=g,this.authAddr="string"==typeof f?Y.fromString(f):f,this.createdApps=v,this.createdAssets=b,this.incentiveEligible=x,this.lastHeartbeat=void 0===S?void 0:y(S),this.lastProposed=void 0===A?void 0:y(A),this.participation=C,this.rewardBase=void 0===k?void 0:w(k),this.sigType=I,this.totalBoxBytes=void 0===E?void 0:y(E),this.totalBoxes=void 0===_?void 0:y(_)}getEncodingSchema(){return si.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["amount-without-pending-rewards",this.amountWithoutPendingRewards],["min-balance",this.minBalance],["pending-rewards",this.pendingRewards],["rewards",this.rewards],["round",this.round],["status",this.status],["total-apps-opted-in",this.totalAppsOptedIn],["total-assets-opted-in",this.totalAssetsOptedIn],["total-created-apps",this.totalCreatedApps],["total-created-assets",this.totalCreatedAssets],["apps-local-state",void 0!==this.appsLocalState?this.appsLocalState.map((t=>t.toEncodingData())):void 0],["apps-total-extra-pages",this.appsTotalExtraPages],["apps-total-schema",void 0!==this.appsTotalSchema?this.appsTotalSchema.toEncodingData():void 0],["assets",void 0!==this.assets?this.assets.map((t=>t.toEncodingData())):void 0],["auth-addr",void 0!==this.authAddr?this.authAddr.toString():void 0],["created-apps",void 0!==this.createdApps?this.createdApps.map((t=>t.toEncodingData())):void 0],["created-assets",void 0!==this.createdAssets?this.createdAssets.map((t=>t.toEncodingData())):void 0],["incentive-eligible",this.incentiveEligible],["last-heartbeat",this.lastHeartbeat],["last-proposed",this.lastProposed],["participation",void 0!==this.participation?this.participation.toEncodingData():void 0],["reward-base",this.rewardBase],["sig-type",this.sigType],["total-box-bytes",this.totalBoxBytes],["total-boxes",this.totalBoxes]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Account: ${t}`);return new si({address:t.get("address"),amount:t.get("amount"),amountWithoutPendingRewards:t.get("amount-without-pending-rewards"),minBalance:t.get("min-balance"),pendingRewards:t.get("pending-rewards"),rewards:t.get("rewards"),round:t.get("round"),status:t.get("status"),totalAppsOptedIn:t.get("total-apps-opted-in"),totalAssetsOptedIn:t.get("total-assets-opted-in"),totalCreatedApps:t.get("total-created-apps"),totalCreatedAssets:t.get("total-created-assets"),appsLocalState:void 0!==t.get("apps-local-state")?t.get("apps-local-state").map((t=>wi.fromEncodingData(t))):void 0,appsTotalExtraPages:t.get("apps-total-extra-pages"),appsTotalSchema:void 0!==t.get("apps-total-schema")?Si.fromEncodingData(t.get("apps-total-schema")):void 0,assets:void 0!==t.get("assets")?t.get("assets").map((t=>Ci.fromEncodingData(t))):void 0,authAddr:t.get("auth-addr"),createdApps:void 0!==t.get("created-apps")?t.get("created-apps").map((t=>gi.fromEncodingData(t))):void 0,createdAssets:void 0!==t.get("created-assets")?t.get("created-assets").map((t=>Ai.fromEncodingData(t))):void 0,incentiveEligible:t.get("incentive-eligible"),lastHeartbeat:t.get("last-heartbeat"),lastProposed:t.get("last-proposed"),participation:void 0!==t.get("participation")?ui.fromEncodingData(t.get("participation")):void 0,rewardBase:t.get("reward-base"),sigType:t.get("sig-type"),totalBoxBytes:t.get("total-box-bytes"),totalBoxes:t.get("total-boxes")})}}class li{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new ae,omitEmpty:!0},{key:"app-local-state",valueSchema:new ve(wi.encodingSchema),omitEmpty:!0},{key:"created-app",valueSchema:new ve(bi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:t,appLocalState:e,createdApp:n}){this.round=w(t),this.appLocalState=e,this.createdApp=n}getEncodingSchema(){return li.encodingSchema}toEncodingData(){return new Map([["round",this.round],["app-local-state",void 0!==this.appLocalState?this.appLocalState.toEncodingData():void 0],["created-app",void 0!==this.createdApp?this.createdApp.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountApplicationResponse: ${t}`);return new li({round:t.get("round"),appLocalState:void 0!==t.get("app-local-state")?wi.fromEncodingData(t.get("app-local-state")):void 0,createdApp:void 0!==t.get("created-app")?bi.fromEncodingData(t.get("created-app")):void 0})}}class ci{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"asset-holding",valueSchema:Ci.encodingSchema,omitEmpty:!0},{key:"asset-params",valueSchema:new ve(Ii.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assetHolding:t,assetParams:e}){this.assetHolding=t,this.assetParams=e}getEncodingSchema(){return ci.encodingSchema}toEncodingData(){return new Map([["asset-holding",this.assetHolding.toEncodingData()],["asset-params",void 0!==this.assetParams?this.assetParams.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountAssetHolding: ${t}`);return new ci({assetHolding:Ci.fromEncodingData(t.get("asset-holding")??new Map),assetParams:void 0!==t.get("asset-params")?Ii.fromEncodingData(t.get("asset-params")):void 0})}}class hi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new ae,omitEmpty:!0},{key:"asset-holding",valueSchema:new ve(Ci.encodingSchema),omitEmpty:!0},{key:"created-asset",valueSchema:new ve(Ii.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:t,assetHolding:e,createdAsset:n}){this.round=w(t),this.assetHolding=e,this.createdAsset=n}getEncodingSchema(){return hi.encodingSchema}toEncodingData(){return new Map([["round",this.round],["asset-holding",void 0!==this.assetHolding?this.assetHolding.toEncodingData():void 0],["created-asset",void 0!==this.createdAsset?this.createdAsset.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountAssetResponse: ${t}`);return new hi({round:t.get("round"),assetHolding:void 0!==t.get("asset-holding")?Ci.fromEncodingData(t.get("asset-holding")):void 0,createdAsset:void 0!==t.get("created-asset")?Ii.fromEncodingData(t.get("created-asset")):void 0})}}class di{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new ae,omitEmpty:!0},{key:"asset-holdings",valueSchema:new ve(new he(ci.encodingSchema)),omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({round:t,assetHoldings:e,nextToken:n}){this.round=y(t),this.assetHoldings=e,this.nextToken=n}getEncodingSchema(){return di.encodingSchema}toEncodingData(){return new Map([["round",this.round],["asset-holdings",void 0!==this.assetHoldings?this.assetHoldings.map((t=>t.toEncodingData())):void 0],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountAssetsInformationResponse: ${t}`);return new di({round:t.get("round"),assetHoldings:void 0!==t.get("asset-holdings")?t.get("asset-holdings").map((t=>ci.fromEncodingData(t))):void 0,nextToken:t.get("next-token")})}}class ui{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"selection-participation-key",valueSchema:new se,omitEmpty:!0},{key:"vote-first-valid",valueSchema:new ae,omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new ae,omitEmpty:!0},{key:"vote-last-valid",valueSchema:new ae,omitEmpty:!0},{key:"vote-participation-key",valueSchema:new se,omitEmpty:!0},{key:"state-proof-key",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({selectionParticipationKey:t,voteFirstValid:e,voteKeyDilution:n,voteLastValid:i,voteParticipationKey:r,stateProofKey:a}){this.selectionParticipationKey="string"==typeof t?L(t):t,this.voteFirstValid=w(e),this.voteKeyDilution=w(n),this.voteLastValid=w(i),this.voteParticipationKey="string"==typeof r?L(r):r,this.stateProofKey="string"==typeof a?L(a):a}getEncodingSchema(){return ui.encodingSchema}toEncodingData(){return new Map([["selection-participation-key",this.selectionParticipationKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey],["state-proof-key",this.stateProofKey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountParticipation: ${t}`);return new ui({selectionParticipationKey:t.get("selection-participation-key"),voteFirstValid:t.get("vote-first-valid"),voteKeyDilution:t.get("vote-key-dilution"),voteLastValid:t.get("vote-last-valid"),voteParticipationKey:t.get("vote-participation-key"),stateProofKey:t.get("state-proof-key")})}}class pi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"delta",valueSchema:new he(Xi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,delta:e}){this.address=t,this.delta=e}getEncodingSchema(){return pi.encodingSchema}toEncodingData(){return new Map([["address",this.address],["delta",this.delta.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountStateDelta: ${t}`);return new pi({address:t.get("address"),delta:(t.get("delta")??[]).map((t=>Xi.fromEncodingData(t)))})}}class mi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"application-index",valueSchema:new ae,omitEmpty:!0},{key:"logs",valueSchema:new he(new se),omitEmpty:!0},{key:"txId",valueSchema:new re,omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationIndex:t,logs:e,txid:n}){this.applicationIndex=y(t),this.logs=e,this.txid=n}getEncodingSchema(){return mi.encodingSchema}toEncodingData(){return new Map([["application-index",this.applicationIndex],["logs",this.logs],["txId",this.txid]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AppCallLogs: ${t}`);return new mi({applicationIndex:t.get("application-index"),logs:t.get("logs"),txid:t.get("txId")})}}class gi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new ae,omitEmpty:!0},{key:"params",valueSchema:bi.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({id:t,params:e}){this.id=w(t),this.params=e}getEncodingSchema(){return gi.encodingSchema}toEncodingData(){return new Map([["id",this.id],["params",this.params.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Application: ${t}`);return new gi({id:t.get("id"),params:bi.fromEncodingData(t.get("params")??new Map)})}}class fi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new ae,omitEmpty:!0},{key:"app-boxes",valueSchema:new ve(yi.encodingSchema),omitEmpty:!0},{key:"app-globals",valueSchema:new ve(yi.encodingSchema),omitEmpty:!0},{key:"app-locals",valueSchema:new ve(new he(yi.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:t,appBoxes:e,appGlobals:n,appLocals:i}){this.id=w(t),this.appBoxes=e,this.appGlobals=n,this.appLocals=i}getEncodingSchema(){return fi.encodingSchema}toEncodingData(){return new Map([["id",this.id],["app-boxes",void 0!==this.appBoxes?this.appBoxes.toEncodingData():void 0],["app-globals",void 0!==this.appGlobals?this.appGlobals.toEncodingData():void 0],["app-locals",void 0!==this.appLocals?this.appLocals.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationInitialStates: ${t}`);return new fi({id:t.get("id"),appBoxes:void 0!==t.get("app-boxes")?yi.fromEncodingData(t.get("app-boxes")):void 0,appGlobals:void 0!==t.get("app-globals")?yi.fromEncodingData(t.get("app-globals")):void 0,appLocals:void 0!==t.get("app-locals")?t.get("app-locals").map((t=>yi.fromEncodingData(t))):void 0})}}class yi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"kvs",valueSchema:new he(Ei.encodingSchema),omitEmpty:!0},{key:"account",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({kvs:t,account:e}){this.kvs=t,this.account="string"==typeof e?Y.fromString(e):e}getEncodingSchema(){return yi.encodingSchema}toEncodingData(){return new Map([["kvs",this.kvs.map((t=>t.toEncodingData()))],["account",void 0!==this.account?this.account.toString():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationKVStorage: ${t}`);return new yi({kvs:(t.get("kvs")??[]).map((t=>Ei.fromEncodingData(t))),account:t.get("account")})}}class vi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:new re,omitEmpty:!0},{key:"app",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:t,app:e}){this.account="string"==typeof t?Y.fromString(t):t,this.app=w(e)}getEncodingSchema(){return vi.encodingSchema}toEncodingData(){return new Map([["account",this.account.toString()],["app",this.app]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLocalReference: ${t}`);return new vi({account:t.get("account"),app:t.get("app")})}}class wi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new ae,omitEmpty:!0},{key:"schema",valueSchema:Si.encodingSchema,omitEmpty:!0},{key:"key-value",valueSchema:new ve(new he(vr.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:t,schema:e,keyValue:n}){this.id=w(t),this.schema=e,this.keyValue=n}getEncodingSchema(){return wi.encodingSchema}toEncodingData(){return new Map([["id",this.id],["schema",this.schema.toEncodingData()],["key-value",void 0!==this.keyValue?this.keyValue.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLocalState: ${t}`);return new wi({id:t.get("id"),schema:Si.fromEncodingData(t.get("schema")??new Map),keyValue:void 0!==t.get("key-value")?t.get("key-value").map((t=>vr.fromEncodingData(t))):void 0})}}class bi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"approval-program",valueSchema:new se,omitEmpty:!0},{key:"clear-state-program",valueSchema:new se,omitEmpty:!0},{key:"creator",valueSchema:new re,omitEmpty:!0},{key:"extra-program-pages",valueSchema:new ve(new ae),omitEmpty:!0},{key:"global-state",valueSchema:new ve(new he(vr.encodingSchema)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new ve(Si.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new ve(Si.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgram:t,clearStateProgram:e,creator:n,extraProgramPages:i,globalState:r,globalStateSchema:a,localStateSchema:o}){this.approvalProgram="string"==typeof t?L(t):t,this.clearStateProgram="string"==typeof e?L(e):e,this.creator="string"==typeof n?Y.fromString(n):n,this.extraProgramPages=void 0===i?void 0:y(i),this.globalState=r,this.globalStateSchema=a,this.localStateSchema=o}getEncodingSchema(){return bi.encodingSchema}toEncodingData(){return new Map([["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["creator",this.creator.toString()],["extra-program-pages",this.extraProgramPages],["global-state",void 0!==this.globalState?this.globalState.map((t=>t.toEncodingData())):void 0],["global-state-schema",void 0!==this.globalStateSchema?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",void 0!==this.localStateSchema?this.localStateSchema.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationParams: ${t}`);return new bi({approvalProgram:t.get("approval-program"),clearStateProgram:t.get("clear-state-program"),creator:t.get("creator"),extraProgramPages:t.get("extra-program-pages"),globalState:void 0!==t.get("global-state")?t.get("global-state").map((t=>vr.fromEncodingData(t))):void 0,globalStateSchema:void 0!==t.get("global-state-schema")?Si.fromEncodingData(t.get("global-state-schema")):void 0,localStateSchema:void 0!==t.get("local-state-schema")?Si.fromEncodingData(t.get("local-state-schema")):void 0})}}class xi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"app-state-type",valueSchema:new re,omitEmpty:!0},{key:"key",valueSchema:new se,omitEmpty:!0},{key:"operation",valueSchema:new re,omitEmpty:!0},{key:"account",valueSchema:new ve(new re),omitEmpty:!0},{key:"new-value",valueSchema:new ve(_i.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({appStateType:t,key:e,operation:n,account:i,newValue:r}){this.appStateType=t,this.key="string"==typeof e?L(e):e,this.operation=n,this.account="string"==typeof i?Y.fromString(i):i,this.newValue=r}getEncodingSchema(){return xi.encodingSchema}toEncodingData(){return new Map([["app-state-type",this.appStateType],["key",this.key],["operation",this.operation],["account",void 0!==this.account?this.account.toString():void 0],["new-value",void 0!==this.newValue?this.newValue.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationStateOperation: ${t}`);return new xi({appStateType:t.get("app-state-type"),key:t.get("key"),operation:t.get("operation"),account:t.get("account"),newValue:void 0!==t.get("new-value")?_i.fromEncodingData(t.get("new-value")):void 0})}}class Si{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new ae,omitEmpty:!0},{key:"num-uint",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:t,numUint:e}){this.numByteSlice=y(t),this.numUint=y(e)}getEncodingSchema(){return Si.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationStateSchema: ${t}`);return new Si({numByteSlice:t.get("num-byte-slice"),numUint:t.get("num-uint")})}}class Ai{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new ae,omitEmpty:!0},{key:"params",valueSchema:Ii.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({index:t,params:e}){this.index=w(t),this.params=e}getEncodingSchema(){return Ai.encodingSchema}toEncodingData(){return new Map([["index",this.index],["params",this.params.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Asset: ${t}`);return new Ai({index:t.get("index"),params:Ii.fromEncodingData(t.get("params")??new Map)})}}class Ci{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"asset-id",valueSchema:new ae,omitEmpty:!0},{key:"is-frozen",valueSchema:new ie,omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:t,assetId:e,isFrozen:n}){this.amount=w(t),this.assetId=w(e),this.isFrozen=n}getEncodingSchema(){return Ci.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["is-frozen",this.isFrozen]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${t}`);return new Ci({amount:t.get("amount"),assetId:t.get("asset-id"),isFrozen:t.get("is-frozen")})}}class ki{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:new re,omitEmpty:!0},{key:"asset",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:t,asset:e}){this.account="string"==typeof t?Y.fromString(t):t,this.asset=w(e)}getEncodingSchema(){return ki.encodingSchema}toEncodingData(){return new Map([["account",this.account.toString()],["asset",this.asset]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHoldingReference: ${t}`);return new ki({account:t.get("account"),asset:t.get("asset")})}}class Ii{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"creator",valueSchema:new re,omitEmpty:!0},{key:"decimals",valueSchema:new ae,omitEmpty:!0},{key:"total",valueSchema:new ae,omitEmpty:!0},{key:"clawback",valueSchema:new ve(new re),omitEmpty:!0},{key:"default-frozen",valueSchema:new ve(new ie),omitEmpty:!0},{key:"freeze",valueSchema:new ve(new re),omitEmpty:!0},{key:"manager",valueSchema:new ve(new re),omitEmpty:!0},{key:"metadata-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"name",valueSchema:new ve(new re),omitEmpty:!0},{key:"name-b64",valueSchema:new ve(new se),omitEmpty:!0},{key:"reserve",valueSchema:new ve(new re),omitEmpty:!0},{key:"unit-name",valueSchema:new ve(new re),omitEmpty:!0},{key:"unit-name-b64",valueSchema:new ve(new se),omitEmpty:!0},{key:"url",valueSchema:new ve(new re),omitEmpty:!0},{key:"url-b64",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({creator:t,decimals:e,total:n,clawback:i,defaultFrozen:r,freeze:a,manager:o,metadataHash:s,name:l,nameB64:c,reserve:h,unitName:d,unitNameB64:u,url:p,urlB64:m}){this.creator=t,this.decimals=y(e),this.total=w(n),this.clawback=i,this.defaultFrozen=r,this.freeze=a,this.manager=o,this.metadataHash="string"==typeof s?L(s):s,this.name=l,this.nameB64="string"==typeof c?L(c):c,this.reserve=h,this.unitName=d,this.unitNameB64="string"==typeof u?L(u):u,this.url=p,this.urlB64="string"==typeof m?L(m):m}getEncodingSchema(){return Ii.encodingSchema}toEncodingData(){return new Map([["creator",this.creator],["decimals",this.decimals],["total",this.total],["clawback",this.clawback],["default-frozen",this.defaultFrozen],["freeze",this.freeze],["manager",this.manager],["metadata-hash",this.metadataHash],["name",this.name],["name-b64",this.nameB64],["reserve",this.reserve],["unit-name",this.unitName],["unit-name-b64",this.unitNameB64],["url",this.url],["url-b64",this.urlB64]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetParams: ${t}`);return new Ii({creator:t.get("creator"),decimals:t.get("decimals"),total:t.get("total"),clawback:t.get("clawback"),defaultFrozen:t.get("default-frozen"),freeze:t.get("freeze"),manager:t.get("manager"),metadataHash:t.get("metadata-hash"),name:t.get("name"),nameB64:t.get("name-b64"),reserve:t.get("reserve"),unitName:t.get("unit-name"),unitNameB64:t.get("unit-name-b64"),url:t.get("url"),urlB64:t.get("url-b64")})}}class Ei{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new se,omitEmpty:!0},{key:"value",valueSchema:_i.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key="string"==typeof t?L(t):t,this.value=e}getEncodingSchema(){return Ei.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AvmKeyValue: ${t}`);return new Ei({key:t.get("key"),value:_i.fromEncodingData(t.get("value")??new Map)})}}class _i{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"type",valueSchema:new ae,omitEmpty:!0},{key:"bytes",valueSchema:new ve(new se),omitEmpty:!0},{key:"uint",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({type:t,bytes:e,uint:n}){this.type=y(t),this.bytes="string"==typeof e?L(e):e,this.uint=void 0===n?void 0:w(n)}getEncodingSchema(){return _i.encodingSchema}toEncodingData(){return new Map([["type",this.type],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AvmValue: ${t}`);return new _i({type:t.get("type"),bytes:t.get("bytes"),uint:t.get("uint")})}}class Mi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"blockHash",valueSchema:new re,omitEmpty:!0})),this.encodingSchemaValue}constructor({blockhash:t}){this.blockhash=t}getEncodingSchema(){return Mi.encodingSchema}toEncodingData(){return new Map([["blockHash",this.blockhash]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockHashResponse: ${t}`);return new Mi({blockhash:t.get("blockHash")})}}class Di{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"logs",valueSchema:new he(mi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({logs:t}){this.logs=t}getEncodingSchema(){return Di.encodingSchema}toEncodingData(){return new Map([["logs",this.logs.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockLogsResponse: ${t}`);return new Di({logs:(t.get("logs")??[]).map((t=>mi.fromEncodingData(t)))})}}class Pi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"block",valueSchema:Rn.encodingSchema,omitEmpty:!0},{key:"cert",valueSchema:new ve(Nn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({block:t,cert:e}){this.block=t,this.cert=e}getEncodingSchema(){return Pi.encodingSchema}toEncodingData(){return new Map([["block",this.block.toEncodingData()],["cert",void 0!==this.cert?this.cert.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockResponse: ${t}`);return new Pi({block:Rn.fromEncodingData(t.get("block")??new Map),cert:void 0!==t.get("cert")?Nn.fromEncodingData(t.get("cert")):void 0})}}class Ti{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"blockTxids",valueSchema:new he(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({blocktxids:t}){this.blocktxids=t}getEncodingSchema(){return Ti.encodingSchema}toEncodingData(){return new Map([["blockTxids",this.blocktxids]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockTxidsResponse: ${t}`);return new Ti({blocktxids:t.get("blockTxids")})}}class Li{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new se,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"value",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:t,round:e,value:n}){this.name="string"==typeof t?L(t):t,this.round=w(e),this.value="string"==typeof n?L(n):n}getEncodingSchema(){return Li.encodingSchema}toEncodingData(){return new Map([["name",this.name],["round",this.round],["value",this.value]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Box: ${t}`);return new Li({name:t.get("name"),round:t.get("round"),value:t.get("value")})}}class Bi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:t}){this.name="string"==typeof t?L(t):t}getEncodingSchema(){return Bi.encodingSchema}toEncodingData(){return new Map([["name",this.name]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BoxDescriptor: ${t}`);return new Bi({name:t.get("name")})}}class Fi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"app",valueSchema:new ae,omitEmpty:!0},{key:"name",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({app:t,name:e}){this.app=w(t),this.name="string"==typeof e?L(e):e}getEncodingSchema(){return Fi.encodingSchema}toEncodingData(){return new Map([["app",this.app],["name",this.name]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BoxReference: ${t}`);return new Fi({app:t.get("app"),name:t.get("name")})}}class Ri{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"boxes",valueSchema:new he(Bi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({boxes:t}){this.boxes=t}getEncodingSchema(){return Ri.encodingSchema}toEncodingData(){return new Map([["boxes",this.boxes.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BoxesResponse: ${t}`);return new Ri({boxes:(t.get("boxes")??[]).map((t=>Bi.fromEncodingData(t)))})}}class Ni{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"branch",valueSchema:new re,omitEmpty:!0},{key:"build_number",valueSchema:new ae,omitEmpty:!0},{key:"channel",valueSchema:new re,omitEmpty:!0},{key:"commit_hash",valueSchema:new re,omitEmpty:!0},{key:"major",valueSchema:new ae,omitEmpty:!0},{key:"minor",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({branch:t,buildNumber:e,channel:n,commitHash:i,major:r,minor:a}){this.branch=t,this.buildNumber=y(e),this.channel=n,this.commitHash=i,this.major=y(r),this.minor=y(a)}getEncodingSchema(){return Ni.encodingSchema}toEncodingData(){return new Map([["branch",this.branch],["build_number",this.buildNumber],["channel",this.channel],["commit_hash",this.commitHash],["major",this.major],["minor",this.minor]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BuildVersion: ${t}`);return new Ni({branch:t.get("branch"),buildNumber:t.get("build_number"),channel:t.get("channel"),commitHash:t.get("commit_hash"),major:t.get("major"),minor:t.get("minor")})}}class Vi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"hash",valueSchema:new re,omitEmpty:!0},{key:"result",valueSchema:new re,omitEmpty:!0},{key:"sourcemap",valueSchema:new ve(Nn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({hash:t,result:e,sourcemap:n}){this.hash=t,this.result=e,this.sourcemap=n}getEncodingSchema(){return Vi.encodingSchema}toEncodingData(){return new Map([["hash",this.hash],["result",this.result],["sourcemap",void 0!==this.sourcemap?this.sourcemap.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded CompileResponse: ${t}`);return new Vi({hash:t.get("hash"),result:t.get("result"),sourcemap:void 0!==t.get("sourcemap")?Nn.fromEncodingData(t.get("sourcemap")):void 0})}}class zi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"result",valueSchema:new re,omitEmpty:!0})),this.encodingSchemaValue}constructor({result:t}){this.result=t}getEncodingSchema(){return zi.encodingSchema}toEncodingData(){return new Map([["result",this.result]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DisassembleResponse: ${t}`);return new zi({result:t.get("result")})}}class Gi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new he(si.encodingSchema),omitEmpty:!0},{key:"apps",valueSchema:new he(gi.encodingSchema),omitEmpty:!0},{key:"latest-timestamp",valueSchema:new ae,omitEmpty:!0},{key:"protocol-version",valueSchema:new re,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"sources",valueSchema:new he(Oi.encodingSchema),omitEmpty:!0},{key:"txns",valueSchema:new he(xn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:t,apps:e,latestTimestamp:n,protocolVersion:i,round:r,sources:a,txns:o}){this.accounts=t,this.apps=e,this.latestTimestamp=y(n),this.protocolVersion=i,this.round=w(r),this.sources=a,this.txns=o}getEncodingSchema(){return Gi.encodingSchema}toEncodingData(){return new Map([["accounts",this.accounts.map((t=>t.toEncodingData()))],["apps",this.apps.map((t=>t.toEncodingData()))],["latest-timestamp",this.latestTimestamp],["protocol-version",this.protocolVersion],["round",this.round],["sources",this.sources.map((t=>t.toEncodingData()))],["txns",this.txns.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DryrunRequest: ${t}`);return new Gi({accounts:(t.get("accounts")??[]).map((t=>si.fromEncodingData(t))),apps:(t.get("apps")??[]).map((t=>gi.fromEncodingData(t))),latestTimestamp:t.get("latest-timestamp"),protocolVersion:t.get("protocol-version"),round:t.get("round"),sources:(t.get("sources")??[]).map((t=>Oi.fromEncodingData(t))),txns:(t.get("txns")??[]).map((t=>xn.fromEncodingData(t)))})}}class Wi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"error",valueSchema:new re,omitEmpty:!0},{key:"protocol-version",valueSchema:new re,omitEmpty:!0},{key:"txns",valueSchema:new he(Yi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({error:t,protocolVersion:e,txns:n}){this.error=t,this.protocolVersion=e,this.txns=n}getEncodingSchema(){return Wi.encodingSchema}toEncodingData(){return new Map([["error",this.error],["protocol-version",this.protocolVersion],["txns",this.txns.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DryrunResponse: ${t}`);return new Wi({error:t.get("error"),protocolVersion:t.get("protocol-version"),txns:(t.get("txns")??[]).map((t=>Yi.fromEncodingData(t)))})}}class Oi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"app-index",valueSchema:new ae,omitEmpty:!0},{key:"field-name",valueSchema:new re,omitEmpty:!0},{key:"source",valueSchema:new re,omitEmpty:!0},{key:"txn-index",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({appIndex:t,fieldName:e,source:n,txnIndex:i}){this.appIndex=w(t),this.fieldName=e,this.source=n,this.txnIndex=y(i)}getEncodingSchema(){return Oi.encodingSchema}toEncodingData(){return new Map([["app-index",this.appIndex],["field-name",this.fieldName],["source",this.source],["txn-index",this.txnIndex]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DryrunSource: ${t}`);return new Oi({appIndex:t.get("app-index"),fieldName:t.get("field-name"),source:t.get("source"),txnIndex:t.get("txn-index")})}}class Zi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"line",valueSchema:new ae,omitEmpty:!0},{key:"pc",valueSchema:new ae,omitEmpty:!0},{key:"stack",valueSchema:new he(wr.encodingSchema),omitEmpty:!0},{key:"error",valueSchema:new ve(new re),omitEmpty:!0},{key:"scratch",valueSchema:new ve(new he(wr.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({line:t,pc:e,stack:n,error:i,scratch:r}){this.line=y(t),this.pc=y(e),this.stack=n,this.error=i,this.scratch=r}getEncodingSchema(){return Zi.encodingSchema}toEncodingData(){return new Map([["line",this.line],["pc",this.pc],["stack",this.stack.map((t=>t.toEncodingData()))],["error",this.error],["scratch",void 0!==this.scratch?this.scratch.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DryrunState: ${t}`);return new Zi({line:t.get("line"),pc:t.get("pc"),stack:(t.get("stack")??[]).map((t=>wr.fromEncodingData(t))),error:t.get("error"),scratch:void 0!==t.get("scratch")?t.get("scratch").map((t=>wr.fromEncodingData(t))):void 0})}}class Yi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"disassembly",valueSchema:new he(new re),omitEmpty:!0},{key:"app-call-messages",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"app-call-trace",valueSchema:new ve(new he(Zi.encodingSchema)),omitEmpty:!0},{key:"budget-added",valueSchema:new ve(new ae),omitEmpty:!0},{key:"budget-consumed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"global-delta",valueSchema:new ve(new he(Xi.encodingSchema)),omitEmpty:!0},{key:"local-deltas",valueSchema:new ve(new he(pi.encodingSchema)),omitEmpty:!0},{key:"logic-sig-disassembly",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"logic-sig-messages",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"logic-sig-trace",valueSchema:new ve(new he(Zi.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new ve(new he(new se)),omitEmpty:!0})),this.encodingSchemaValue}constructor({disassembly:t,appCallMessages:e,appCallTrace:n,budgetAdded:i,budgetConsumed:r,globalDelta:a,localDeltas:o,logicSigDisassembly:s,logicSigMessages:l,logicSigTrace:c,logs:h}){this.disassembly=t,this.appCallMessages=e,this.appCallTrace=n,this.budgetAdded=void 0===i?void 0:y(i),this.budgetConsumed=void 0===r?void 0:y(r),this.globalDelta=a,this.localDeltas=o,this.logicSigDisassembly=s,this.logicSigMessages=l,this.logicSigTrace=c,this.logs=h}getEncodingSchema(){return Yi.encodingSchema}toEncodingData(){return new Map([["disassembly",this.disassembly],["app-call-messages",this.appCallMessages],["app-call-trace",void 0!==this.appCallTrace?this.appCallTrace.map((t=>t.toEncodingData())):void 0],["budget-added",this.budgetAdded],["budget-consumed",this.budgetConsumed],["global-delta",void 0!==this.globalDelta?this.globalDelta.map((t=>t.toEncodingData())):void 0],["local-deltas",void 0!==this.localDeltas?this.localDeltas.map((t=>t.toEncodingData())):void 0],["logic-sig-disassembly",this.logicSigDisassembly],["logic-sig-messages",this.logicSigMessages],["logic-sig-trace",void 0!==this.logicSigTrace?this.logicSigTrace.map((t=>t.toEncodingData())):void 0],["logs",this.logs]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded DryrunTxnResult: ${t}`);return new Yi({disassembly:t.get("disassembly"),appCallMessages:t.get("app-call-messages"),appCallTrace:void 0!==t.get("app-call-trace")?t.get("app-call-trace").map((t=>Zi.fromEncodingData(t))):void 0,budgetAdded:t.get("budget-added"),budgetConsumed:t.get("budget-consumed"),globalDelta:void 0!==t.get("global-delta")?t.get("global-delta").map((t=>Xi.fromEncodingData(t))):void 0,localDeltas:void 0!==t.get("local-deltas")?t.get("local-deltas").map((t=>pi.fromEncodingData(t))):void 0,logicSigDisassembly:t.get("logic-sig-disassembly"),logicSigMessages:t.get("logic-sig-messages"),logicSigTrace:void 0!==t.get("logic-sig-trace")?t.get("logic-sig-trace").map((t=>Zi.fromEncodingData(t))):void 0,logs:t.get("logs")})}}class Hi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new re,omitEmpty:!0},{key:"data",valueSchema:new ve(Nn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:t,data:e}){this.message=t,this.data=e}getEncodingSchema(){return Hi.encodingSchema}toEncodingData(){return new Map([["message",this.message],["data",void 0!==this.data?this.data.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ErrorResponse: ${t}`);return new Hi({message:t.get("message"),data:void 0!==t.get("data")?Nn.fromEncodingData(t.get("data")):void 0})}}class ji{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"action",valueSchema:new ae,omitEmpty:!0},{key:"bytes",valueSchema:new ve(new re),omitEmpty:!0},{key:"uint",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({action:t,bytes:e,uint:n}){this.action=y(t),this.bytes=e,this.uint=void 0===n?void 0:w(n)}getEncodingSchema(){return ji.encodingSchema}toEncodingData(){return new Map([["action",this.action],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${t}`);return new ji({action:t.get("action"),bytes:t.get("bytes"),uint:t.get("uint")})}}class Xi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new re,omitEmpty:!0},{key:"value",valueSchema:ji.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key=t,this.value=e}getEncodingSchema(){return Xi.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EvalDeltaKeyValue: ${t}`);return new Xi({key:t.get("key"),value:ji.fromEncodingData(t.get("value")??new Map)})}}class Ui{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"offset",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({offset:t}){this.offset=y(t)}getEncodingSchema(){return Ui.encodingSchema}toEncodingData(){return new Map([["offset",this.offset]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded GetBlockTimeStampOffsetResponse: ${t}`);return new Ui({offset:t.get("offset")})}}class Ki{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"round",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({round:t}){this.round=w(t)}getEncodingSchema(){return Ki.encodingSchema}toEncodingData(){return new Map([["round",this.round]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded GetSyncRoundResponse: ${t}`);return new Ki({round:t.get("round")})}}class Ji{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new ve(new se),omitEmpty:!0},{key:"value",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key="string"==typeof t?L(t):t,this.value="string"==typeof e?L(e):e}getEncodingSchema(){return Ji.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded KvDelta: ${t}`);return new Ji({key:t.get("key"),value:t.get("value")})}}class qi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"Delta",valueSchema:oi.encodingSchema,omitEmpty:!0},{key:"Ids",valueSchema:new he(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({delta:t,ids:e}){this.delta=t,this.ids=e}getEncodingSchema(){return qi.encodingSchema}toEncodingData(){return new Map([["Delta",this.delta.toEncodingData()],["Ids",this.ids]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded LedgerStateDeltaForTransactionGroup: ${t}`);return new qi({delta:oi.fromEncodingData(t.get("Delta")??new Map),ids:t.get("Ids")})}}class $i{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new ae,omitEmpty:!0},{key:"proof",valueSchema:new se,omitEmpty:!0},{key:"treedepth",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({index:t,proof:e,treedepth:n}){this.index=y(t),this.proof="string"==typeof e?L(e):e,this.treedepth=y(n)}getEncodingSchema(){return $i.encodingSchema}toEncodingData(){return new Map([["index",this.index],["proof",this.proof],["treedepth",this.treedepth]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded LightBlockHeaderProof: ${t}`);return new $i({index:t.get("index"),proof:t.get("proof"),treedepth:t.get("treedepth")})}}class Qi{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"catchup-time",valueSchema:new ae,omitEmpty:!0},{key:"last-round",valueSchema:new ae,omitEmpty:!0},{key:"last-version",valueSchema:new re,omitEmpty:!0},{key:"next-version",valueSchema:new re,omitEmpty:!0},{key:"next-version-round",valueSchema:new ae,omitEmpty:!0},{key:"next-version-supported",valueSchema:new ie,omitEmpty:!0},{key:"stopped-at-unsupported-round",valueSchema:new ie,omitEmpty:!0},{key:"time-since-last-round",valueSchema:new ae,omitEmpty:!0},{key:"catchpoint",valueSchema:new ve(new re),omitEmpty:!0},{key:"catchpoint-acquired-blocks",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-processed-accounts",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-processed-kvs",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-total-accounts",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-total-blocks",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-total-kvs",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-verified-accounts",valueSchema:new ve(new ae),omitEmpty:!0},{key:"catchpoint-verified-kvs",valueSchema:new ve(new ae),omitEmpty:!0},{key:"last-catchpoint",valueSchema:new ve(new re),omitEmpty:!0},{key:"upgrade-delay",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-next-protocol-vote-before",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-no-votes",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-node-vote",valueSchema:new ve(new ie),omitEmpty:!0},{key:"upgrade-vote-rounds",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-votes",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-votes-required",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-yes-votes",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({catchupTime:t,lastRound:e,lastVersion:n,nextVersion:i,nextVersionRound:r,nextVersionSupported:a,stoppedAtUnsupportedRound:o,timeSinceLastRound:s,catchpoint:l,catchpointAcquiredBlocks:c,catchpointProcessedAccounts:h,catchpointProcessedKvs:d,catchpointTotalAccounts:u,catchpointTotalBlocks:p,catchpointTotalKvs:m,catchpointVerifiedAccounts:g,catchpointVerifiedKvs:f,lastCatchpoint:v,upgradeDelay:b,upgradeNextProtocolVoteBefore:x,upgradeNoVotes:S,upgradeNodeVote:A,upgradeVoteRounds:C,upgradeVotes:k,upgradeVotesRequired:I,upgradeYesVotes:E}){this.catchupTime=w(t),this.lastRound=w(e),this.lastVersion=n,this.nextVersion=i,this.nextVersionRound=w(r),this.nextVersionSupported=a,this.stoppedAtUnsupportedRound=o,this.timeSinceLastRound=w(s),this.catchpoint=l,this.catchpointAcquiredBlocks=void 0===c?void 0:y(c),this.catchpointProcessedAccounts=void 0===h?void 0:y(h),this.catchpointProcessedKvs=void 0===d?void 0:y(d),this.catchpointTotalAccounts=void 0===u?void 0:y(u),this.catchpointTotalBlocks=void 0===p?void 0:y(p),this.catchpointTotalKvs=void 0===m?void 0:y(m),this.catchpointVerifiedAccounts=void 0===g?void 0:y(g),this.catchpointVerifiedKvs=void 0===f?void 0:y(f),this.lastCatchpoint=v,this.upgradeDelay=void 0===b?void 0:w(b),this.upgradeNextProtocolVoteBefore=void 0===x?void 0:w(x),this.upgradeNoVotes=void 0===S?void 0:y(S),this.upgradeNodeVote=A,this.upgradeVoteRounds=void 0===C?void 0:y(C),this.upgradeVotes=void 0===k?void 0:y(k),this.upgradeVotesRequired=void 0===I?void 0:y(I),this.upgradeYesVotes=void 0===E?void 0:y(E)}getEncodingSchema(){return Qi.encodingSchema}toEncodingData(){return new Map([["catchup-time",this.catchupTime],["last-round",this.lastRound],["last-version",this.lastVersion],["next-version",this.nextVersion],["next-version-round",this.nextVersionRound],["next-version-supported",this.nextVersionSupported],["stopped-at-unsupported-round",this.stoppedAtUnsupportedRound],["time-since-last-round",this.timeSinceLastRound],["catchpoint",this.catchpoint],["catchpoint-acquired-blocks",this.catchpointAcquiredBlocks],["catchpoint-processed-accounts",this.catchpointProcessedAccounts],["catchpoint-processed-kvs",this.catchpointProcessedKvs],["catchpoint-total-accounts",this.catchpointTotalAccounts],["catchpoint-total-blocks",this.catchpointTotalBlocks],["catchpoint-total-kvs",this.catchpointTotalKvs],["catchpoint-verified-accounts",this.catchpointVerifiedAccounts],["catchpoint-verified-kvs",this.catchpointVerifiedKvs],["last-catchpoint",this.lastCatchpoint],["upgrade-delay",this.upgradeDelay],["upgrade-next-protocol-vote-before",this.upgradeNextProtocolVoteBefore],["upgrade-no-votes",this.upgradeNoVotes],["upgrade-node-vote",this.upgradeNodeVote],["upgrade-vote-rounds",this.upgradeVoteRounds],["upgrade-votes",this.upgradeVotes],["upgrade-votes-required",this.upgradeVotesRequired],["upgrade-yes-votes",this.upgradeYesVotes]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded NodeStatusResponse: ${t}`);return new Qi({catchupTime:t.get("catchup-time"),lastRound:t.get("last-round"),lastVersion:t.get("last-version"),nextVersion:t.get("next-version"),nextVersionRound:t.get("next-version-round"),nextVersionSupported:t.get("next-version-supported"),stoppedAtUnsupportedRound:t.get("stopped-at-unsupported-round"),timeSinceLastRound:t.get("time-since-last-round"),catchpoint:t.get("catchpoint"),catchpointAcquiredBlocks:t.get("catchpoint-acquired-blocks"),catchpointProcessedAccounts:t.get("catchpoint-processed-accounts"),catchpointProcessedKvs:t.get("catchpoint-processed-kvs"),catchpointTotalAccounts:t.get("catchpoint-total-accounts"),catchpointTotalBlocks:t.get("catchpoint-total-blocks"),catchpointTotalKvs:t.get("catchpoint-total-kvs"),catchpointVerifiedAccounts:t.get("catchpoint-verified-accounts"),catchpointVerifiedKvs:t.get("catchpoint-verified-kvs"),lastCatchpoint:t.get("last-catchpoint"),upgradeDelay:t.get("upgrade-delay"),upgradeNextProtocolVoteBefore:t.get("upgrade-next-protocol-vote-before"),upgradeNoVotes:t.get("upgrade-no-votes"),upgradeNodeVote:t.get("upgrade-node-vote"),upgradeVoteRounds:t.get("upgrade-vote-rounds"),upgradeVotes:t.get("upgrade-votes"),upgradeVotesRequired:t.get("upgrade-votes-required"),upgradeYesVotes:t.get("upgrade-yes-votes")})}}class tr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"pool-error",valueSchema:new re,omitEmpty:!0},{key:"txn",valueSchema:xn.encodingSchema,omitEmpty:!0},{key:"application-index",valueSchema:new ve(new ae),omitEmpty:!0},{key:"asset-closing-amount",valueSchema:new ve(new ae),omitEmpty:!0},{key:"asset-index",valueSchema:new ve(new ae),omitEmpty:!0},{key:"close-rewards",valueSchema:new ve(new ae),omitEmpty:!0},{key:"closing-amount",valueSchema:new ve(new ae),omitEmpty:!0},{key:"confirmed-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"global-state-delta",valueSchema:new ve(new he(Xi.encodingSchema)),omitEmpty:!0},{key:"inner-txns",valueSchema:new ve(new he(tr.encodingSchema)),omitEmpty:!0},{key:"local-state-delta",valueSchema:new ve(new he(pi.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new ve(new he(new se)),omitEmpty:!0},{key:"receiver-rewards",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sender-rewards",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({poolError:t,txn:e,applicationIndex:n,assetClosingAmount:i,assetIndex:r,closeRewards:a,closingAmount:o,confirmedRound:s,globalStateDelta:l,innerTxns:c,localStateDelta:h,logs:d,receiverRewards:u,senderRewards:p}){this.poolError=t,this.txn=e,this.applicationIndex=void 0===n?void 0:w(n),this.assetClosingAmount=void 0===i?void 0:w(i),this.assetIndex=void 0===r?void 0:w(r),this.closeRewards=void 0===a?void 0:w(a),this.closingAmount=void 0===o?void 0:w(o),this.confirmedRound=void 0===s?void 0:w(s),this.globalStateDelta=l,this.innerTxns=c,this.localStateDelta=h,this.logs=d,this.receiverRewards=void 0===u?void 0:w(u),this.senderRewards=void 0===p?void 0:w(p)}getEncodingSchema(){return tr.encodingSchema}toEncodingData(){return new Map([["pool-error",this.poolError],["txn",this.txn.toEncodingData()],["application-index",this.applicationIndex],["asset-closing-amount",this.assetClosingAmount],["asset-index",this.assetIndex],["close-rewards",this.closeRewards],["closing-amount",this.closingAmount],["confirmed-round",this.confirmedRound],["global-state-delta",void 0!==this.globalStateDelta?this.globalStateDelta.map((t=>t.toEncodingData())):void 0],["inner-txns",void 0!==this.innerTxns?this.innerTxns.map((t=>t.toEncodingData())):void 0],["local-state-delta",void 0!==this.localStateDelta?this.localStateDelta.map((t=>t.toEncodingData())):void 0],["logs",this.logs],["receiver-rewards",this.receiverRewards],["sender-rewards",this.senderRewards]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded PendingTransactionResponse: ${t}`);return new tr({poolError:t.get("pool-error"),txn:xn.fromEncodingData(t.get("txn")??new Map),applicationIndex:t.get("application-index"),assetClosingAmount:t.get("asset-closing-amount"),assetIndex:t.get("asset-index"),closeRewards:t.get("close-rewards"),closingAmount:t.get("closing-amount"),confirmedRound:t.get("confirmed-round"),globalStateDelta:void 0!==t.get("global-state-delta")?t.get("global-state-delta").map((t=>Xi.fromEncodingData(t))):void 0,innerTxns:void 0!==t.get("inner-txns")?t.get("inner-txns").map((t=>tr.fromEncodingData(t))):void 0,localStateDelta:void 0!==t.get("local-state-delta")?t.get("local-state-delta").map((t=>pi.fromEncodingData(t))):void 0,logs:t.get("logs"),receiverRewards:t.get("receiver-rewards"),senderRewards:t.get("sender-rewards")})}}class er{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"top-transactions",valueSchema:new he(xn.encodingSchema),omitEmpty:!0},{key:"total-transactions",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({topTransactions:t,totalTransactions:e}){this.topTransactions=t,this.totalTransactions=y(e)}getEncodingSchema(){return er.encodingSchema}toEncodingData(){return new Map([["top-transactions",this.topTransactions.map((t=>t.toEncodingData()))],["total-transactions",this.totalTransactions]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded PendingTransactionsResponse: ${t}`);return new er({topTransactions:(t.get("top-transactions")??[]).map((t=>xn.fromEncodingData(t))),totalTransactions:t.get("total-transactions")})}}class nr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"txId",valueSchema:new re,omitEmpty:!0})),this.encodingSchemaValue}constructor({txid:t}){this.txid=t}getEncodingSchema(){return nr.encodingSchema}toEncodingData(){return new Map([["txId",this.txid]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded PostTransactionsResponse: ${t}`);return new nr({txid:t.get("txId")})}}class ir{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"new-value",valueSchema:_i.encodingSchema,omitEmpty:!0},{key:"slot",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({newValue:t,slot:e}){this.newValue=t,this.slot=y(e)}getEncodingSchema(){return ir.encodingSchema}toEncodingData(){return new Map([["new-value",this.newValue.toEncodingData()],["slot",this.slot]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ScratchChange: ${t}`);return new ir({newValue:_i.fromEncodingData(t.get("new-value")??new Map),slot:t.get("slot")})}}class rr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"app-initial-states",valueSchema:new ve(new he(fi.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({appInitialStates:t}){this.appInitialStates=t}getEncodingSchema(){return rr.encodingSchema}toEncodingData(){return new Map([["app-initial-states",void 0!==this.appInitialStates?this.appInitialStates.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateInitialStates: ${t}`);return new rr({appInitialStates:void 0!==t.get("app-initial-states")?t.get("app-initial-states").map((t=>fi.fromEncodingData(t))):void 0})}}class ar{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"txn-groups",valueSchema:new he(or.encodingSchema),omitEmpty:!0},{key:"allow-empty-signatures",valueSchema:new ve(new ie),omitEmpty:!0},{key:"allow-more-logging",valueSchema:new ve(new ie),omitEmpty:!0},{key:"allow-unnamed-resources",valueSchema:new ve(new ie),omitEmpty:!0},{key:"exec-trace-config",valueSchema:new ve(lr.encodingSchema),omitEmpty:!0},{key:"extra-opcode-budget",valueSchema:new ve(new ae),omitEmpty:!0},{key:"fix-signers",valueSchema:new ve(new ie),omitEmpty:!0},{key:"round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnGroups:t,allowEmptySignatures:e,allowMoreLogging:n,allowUnnamedResources:i,execTraceConfig:r,extraOpcodeBudget:a,fixSigners:o,round:s}){this.txnGroups=t,this.allowEmptySignatures=e,this.allowMoreLogging=n,this.allowUnnamedResources=i,this.execTraceConfig=r,this.extraOpcodeBudget=void 0===a?void 0:y(a),this.fixSigners=o,this.round=void 0===s?void 0:w(s)}getEncodingSchema(){return ar.encodingSchema}toEncodingData(){return new Map([["txn-groups",this.txnGroups.map((t=>t.toEncodingData()))],["allow-empty-signatures",this.allowEmptySignatures],["allow-more-logging",this.allowMoreLogging],["allow-unnamed-resources",this.allowUnnamedResources],["exec-trace-config",void 0!==this.execTraceConfig?this.execTraceConfig.toEncodingData():void 0],["extra-opcode-budget",this.extraOpcodeBudget],["fix-signers",this.fixSigners],["round",this.round]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateRequest: ${t}`);return new ar({txnGroups:(t.get("txn-groups")??[]).map((t=>or.fromEncodingData(t))),allowEmptySignatures:t.get("allow-empty-signatures"),allowMoreLogging:t.get("allow-more-logging"),allowUnnamedResources:t.get("allow-unnamed-resources"),execTraceConfig:void 0!==t.get("exec-trace-config")?lr.fromEncodingData(t.get("exec-trace-config")):void 0,extraOpcodeBudget:t.get("extra-opcode-budget"),fixSigners:t.get("fix-signers"),round:t.get("round")})}}class or{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"txns",valueSchema:new he(xn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txns:t}){this.txns=t}getEncodingSchema(){return or.encodingSchema}toEncodingData(){return new Map([["txns",this.txns.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateRequestTransactionGroup: ${t}`);return new or({txns:(t.get("txns")??[]).map((t=>xn.fromEncodingData(t)))})}}class sr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"last-round",valueSchema:new ae,omitEmpty:!0},{key:"txn-groups",valueSchema:new he(cr.encodingSchema),omitEmpty:!0},{key:"version",valueSchema:new ae,omitEmpty:!0},{key:"eval-overrides",valueSchema:new ve(ur.encodingSchema),omitEmpty:!0},{key:"exec-trace-config",valueSchema:new ve(lr.encodingSchema),omitEmpty:!0},{key:"initial-states",valueSchema:new ve(rr.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({lastRound:t,txnGroups:e,version:n,evalOverrides:i,execTraceConfig:r,initialStates:a}){this.lastRound=w(t),this.txnGroups=e,this.version=y(n),this.evalOverrides=i,this.execTraceConfig=r,this.initialStates=a}getEncodingSchema(){return sr.encodingSchema}toEncodingData(){return new Map([["last-round",this.lastRound],["txn-groups",this.txnGroups.map((t=>t.toEncodingData()))],["version",this.version],["eval-overrides",void 0!==this.evalOverrides?this.evalOverrides.toEncodingData():void 0],["exec-trace-config",void 0!==this.execTraceConfig?this.execTraceConfig.toEncodingData():void 0],["initial-states",void 0!==this.initialStates?this.initialStates.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateResponse: ${t}`);return new sr({lastRound:t.get("last-round"),txnGroups:(t.get("txn-groups")??[]).map((t=>cr.fromEncodingData(t))),version:t.get("version"),evalOverrides:void 0!==t.get("eval-overrides")?ur.fromEncodingData(t.get("eval-overrides")):void 0,execTraceConfig:void 0!==t.get("exec-trace-config")?lr.fromEncodingData(t.get("exec-trace-config")):void 0,initialStates:void 0!==t.get("initial-states")?rr.fromEncodingData(t.get("initial-states")):void 0})}}class lr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"enable",valueSchema:new ve(new ie),omitEmpty:!0},{key:"scratch-change",valueSchema:new ve(new ie),omitEmpty:!0},{key:"stack-change",valueSchema:new ve(new ie),omitEmpty:!0},{key:"state-change",valueSchema:new ve(new ie),omitEmpty:!0})),this.encodingSchemaValue}constructor({enable:t,scratchChange:e,stackChange:n,stateChange:i}){this.enable=t,this.scratchChange=e,this.stackChange=n,this.stateChange=i}getEncodingSchema(){return lr.encodingSchema}toEncodingData(){return new Map([["enable",this.enable],["scratch-change",this.scratchChange],["stack-change",this.stackChange],["state-change",this.stateChange]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateTraceConfig: ${t}`);return new lr({enable:t.get("enable"),scratchChange:t.get("scratch-change"),stackChange:t.get("stack-change"),stateChange:t.get("state-change")})}}class cr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"txn-results",valueSchema:new he(hr.encodingSchema),omitEmpty:!0},{key:"app-budget-added",valueSchema:new ve(new ae),omitEmpty:!0},{key:"app-budget-consumed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"failed-at",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"failure-message",valueSchema:new ve(new re),omitEmpty:!0},{key:"unnamed-resources-accessed",valueSchema:new ve(dr.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnResults:t,appBudgetAdded:e,appBudgetConsumed:n,failedAt:i,failureMessage:r,unnamedResourcesAccessed:a}){this.txnResults=t,this.appBudgetAdded=void 0===e?void 0:y(e),this.appBudgetConsumed=void 0===n?void 0:y(n),this.failedAt=void 0===i?void 0:i.map(y),this.failureMessage=r,this.unnamedResourcesAccessed=a}getEncodingSchema(){return cr.encodingSchema}toEncodingData(){return new Map([["txn-results",this.txnResults.map((t=>t.toEncodingData()))],["app-budget-added",this.appBudgetAdded],["app-budget-consumed",this.appBudgetConsumed],["failed-at",this.failedAt],["failure-message",this.failureMessage],["unnamed-resources-accessed",void 0!==this.unnamedResourcesAccessed?this.unnamedResourcesAccessed.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateTransactionGroupResult: ${t}`);return new cr({txnResults:(t.get("txn-results")??[]).map((t=>hr.fromEncodingData(t))),appBudgetAdded:t.get("app-budget-added"),appBudgetConsumed:t.get("app-budget-consumed"),failedAt:t.get("failed-at"),failureMessage:t.get("failure-message"),unnamedResourcesAccessed:void 0!==t.get("unnamed-resources-accessed")?dr.fromEncodingData(t.get("unnamed-resources-accessed")):void 0})}}class hr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"txn-result",valueSchema:tr.encodingSchema,omitEmpty:!0},{key:"app-budget-consumed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"exec-trace",valueSchema:new ve(mr.encodingSchema),omitEmpty:!0},{key:"fixed-signer",valueSchema:new ve(new re),omitEmpty:!0},{key:"logic-sig-budget-consumed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"unnamed-resources-accessed",valueSchema:new ve(dr.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({txnResult:t,appBudgetConsumed:e,execTrace:n,fixedSigner:i,logicSigBudgetConsumed:r,unnamedResourcesAccessed:a}){this.txnResult=t,this.appBudgetConsumed=void 0===e?void 0:y(e),this.execTrace=n,this.fixedSigner="string"==typeof i?Y.fromString(i):i,this.logicSigBudgetConsumed=void 0===r?void 0:y(r),this.unnamedResourcesAccessed=a}getEncodingSchema(){return hr.encodingSchema}toEncodingData(){return new Map([["txn-result",this.txnResult.toEncodingData()],["app-budget-consumed",this.appBudgetConsumed],["exec-trace",void 0!==this.execTrace?this.execTrace.toEncodingData():void 0],["fixed-signer",void 0!==this.fixedSigner?this.fixedSigner.toString():void 0],["logic-sig-budget-consumed",this.logicSigBudgetConsumed],["unnamed-resources-accessed",void 0!==this.unnamedResourcesAccessed?this.unnamedResourcesAccessed.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateTransactionResult: ${t}`);return new hr({txnResult:tr.fromEncodingData(t.get("txn-result")??new Map),appBudgetConsumed:t.get("app-budget-consumed"),execTrace:void 0!==t.get("exec-trace")?mr.fromEncodingData(t.get("exec-trace")):void 0,fixedSigner:t.get("fixed-signer"),logicSigBudgetConsumed:t.get("logic-sig-budget-consumed"),unnamedResourcesAccessed:void 0!==t.get("unnamed-resources-accessed")?dr.fromEncodingData(t.get("unnamed-resources-accessed")):void 0})}}class dr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"app-locals",valueSchema:new ve(new he(vi.encodingSchema)),omitEmpty:!0},{key:"apps",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"asset-holdings",valueSchema:new ve(new he(ki.encodingSchema)),omitEmpty:!0},{key:"assets",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"boxes",valueSchema:new ve(new he(Fi.encodingSchema)),omitEmpty:!0},{key:"extra-box-refs",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:t,appLocals:e,apps:n,assetHoldings:i,assets:r,boxes:a,extraBoxRefs:o}){this.accounts=void 0!==t?t.map((t=>"string"==typeof t?Y.fromString(t):t)):void 0,this.appLocals=e,this.apps=void 0===n?void 0:n.map(w),this.assetHoldings=i,this.assets=void 0===r?void 0:r.map(w),this.boxes=a,this.extraBoxRefs=void 0===o?void 0:y(o)}getEncodingSchema(){return dr.encodingSchema}toEncodingData(){return new Map([["accounts",void 0!==this.accounts?this.accounts.map((t=>t.toString())):void 0],["app-locals",void 0!==this.appLocals?this.appLocals.map((t=>t.toEncodingData())):void 0],["apps",this.apps],["asset-holdings",void 0!==this.assetHoldings?this.assetHoldings.map((t=>t.toEncodingData())):void 0],["assets",this.assets],["boxes",void 0!==this.boxes?this.boxes.map((t=>t.toEncodingData())):void 0],["extra-box-refs",this.extraBoxRefs]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulateUnnamedResourcesAccessed: ${t}`);return new dr({accounts:t.get("accounts"),appLocals:void 0!==t.get("app-locals")?t.get("app-locals").map((t=>vi.fromEncodingData(t))):void 0,apps:t.get("apps"),assetHoldings:void 0!==t.get("asset-holdings")?t.get("asset-holdings").map((t=>ki.fromEncodingData(t))):void 0,assets:t.get("assets"),boxes:void 0!==t.get("boxes")?t.get("boxes").map((t=>Fi.fromEncodingData(t))):void 0,extraBoxRefs:t.get("extra-box-refs")})}}class ur{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"allow-empty-signatures",valueSchema:new ve(new ie),omitEmpty:!0},{key:"allow-unnamed-resources",valueSchema:new ve(new ie),omitEmpty:!0},{key:"extra-opcode-budget",valueSchema:new ve(new ae),omitEmpty:!0},{key:"fix-signers",valueSchema:new ve(new ie),omitEmpty:!0},{key:"max-log-calls",valueSchema:new ve(new ae),omitEmpty:!0},{key:"max-log-size",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({allowEmptySignatures:t,allowUnnamedResources:e,extraOpcodeBudget:n,fixSigners:i,maxLogCalls:r,maxLogSize:a}){this.allowEmptySignatures=t,this.allowUnnamedResources=e,this.extraOpcodeBudget=void 0===n?void 0:y(n),this.fixSigners=i,this.maxLogCalls=void 0===r?void 0:y(r),this.maxLogSize=void 0===a?void 0:y(a)}getEncodingSchema(){return ur.encodingSchema}toEncodingData(){return new Map([["allow-empty-signatures",this.allowEmptySignatures],["allow-unnamed-resources",this.allowUnnamedResources],["extra-opcode-budget",this.extraOpcodeBudget],["fix-signers",this.fixSigners],["max-log-calls",this.maxLogCalls],["max-log-size",this.maxLogSize]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulationEvalOverrides: ${t}`);return new ur({allowEmptySignatures:t.get("allow-empty-signatures"),allowUnnamedResources:t.get("allow-unnamed-resources"),extraOpcodeBudget:t.get("extra-opcode-budget"),fixSigners:t.get("fix-signers"),maxLogCalls:t.get("max-log-calls"),maxLogSize:t.get("max-log-size")})}}class pr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"pc",valueSchema:new ae,omitEmpty:!0},{key:"scratch-changes",valueSchema:new ve(new he(ir.encodingSchema)),omitEmpty:!0},{key:"spawned-inners",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"stack-additions",valueSchema:new ve(new he(_i.encodingSchema)),omitEmpty:!0},{key:"stack-pop-count",valueSchema:new ve(new ae),omitEmpty:!0},{key:"state-changes",valueSchema:new ve(new he(xi.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({pc:t,scratchChanges:e,spawnedInners:n,stackAdditions:i,stackPopCount:r,stateChanges:a}){this.pc=y(t),this.scratchChanges=e,this.spawnedInners=void 0===n?void 0:n.map(y),this.stackAdditions=i,this.stackPopCount=void 0===r?void 0:y(r),this.stateChanges=a}getEncodingSchema(){return pr.encodingSchema}toEncodingData(){return new Map([["pc",this.pc],["scratch-changes",void 0!==this.scratchChanges?this.scratchChanges.map((t=>t.toEncodingData())):void 0],["spawned-inners",this.spawnedInners],["stack-additions",void 0!==this.stackAdditions?this.stackAdditions.map((t=>t.toEncodingData())):void 0],["stack-pop-count",this.stackPopCount],["state-changes",void 0!==this.stateChanges?this.stateChanges.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulationOpcodeTraceUnit: ${t}`);return new pr({pc:t.get("pc"),scratchChanges:void 0!==t.get("scratch-changes")?t.get("scratch-changes").map((t=>ir.fromEncodingData(t))):void 0,spawnedInners:t.get("spawned-inners"),stackAdditions:void 0!==t.get("stack-additions")?t.get("stack-additions").map((t=>_i.fromEncodingData(t))):void 0,stackPopCount:t.get("stack-pop-count"),stateChanges:void 0!==t.get("state-changes")?t.get("state-changes").map((t=>xi.fromEncodingData(t))):void 0})}}class mr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"approval-program-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"approval-program-trace",valueSchema:new ve(new he(pr.encodingSchema)),omitEmpty:!0},{key:"clear-state-program-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"clear-state-program-trace",valueSchema:new ve(new he(pr.encodingSchema)),omitEmpty:!0},{key:"clear-state-rollback",valueSchema:new ve(new ie),omitEmpty:!0},{key:"clear-state-rollback-error",valueSchema:new ve(new re),omitEmpty:!0},{key:"inner-trace",valueSchema:new ve(new he(mr.encodingSchema)),omitEmpty:!0},{key:"logic-sig-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"logic-sig-trace",valueSchema:new ve(new he(pr.encodingSchema)),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgramHash:t,approvalProgramTrace:e,clearStateProgramHash:n,clearStateProgramTrace:i,clearStateRollback:r,clearStateRollbackError:a,innerTrace:o,logicSigHash:s,logicSigTrace:l}){this.approvalProgramHash="string"==typeof t?L(t):t,this.approvalProgramTrace=e,this.clearStateProgramHash="string"==typeof n?L(n):n,this.clearStateProgramTrace=i,this.clearStateRollback=r,this.clearStateRollbackError=a,this.innerTrace=o,this.logicSigHash="string"==typeof s?L(s):s,this.logicSigTrace=l}getEncodingSchema(){return mr.encodingSchema}toEncodingData(){return new Map([["approval-program-hash",this.approvalProgramHash],["approval-program-trace",void 0!==this.approvalProgramTrace?this.approvalProgramTrace.map((t=>t.toEncodingData())):void 0],["clear-state-program-hash",this.clearStateProgramHash],["clear-state-program-trace",void 0!==this.clearStateProgramTrace?this.clearStateProgramTrace.map((t=>t.toEncodingData())):void 0],["clear-state-rollback",this.clearStateRollback],["clear-state-rollback-error",this.clearStateRollbackError],["inner-trace",void 0!==this.innerTrace?this.innerTrace.map((t=>t.toEncodingData())):void 0],["logic-sig-hash",this.logicSigHash],["logic-sig-trace",void 0!==this.logicSigTrace?this.logicSigTrace.map((t=>t.toEncodingData())):void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SimulationTransactionExecTrace: ${t}`);return new mr({approvalProgramHash:t.get("approval-program-hash"),approvalProgramTrace:void 0!==t.get("approval-program-trace")?t.get("approval-program-trace").map((t=>pr.fromEncodingData(t))):void 0,clearStateProgramHash:t.get("clear-state-program-hash"),clearStateProgramTrace:void 0!==t.get("clear-state-program-trace")?t.get("clear-state-program-trace").map((t=>pr.fromEncodingData(t))):void 0,clearStateRollback:t.get("clear-state-rollback"),clearStateRollbackError:t.get("clear-state-rollback-error"),innerTrace:void 0!==t.get("inner-trace")?t.get("inner-trace").map((t=>mr.fromEncodingData(t))):void 0,logicSigHash:t.get("logic-sig-hash"),logicSigTrace:void 0!==t.get("logic-sig-trace")?t.get("logic-sig-trace").map((t=>pr.fromEncodingData(t))):void 0})}}class gr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"Message",valueSchema:fr.encodingSchema,omitEmpty:!0},{key:"StateProof",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({message:t,stateproof:e}){this.message=t,this.stateproof="string"==typeof e?L(e):e}getEncodingSchema(){return gr.encodingSchema}toEncodingData(){return new Map([["Message",this.message.toEncodingData()],["StateProof",this.stateproof]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProof: ${t}`);return new gr({message:fr.fromEncodingData(t.get("Message")??new Map),stateproof:t.get("StateProof")})}}class fr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"BlockHeadersCommitment",valueSchema:new se,omitEmpty:!0},{key:"FirstAttestedRound",valueSchema:new ae,omitEmpty:!0},{key:"LastAttestedRound",valueSchema:new ae,omitEmpty:!0},{key:"LnProvenWeight",valueSchema:new ae,omitEmpty:!0},{key:"VotersCommitment",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({blockheaderscommitment:t,firstattestedround:e,lastattestedround:n,lnprovenweight:i,voterscommitment:r}){this.blockheaderscommitment="string"==typeof t?L(t):t,this.firstattestedround=w(e),this.lastattestedround=w(n),this.lnprovenweight=w(i),this.voterscommitment="string"==typeof r?L(r):r}getEncodingSchema(){return fr.encodingSchema}toEncodingData(){return new Map([["BlockHeadersCommitment",this.blockheaderscommitment],["FirstAttestedRound",this.firstattestedround],["LastAttestedRound",this.lastattestedround],["LnProvenWeight",this.lnprovenweight],["VotersCommitment",this.voterscommitment]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofMessage: ${t}`);return new fr({blockheaderscommitment:t.get("BlockHeadersCommitment"),firstattestedround:t.get("FirstAttestedRound"),lastattestedround:t.get("LastAttestedRound"),lnprovenweight:t.get("LnProvenWeight"),voterscommitment:t.get("VotersCommitment")})}}class yr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"current_round",valueSchema:new ae,omitEmpty:!0},{key:"online-money",valueSchema:new ae,omitEmpty:!0},{key:"total-money",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:t,onlineMoney:e,totalMoney:n}){this.currentRound=w(t),this.onlineMoney=w(e),this.totalMoney=w(n)}getEncodingSchema(){return yr.encodingSchema}toEncodingData(){return new Map([["current_round",this.currentRound],["online-money",this.onlineMoney],["total-money",this.totalMoney]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded SupplyResponse: ${t}`);return new yr({currentRound:t.get("current_round"),onlineMoney:t.get("online-money"),totalMoney:t.get("total-money")})}}class vr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new se,omitEmpty:!0},{key:"value",valueSchema:wr.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key="string"==typeof t?L(t):t,this.value=e}getEncodingSchema(){return vr.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TealKeyValue: ${t}`);return new vr({key:t.get("key"),value:wr.fromEncodingData(t.get("value")??new Map)})}}class wr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"bytes",valueSchema:new se,omitEmpty:!0},{key:"type",valueSchema:new ae,omitEmpty:!0},{key:"uint",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({bytes:t,type:e,uint:n}){this.bytes="string"==typeof t?L(t):t,this.type=y(e),this.uint=w(n)}getEncodingSchema(){return wr.encodingSchema}toEncodingData(){return new Map([["bytes",this.bytes],["type",this.type],["uint",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TealValue: ${t}`);return new wr({bytes:t.get("bytes"),type:t.get("type"),uint:t.get("uint")})}}class br{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"Deltas",valueSchema:new he(qi.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({deltas:t}){this.deltas=t}getEncodingSchema(){return br.encodingSchema}toEncodingData(){return new Map([["Deltas",this.deltas.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionGroupLedgerStateDeltasForRoundResponse: ${t}`);return new br({deltas:(t.get("Deltas")??[]).map((t=>qi.fromEncodingData(t)))})}}class xr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"consensus-version",valueSchema:new re,omitEmpty:!0},{key:"fee",valueSchema:new ae,omitEmpty:!0},{key:"genesis-hash",valueSchema:new se,omitEmpty:!0},{key:"genesis-id",valueSchema:new re,omitEmpty:!0},{key:"last-round",valueSchema:new ae,omitEmpty:!0},{key:"min-fee",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({consensusVersion:t,fee:e,genesisHash:n,genesisId:i,lastRound:r,minFee:a}){this.consensusVersion=t,this.fee=w(e),this.genesisHash="string"==typeof n?L(n):n,this.genesisId=i,this.lastRound=w(r),this.minFee=w(a)}getEncodingSchema(){return xr.encodingSchema}toEncodingData(){return new Map([["consensus-version",this.consensusVersion],["fee",this.fee],["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["last-round",this.lastRound],["min-fee",this.minFee]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionParametersResponse: ${t}`);return new xr({consensusVersion:t.get("consensus-version"),fee:t.get("fee"),genesisHash:t.get("genesis-hash"),genesisId:t.get("genesis-id"),lastRound:t.get("last-round"),minFee:t.get("min-fee")})}}class Sr{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"idx",valueSchema:new ae,omitEmpty:!0},{key:"proof",valueSchema:new se,omitEmpty:!0},{key:"stibhash",valueSchema:new se,omitEmpty:!0},{key:"treedepth",valueSchema:new ae,omitEmpty:!0},{key:"hashtype",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({idx:t,proof:e,stibhash:n,treedepth:i,hashtype:r}){this.idx=y(t),this.proof="string"==typeof e?L(e):e,this.stibhash="string"==typeof n?L(n):n,this.treedepth=y(i),this.hashtype=r}getEncodingSchema(){return Sr.encodingSchema}toEncodingData(){return new Map([["idx",this.idx],["proof",this.proof],["stibhash",this.stibhash],["treedepth",this.treedepth],["hashtype",this.hashtype]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionProofResponse: ${t}`);return new Sr({idx:t.get("idx"),proof:t.get("proof"),stibhash:t.get("stibhash"),treedepth:t.get("treedepth"),hashtype:t.get("hashtype")})}}class Ar{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"build",valueSchema:Ni.encodingSchema,omitEmpty:!0},{key:"genesis_hash_b64",valueSchema:new se,omitEmpty:!0},{key:"genesis_id",valueSchema:new re,omitEmpty:!0},{key:"versions",valueSchema:new he(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({build:t,genesisHashB64:e,genesisId:n,versions:i}){this.build=t,this.genesisHashB64="string"==typeof e?L(e):e,this.genesisId=n,this.versions=i}getEncodingSchema(){return Ar.encodingSchema}toEncodingData(){return new Map([["build",this.build.toEncodingData()],["genesis_hash_b64",this.genesisHashB64],["genesis_id",this.genesisId],["versions",this.versions]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Version: ${t}`);return new Ar({build:Ni.fromEncodingData(t.get("build")??new Map),genesisHashB64:t.get("genesis_hash_b64"),genesisId:t.get("genesis_id"),versions:t.get("versions")})}}class Cr{constructor(t){this.c=t,this.query={}}executeRequest(t,e){return this.c.get({relativePath:this.path(),query:this.query,requestHeaders:t,customOptions:e})}async do(t,e){const n=await this.executeRequest(t,e);return this.prepare(n)}async doRaw(t,e){return(await this.executeRequest(t,e)).body}}class kr extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}`}exclude(t){return this.query.exclude=t,this}prepare(t){return ee(t.getJSONText(),si)}}class Ir extends Cr{constructor(t,e,n){super(t),this.account=e.toString(),this.assetID=BigInt(n)}path(){return`/v2/accounts/${this.account}/assets/${this.assetID}`}prepare(t){return ee(t.getJSONText(),hi)}}class Er extends Cr{constructor(t,e,n){super(t),this.account=e.toString(),this.applicationID=BigInt(n)}path(){return`/v2/accounts/${this.account}/applications/${this.applicationID}`}prepare(t){return ee(t.getJSONText(),li)}}class _r extends Cr{constructor(t,e){super(t),this.round=BigInt(e),this.query={format:"msgpack"}}path(){return`/v2/blocks/${this.round}`}headerOnly(t){return this.query["header-only"]=t,this}prepare(t){return Qt(t.body,Pi)}}function Mr(t={}){let e=t;return Object.keys(e).every((t=>"content-type"!==t.toLowerCase()))&&(e={...t},e["Content-Type"]="text/plain"),e}class Dr extends Cr{constructor(t,e){super(t),this.source=e}path(){return"/v2/teal/compile"}sourcemap(t=!0){return this.query.sourcemap=t,this}executeRequest(t,e){const n=Mr(t);return this.c.post({relativePath:this.path(),data:R(this.source),query:this.query,requestHeaders:n,customOptions:e})}prepare(t){return ee(t.getJSONText(),Vi)}}class Pr extends Cr{constructor(t,e){super(t),this.blob=te(e)}path(){return"/v2/teal/dryrun"}executeRequest(t,e){const n=Mr(t);return this.c.post({relativePath:this.path(),data:this.blob,requestHeaders:n,customOptions:e})}prepare(t){return ee(t.getJSONText(),Wi)}}class Tr extends Cr{path(){return"/genesis"}prepare(t){return t.getJSONText()}}class Lr extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/assets/${this.index}`}prepare(t){return ee(t.getJSONText(),Ai)}}class Br extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/applications/${this.index}`}prepare(t){return ee(t.getJSONText(),gi)}}class Fr extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/blocks/${this.round}/hash`}prepare(t){return ee(t.getJSONText(),Mi)}}class Rr extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/blocks/${this.round}/txids`}prepare(t){return ee(t.getJSONText(),Ti)}}class Nr extends Cr{constructor(t,e,n){super(t),this.index=BigInt(e);const i=B(n);this.query.name=encodeURI(`b64:${i}`)}path(){return`/v2/applications/${this.index}/box`}prepare(t){return ee(t.getJSONText(),Li)}}class Vr extends Cr{constructor(t,e){super(t),this.index=BigInt(e),this.query.max=0}path(){return`/v2/applications/${this.index}/boxes`}max(t){return this.query.max=t,this}prepare(t){return ee(t.getJSONText(),Ri)}}class zr extends Cr{path(){return"/health"}prepare(t){}}class Gr extends Cr{constructor(t,e){super(t),this.txid=e,this.query.format="msgpack"}prepare(t){return Qt(t.body,tr)}path(){return`/v2/transactions/pending/${this.txid}`}max(t){return this.query.max=t,this}}class Wr extends Cr{constructor(t){super(t),this.query.format="msgpack"}path(){return"/v2/transactions/pending"}prepare(t){return Qt(t.body,er)}max(t){return this.query.max=t,this}}class Or extends Cr{constructor(t,e){super(t),this.address=e.toString(),this.query.format="msgpack"}prepare(t){return Qt(t.body,er)}path(){return`/v2/accounts/${this.address}/transactions/pending`}max(t){return this.query.max=t,this}}class Zr extends Cr{constructor(t,e,n){super(t),this.txID=n,this.round=BigInt(e)}path(){return`/v2/blocks/${this.round}/transactions/${this.txID}/proof`}hashType(t){return this.query.hashtype=t,this}prepare(t){return ee(t.getJSONText(),Sr)}}function Yr(t){return t&&void 0!==t.byteLength}class Hr extends Cr{constructor(t,e){super(t);let n=e;if(Array.isArray(e)){if(!e.every(Yr))throw new TypeError("Array elements must be byte arrays");n=g(...e)}else if(!Yr(n))throw new TypeError("Argument must be byte array");this.txnBytesToPost=n}path(){return"/v2/transactions"}executeRequest(t,e){const n=function(t={}){let e=t;return Object.keys(e).every((t=>"content-type"!==t.toLowerCase()))&&(e={...t},e["Content-Type"]="application/x-binary"),e}(t);return this.c.post({relativePath:this.path(),data:this.txnBytesToPost,requestHeaders:n,customOptions:e})}prepare(t){return ee(t.getJSONText(),nr)}}class jr extends Cr{path(){return"/v2/status"}prepare(t){return ee(t.getJSONText(),Qi)}}class Xr extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/status/wait-for-block-after/${this.round}`}prepare(t){return ee(t.getJSONText(),Qi)}}class Ur extends Cr{path(){return"/v2/transactions/params"}prepare(t){const e=ee(t.getJSONText(),xr);return{flatFee:!1,fee:e.fee,firstValid:e.lastRound,lastValid:e.lastRound+BigInt(1e3),genesisID:e.genesisId,genesisHash:e.genesisHash,minFee:e.minFee,consensusVersion:e.consensusVersion}}}class Kr extends Cr{path(){return"/v2/ledger/supply"}prepare(t){return ee(t.getJSONText(),yr)}}class Jr extends Cr{path(){return"/versions"}prepare(t){return ee(t.getJSONText(),Ar)}}class qr extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/blocks/${this.round}/lightheader/proof`}prepare(t){return ee(t.getJSONText(),$i)}}class $r extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/stateproofs/${this.round}`}prepare(t){return ee(t.getJSONText(),gr)}}class Qr extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/ledger/sync/${this.round}`}executeRequest(t,e){return this.c.post({relativePath:this.path(),data:null,requestHeaders:t,customOptions:e})}prepare(t){}}class ta extends Cr{path(){return"/v2/ledger/sync"}prepare(t){return ee(t.getJSONText(),Ki)}}class ea extends Cr{constructor(t,e){super(t),this.offset=BigInt(e)}path(){return`/v2/devmode/blocks/offset/${this.offset}`}executeRequest(t,e){return this.c.post({relativePath:this.path(),data:null,requestHeaders:t,customOptions:e})}prepare(t){}}class na extends Cr{path(){return"/v2/devmode/blocks/offset"}prepare(t){return ee(t.getJSONText(),Ui)}}class ia extends Cr{constructor(t,e){super(t),this.source=e}path(){return"/v2/teal/disassemble"}executeRequest(t,e){const n=function(t={}){let e=t;return Object.keys(e).every((t=>"content-type"!==t.toLowerCase()))&&(e={...t},e["Content-Type"]="text/plain"),e}(t);return this.c.post({relativePath:this.path(),data:R(this.source),query:this.query,requestHeaders:n,customOptions:e})}prepare(t){return ee(t.getJSONText(),zi)}}class ra extends Cr{constructor(t,e){super(t),this.query.format="msgpack",this.requestBytes=te(e)}path(){return"/v2/transactions/simulate"}executeRequest(t,e){const n=function(t={}){let e=t;return Object.keys(e).every((t=>"content-type"!==t.toLowerCase()))&&(e={...t},e["Content-Type"]="application/msgpack"),e}(t);return this.c.post({relativePath:this.path(),data:this.requestBytes,query:this.query,requestHeaders:n,customOptions:e})}prepare(t){return Qt(t.body,sr)}}class aa extends Cr{path(){return"/ready"}prepare(t){}}class oa extends Cr{path(){return"/v2/ledger/sync"}executeRequest(t,e){return this.c.delete({relativePath:this.path(),data:void 0,requestHeaders:t,customOptions:e})}prepare(t){}}class sa extends Cr{constructor(t,e){super(t),this.id=e,this.query={format:"msgpack"}}path(){return`/v2/deltas/txn/group/${this.id}`}prepare(t){return Qt(t.body,oi)}}class la extends Cr{constructor(t,e){super(t),this.round=BigInt(e),this.query={format:"msgpack"}}path(){return`/v2/deltas/${this.round}`}prepare(t){return Qt(t.body,oi)}}class ca extends Cr{constructor(t,e){super(t),this.round=BigInt(e),this.query={format:"msgpack"}}path(){return`/v2/deltas/${this.round}/txn/group`}prepare(t){return Qt(t.body,br)}}class ha extends at{constructor(t,e,n,i={}){super("X-Algo-API-Token",t,e,n,i)}healthCheck(){return new zr(this.c)}versionsCheck(){return new Jr(this.c)}sendRawTransaction(t){return new Hr(this.c,t)}accountInformation(t){return new kr(this.c,t)}accountAssetInformation(t,e){return new Ir(this.c,t,e)}accountApplicationInformation(t,e){return new Er(this.c,t,e)}block(t){return new _r(this.c,t)}getBlockHash(t){return new Fr(this.c,t)}getBlockTxids(t){return new Rr(this.c,t)}pendingTransactionInformation(t){return new Gr(this.c,t)}pendingTransactionsInformation(){return new Wr(this.c)}pendingTransactionByAddress(t){return new Or(this.c,t)}status(){return new jr(this.c)}statusAfterBlock(t){return new Xr(this.c,t)}getTransactionParams(){return new Ur(this.c)}supply(){return new Kr(this.c)}compile(t){return new Dr(this.c,t)}disassemble(t){return new ia(this.c,t)}dryrun(t){return new Pr(this.c,t)}getAssetByID(t){return new Lr(this.c,t)}getApplicationByID(t){return new Br(this.c,t)}getApplicationBoxByName(t,e){return new Nr(this.c,t,e)}getApplicationBoxes(t){return new Vr(this.c,t)}genesis(){return new Tr(this.c)}getTransactionProof(t,e){return new Zr(this.c,t,e)}getLightBlockHeaderProof(t){return new qr(this.c,t)}getStateProof(t){return new $r(this.c,t)}simulateRawTransactions(t){const e=[];if(Array.isArray(t))for(const n of t)e.push(Qt(n,xn));else e.push(Qt(t,xn));const n=new ar({txnGroups:[new or({txns:e})]});return this.simulateTransactions(n)}simulateTransactions(t){return new ra(this.c,t)}setBlockOffsetTimestamp(t){return new ea(this.c,t)}getBlockOffsetTimestamp(){return new na(this.c)}setSyncRound(t){return new Qr(this.c,t)}unsetSyncRound(){return new oa(this.c)}getSyncRound(){return new ta(this.c)}ready(){return new aa(this.c)}getLedgerStateDeltaForTransactionGroup(t){return new sa(this.c,t)}getLedgerStateDelta(t){return new la(this.c,t)}getTransactionGroupLedgerStateDeltasForRound(t){return new ca(this.c,t)}}class da extends at{constructor(t,e="http://127.0.0.1",n=7833,i={}){super("X-KMD-API-Token",t,e,n,i)}async get(t){return(await this.c.get({relativePath:t})).parseBodyAsJSON({intDecoding:h.SAFE})}async delete(t,e){return(await this.c.delete({relativePath:t,data:e})).parseBodyAsJSON({intDecoding:h.SAFE})}async post(t,e){return(await this.c.post({relativePath:t,data:e})).parseBodyAsJSON({intDecoding:h.SAFE})}async versions(){return this.get("/versions")}async listWallets(){return this.get("/v1/wallets")}async createWallet(t,e,n=new Uint8Array,i="sqlite"){const r={wallet_name:t,wallet_driver_name:i,wallet_password:e,master_derivation_key:B(n)};return this.post("/v1/wallet",r)}async initWalletHandle(t,e){const n={wallet_id:t,wallet_password:e};return this.post("/v1/wallet/init",n)}async releaseWalletHandle(t){const e={wallet_handle_token:t};return this.post("/v1/wallet/release",e)}async renewWalletHandle(t){const e={wallet_handle_token:t};return this.post("/v1/wallet/renew",e)}async renameWallet(t,e,n){const i={wallet_id:t,wallet_password:e,wallet_name:n};return this.post("/v1/wallet/rename",i)}async getWallet(t){const e={wallet_handle_token:t};return this.post("/v1/wallet/info",e)}async exportMasterDerivationKey(t,e){const n={wallet_handle_token:t,wallet_password:e};return{master_derivation_key:L((await this.post("/v1/master-key/export",n)).master_derivation_key)}}async importKey(t,e){const n={wallet_handle_token:t,private_key:B(e)};return this.post("/v1/key/import",n)}async exportKey(t,e,n){const i={wallet_handle_token:t,address:n,wallet_password:e};return{private_key:L((await this.post("/v1/key/export",i)).private_key)}}async generateKey(t){const e={wallet_handle_token:t,display_mnemonic:!1};return this.post("/v1/key",e)}async deleteKey(t,e,n){const i={wallet_handle_token:t,address:n,wallet_password:e};return this.delete("/v1/key",i)}async listKeys(t){const e={wallet_handle_token:t};return this.post("/v1/key/list",e)}async signTransaction(t,e,n){const i={wallet_handle_token:t,wallet_password:e,transaction:B(n.toByte())};return L((await this.post("/v1/transaction/sign",i)).signed_transaction)}async signTransactionWithSpecificPublicKey(t,e,n,i){const r=R(i),a={wallet_handle_token:t,wallet_password:e,transaction:B(n.toByte()),public_key:B(r)};return L((await this.post("/v1/transaction/sign",a)).signed_transaction)}async listMultisig(t){const e={wallet_handle_token:t};return this.post("/v1/multisig/list",e)}async importMultisig(t,e,n,i){const r={wallet_handle_token:t,multisig_version:e,threshold:n,pks:i};return this.post("/v1/multisig/import",r)}async exportMultisig(t,e){const n={wallet_handle_token:t,address:e};return this.post("/v1/multisig/export",n)}async signMultisigTransaction(t,e,n,i,r){const a=R(i),o={wallet_handle_token:t,transaction:B(n.toByte()),public_key:B(a),partial_multisig:r,wallet_password:e};return this.post("/v1/multisig/sign",o)}async deleteMultisig(t,e,n){const i={wallet_handle_token:t,address:n,wallet_password:e};return this.delete("/v1/multisig",i)}}class ua{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"amount-without-pending-rewards",valueSchema:new ae,omitEmpty:!0},{key:"min-balance",valueSchema:new ae,omitEmpty:!0},{key:"pending-rewards",valueSchema:new ae,omitEmpty:!0},{key:"rewards",valueSchema:new ae,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"status",valueSchema:new re,omitEmpty:!0},{key:"total-apps-opted-in",valueSchema:new ae,omitEmpty:!0},{key:"total-assets-opted-in",valueSchema:new ae,omitEmpty:!0},{key:"total-box-bytes",valueSchema:new ae,omitEmpty:!0},{key:"total-boxes",valueSchema:new ae,omitEmpty:!0},{key:"total-created-apps",valueSchema:new ae,omitEmpty:!0},{key:"total-created-assets",valueSchema:new ae,omitEmpty:!0},{key:"apps-local-state",valueSchema:new ve(new he(va.encodingSchema)),omitEmpty:!0},{key:"apps-total-extra-pages",valueSchema:new ve(new ae),omitEmpty:!0},{key:"apps-total-schema",valueSchema:new ve(Ca.encodingSchema),omitEmpty:!0},{key:"assets",valueSchema:new ve(new he(_a.encodingSchema)),omitEmpty:!0},{key:"auth-addr",valueSchema:new ve(new re),omitEmpty:!0},{key:"closed-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"created-apps",valueSchema:new ve(new he(ya.encodingSchema)),omitEmpty:!0},{key:"created-assets",valueSchema:new ve(new he(Ia.encodingSchema)),omitEmpty:!0},{key:"created-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"incentive-eligible",valueSchema:new ve(new ie),omitEmpty:!0},{key:"last-heartbeat",valueSchema:new ve(new ae),omitEmpty:!0},{key:"last-proposed",valueSchema:new ve(new ae),omitEmpty:!0},{key:"participation",valueSchema:new ve(pa.encodingSchema),omitEmpty:!0},{key:"reward-base",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sig-type",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,amount:e,amountWithoutPendingRewards:n,minBalance:i,pendingRewards:r,rewards:a,round:o,status:s,totalAppsOptedIn:l,totalAssetsOptedIn:c,totalBoxBytes:h,totalBoxes:d,totalCreatedApps:u,totalCreatedAssets:p,appsLocalState:m,appsTotalExtraPages:g,appsTotalSchema:f,assets:v,authAddr:b,closedAtRound:x,createdApps:S,createdAssets:A,createdAtRound:C,deleted:k,incentiveEligible:I,lastHeartbeat:E,lastProposed:_,participation:M,rewardBase:D,sigType:P}){this.address=t,this.amount=w(e),this.amountWithoutPendingRewards=w(n),this.minBalance=y(i),this.pendingRewards=w(r),this.rewards=w(a),this.round=w(o),this.status=s,this.totalAppsOptedIn=y(l),this.totalAssetsOptedIn=y(c),this.totalBoxBytes=y(h),this.totalBoxes=y(d),this.totalCreatedApps=y(u),this.totalCreatedAssets=y(p),this.appsLocalState=m,this.appsTotalExtraPages=void 0===g?void 0:y(g),this.appsTotalSchema=f,this.assets=v,this.authAddr="string"==typeof b?Y.fromString(b):b,this.closedAtRound=void 0===x?void 0:w(x),this.createdApps=S,this.createdAssets=A,this.createdAtRound=void 0===C?void 0:w(C),this.deleted=k,this.incentiveEligible=I,this.lastHeartbeat=void 0===E?void 0:y(E),this.lastProposed=void 0===_?void 0:y(_),this.participation=M,this.rewardBase=void 0===D?void 0:w(D),this.sigType=P}getEncodingSchema(){return ua.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["amount-without-pending-rewards",this.amountWithoutPendingRewards],["min-balance",this.minBalance],["pending-rewards",this.pendingRewards],["rewards",this.rewards],["round",this.round],["status",this.status],["total-apps-opted-in",this.totalAppsOptedIn],["total-assets-opted-in",this.totalAssetsOptedIn],["total-box-bytes",this.totalBoxBytes],["total-boxes",this.totalBoxes],["total-created-apps",this.totalCreatedApps],["total-created-assets",this.totalCreatedAssets],["apps-local-state",void 0!==this.appsLocalState?this.appsLocalState.map((t=>t.toEncodingData())):void 0],["apps-total-extra-pages",this.appsTotalExtraPages],["apps-total-schema",void 0!==this.appsTotalSchema?this.appsTotalSchema.toEncodingData():void 0],["assets",void 0!==this.assets?this.assets.map((t=>t.toEncodingData())):void 0],["auth-addr",void 0!==this.authAddr?this.authAddr.toString():void 0],["closed-at-round",this.closedAtRound],["created-apps",void 0!==this.createdApps?this.createdApps.map((t=>t.toEncodingData())):void 0],["created-assets",void 0!==this.createdAssets?this.createdAssets.map((t=>t.toEncodingData())):void 0],["created-at-round",this.createdAtRound],["deleted",this.deleted],["incentive-eligible",this.incentiveEligible],["last-heartbeat",this.lastHeartbeat],["last-proposed",this.lastProposed],["participation",void 0!==this.participation?this.participation.toEncodingData():void 0],["reward-base",this.rewardBase],["sig-type",this.sigType]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Account: ${t}`);return new ua({address:t.get("address"),amount:t.get("amount"),amountWithoutPendingRewards:t.get("amount-without-pending-rewards"),minBalance:t.get("min-balance"),pendingRewards:t.get("pending-rewards"),rewards:t.get("rewards"),round:t.get("round"),status:t.get("status"),totalAppsOptedIn:t.get("total-apps-opted-in"),totalAssetsOptedIn:t.get("total-assets-opted-in"),totalBoxBytes:t.get("total-box-bytes"),totalBoxes:t.get("total-boxes"),totalCreatedApps:t.get("total-created-apps"),totalCreatedAssets:t.get("total-created-assets"),appsLocalState:void 0!==t.get("apps-local-state")?t.get("apps-local-state").map((t=>va.fromEncodingData(t))):void 0,appsTotalExtraPages:t.get("apps-total-extra-pages"),appsTotalSchema:void 0!==t.get("apps-total-schema")?Ca.fromEncodingData(t.get("apps-total-schema")):void 0,assets:void 0!==t.get("assets")?t.get("assets").map((t=>_a.fromEncodingData(t))):void 0,authAddr:t.get("auth-addr"),closedAtRound:t.get("closed-at-round"),createdApps:void 0!==t.get("created-apps")?t.get("created-apps").map((t=>ya.fromEncodingData(t))):void 0,createdAssets:void 0!==t.get("created-assets")?t.get("created-assets").map((t=>Ia.fromEncodingData(t))):void 0,createdAtRound:t.get("created-at-round"),deleted:t.get("deleted"),incentiveEligible:t.get("incentive-eligible"),lastHeartbeat:t.get("last-heartbeat"),lastProposed:t.get("last-proposed"),participation:void 0!==t.get("participation")?pa.fromEncodingData(t.get("participation")):void 0,rewardBase:t.get("reward-base"),sigType:t.get("sig-type")})}}class pa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"selection-participation-key",valueSchema:new se,omitEmpty:!0},{key:"vote-first-valid",valueSchema:new ae,omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new ae,omitEmpty:!0},{key:"vote-last-valid",valueSchema:new ae,omitEmpty:!0},{key:"vote-participation-key",valueSchema:new se,omitEmpty:!0},{key:"state-proof-key",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({selectionParticipationKey:t,voteFirstValid:e,voteKeyDilution:n,voteLastValid:i,voteParticipationKey:r,stateProofKey:a}){this.selectionParticipationKey="string"==typeof t?L(t):t,this.voteFirstValid=w(e),this.voteKeyDilution=w(n),this.voteLastValid=w(i),this.voteParticipationKey="string"==typeof r?L(r):r,this.stateProofKey="string"==typeof a?L(a):a}getEncodingSchema(){return pa.encodingSchema}toEncodingData(){return new Map([["selection-participation-key",this.selectionParticipationKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey],["state-proof-key",this.stateProofKey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountParticipation: ${t}`);return new pa({selectionParticipationKey:t.get("selection-participation-key"),voteFirstValid:t.get("vote-first-valid"),voteKeyDilution:t.get("vote-key-dilution"),voteLastValid:t.get("vote-last-valid"),voteParticipationKey:t.get("vote-participation-key"),stateProofKey:t.get("state-proof-key")})}}class ma{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"account",valueSchema:ua.encodingSchema,omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({account:t,currentRound:e}){this.account=t,this.currentRound=w(e)}getEncodingSchema(){return ma.encodingSchema}toEncodingData(){return new Map([["account",this.account.toEncodingData()],["current-round",this.currentRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountResponse: ${t}`);return new ma({account:ua.fromEncodingData(t.get("account")??new Map),currentRound:t.get("current-round")})}}class ga{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"delta",valueSchema:new he(Za.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,delta:e}){this.address=t,this.delta=e}getEncodingSchema(){return ga.encodingSchema}toEncodingData(){return new Map([["address",this.address],["delta",this.delta.map((t=>t.toEncodingData()))]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountStateDelta: ${t}`);return new ga({address:t.get("address"),delta:(t.get("delta")??[]).map((t=>Za.fromEncodingData(t)))})}}class fa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"accounts",valueSchema:new he(ua.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({accounts:t,currentRound:e,nextToken:n}){this.accounts=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return fa.encodingSchema}toEncodingData(){return new Map([["accounts",this.accounts.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AccountsResponse: ${t}`);return new fa({accounts:(t.get("accounts")??[]).map((t=>ua.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class ya{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new ae,omitEmpty:!0},{key:"params",valueSchema:Sa.encodingSchema,omitEmpty:!0},{key:"created-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"deleted-at-round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:t,params:e,createdAtRound:n,deleted:i,deletedAtRound:r}){this.id=w(t),this.params=e,this.createdAtRound=void 0===n?void 0:w(n),this.deleted=i,this.deletedAtRound=void 0===r?void 0:w(r)}getEncodingSchema(){return ya.encodingSchema}toEncodingData(){return new Map([["id",this.id],["params",this.params.toEncodingData()],["created-at-round",this.createdAtRound],["deleted",this.deleted],["deleted-at-round",this.deletedAtRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Application: ${t}`);return new ya({id:t.get("id"),params:Sa.fromEncodingData(t.get("params")??new Map),createdAtRound:t.get("created-at-round"),deleted:t.get("deleted"),deletedAtRound:t.get("deleted-at-round")})}}class va{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"id",valueSchema:new ae,omitEmpty:!0},{key:"schema",valueSchema:Ca.encodingSchema,omitEmpty:!0},{key:"closed-out-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"key-value",valueSchema:new ve(new he(ao.encodingSchema)),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({id:t,schema:e,closedOutAtRound:n,deleted:i,keyValue:r,optedInAtRound:a}){this.id=w(t),this.schema=e,this.closedOutAtRound=void 0===n?void 0:w(n),this.deleted=i,this.keyValue=r,this.optedInAtRound=void 0===a?void 0:w(a)}getEncodingSchema(){return va.encodingSchema}toEncodingData(){return new Map([["id",this.id],["schema",this.schema.toEncodingData()],["closed-out-at-round",this.closedOutAtRound],["deleted",this.deleted],["key-value",void 0!==this.keyValue?this.keyValue.map((t=>t.toEncodingData())):void 0],["opted-in-at-round",this.optedInAtRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLocalState: ${t}`);return new va({id:t.get("id"),schema:Ca.fromEncodingData(t.get("schema")??new Map),closedOutAtRound:t.get("closed-out-at-round"),deleted:t.get("deleted"),keyValue:void 0!==t.get("key-value")?t.get("key-value").map((t=>ao.fromEncodingData(t))):void 0,optedInAtRound:t.get("opted-in-at-round")})}}class wa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"apps-local-states",valueSchema:new he(va.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({appsLocalStates:t,currentRound:e,nextToken:n}){this.appsLocalStates=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return wa.encodingSchema}toEncodingData(){return new Map([["apps-local-states",this.appsLocalStates.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLocalStatesResponse: ${t}`);return new wa({appsLocalStates:(t.get("apps-local-states")??[]).map((t=>va.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class ba{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"logs",valueSchema:new he(new se),omitEmpty:!0},{key:"txid",valueSchema:new re,omitEmpty:!0})),this.encodingSchemaValue}constructor({logs:t,txid:e}){this.logs=t,this.txid=e}getEncodingSchema(){return ba.encodingSchema}toEncodingData(){return new Map([["logs",this.logs],["txid",this.txid]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLogData: ${t}`);return new ba({logs:t.get("logs"),txid:t.get("txid")})}}class xa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new ae,omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"log-data",valueSchema:new ve(new he(ba.encodingSchema)),omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:t,currentRound:e,logData:n,nextToken:i}){this.applicationId=w(t),this.currentRound=w(e),this.logData=n,this.nextToken=i}getEncodingSchema(){return xa.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["current-round",this.currentRound],["log-data",void 0!==this.logData?this.logData.map((t=>t.toEncodingData())):void 0],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationLogsResponse: ${t}`);return new xa({applicationId:t.get("application-id"),currentRound:t.get("current-round"),logData:void 0!==t.get("log-data")?t.get("log-data").map((t=>ba.fromEncodingData(t))):void 0,nextToken:t.get("next-token")})}}class Sa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"approval-program",valueSchema:new se,omitEmpty:!0},{key:"clear-state-program",valueSchema:new se,omitEmpty:!0},{key:"creator",valueSchema:new ve(new re),omitEmpty:!0},{key:"extra-program-pages",valueSchema:new ve(new ae),omitEmpty:!0},{key:"global-state",valueSchema:new ve(new he(ao.encodingSchema)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new ve(Ca.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new ve(Ca.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({approvalProgram:t,clearStateProgram:e,creator:n,extraProgramPages:i,globalState:r,globalStateSchema:a,localStateSchema:o}){this.approvalProgram="string"==typeof t?L(t):t,this.clearStateProgram="string"==typeof e?L(e):e,this.creator="string"==typeof n?Y.fromString(n):n,this.extraProgramPages=void 0===i?void 0:y(i),this.globalState=r,this.globalStateSchema=a,this.localStateSchema=o}getEncodingSchema(){return Sa.encodingSchema}toEncodingData(){return new Map([["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["creator",void 0!==this.creator?this.creator.toString():void 0],["extra-program-pages",this.extraProgramPages],["global-state",void 0!==this.globalState?this.globalState.map((t=>t.toEncodingData())):void 0],["global-state-schema",void 0!==this.globalStateSchema?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",void 0!==this.localStateSchema?this.localStateSchema.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationParams: ${t}`);return new Sa({approvalProgram:t.get("approval-program"),clearStateProgram:t.get("clear-state-program"),creator:t.get("creator"),extraProgramPages:t.get("extra-program-pages"),globalState:void 0!==t.get("global-state")?t.get("global-state").map((t=>ao.fromEncodingData(t))):void 0,globalStateSchema:void 0!==t.get("global-state-schema")?Ca.fromEncodingData(t.get("global-state-schema")):void 0,localStateSchema:void 0!==t.get("local-state-schema")?Ca.fromEncodingData(t.get("local-state-schema")):void 0})}}class Aa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"application",valueSchema:new ve(ya.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:t,application:e}){this.currentRound=w(t),this.application=e}getEncodingSchema(){return Aa.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["application",void 0!==this.application?this.application.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationResponse: ${t}`);return new Aa({currentRound:t.get("current-round"),application:void 0!==t.get("application")?ya.fromEncodingData(t.get("application")):void 0})}}class Ca{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new ae,omitEmpty:!0},{key:"num-uint",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:t,numUint:e}){this.numByteSlice=y(t),this.numUint=y(e)}getEncodingSchema(){return Ca.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationStateSchema: ${t}`);return new Ca({numByteSlice:t.get("num-byte-slice"),numUint:t.get("num-uint")})}}class ka{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"applications",valueSchema:new he(ya.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({applications:t,currentRound:e,nextToken:n}){this.applications=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return ka.encodingSchema}toEncodingData(){return new Map([["applications",this.applications.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ApplicationsResponse: ${t}`);return new ka({applications:(t.get("applications")??[]).map((t=>ya.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class Ia{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"index",valueSchema:new ae,omitEmpty:!0},{key:"params",valueSchema:Da.encodingSchema,omitEmpty:!0},{key:"created-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"destroyed-at-round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({index:t,params:e,createdAtRound:n,deleted:i,destroyedAtRound:r}){this.index=w(t),this.params=e,this.createdAtRound=void 0===n?void 0:w(n),this.deleted=i,this.destroyedAtRound=void 0===r?void 0:w(r)}getEncodingSchema(){return Ia.encodingSchema}toEncodingData(){return new Map([["index",this.index],["params",this.params.toEncodingData()],["created-at-round",this.createdAtRound],["deleted",this.deleted],["destroyed-at-round",this.destroyedAtRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Asset: ${t}`);return new Ia({index:t.get("index"),params:Da.fromEncodingData(t.get("params")??new Map),createdAtRound:t.get("created-at-round"),deleted:t.get("deleted"),destroyedAtRound:t.get("destroyed-at-round")})}}class Ea{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"balances",valueSchema:new he(Ka.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({balances:t,currentRound:e,nextToken:n}){this.balances=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return Ea.encodingSchema}toEncodingData(){return new Map([["balances",this.balances.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetBalancesResponse: ${t}`);return new Ea({balances:(t.get("balances")??[]).map((t=>Ka.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class _a{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"asset-id",valueSchema:new ae,omitEmpty:!0},{key:"is-frozen",valueSchema:new ie,omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"opted-out-at-round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:t,assetId:e,isFrozen:n,deleted:i,optedInAtRound:r,optedOutAtRound:a}){this.amount=w(t),this.assetId=w(e),this.isFrozen=n,this.deleted=i,this.optedInAtRound=void 0===r?void 0:w(r),this.optedOutAtRound=void 0===a?void 0:w(a)}getEncodingSchema(){return _a.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["is-frozen",this.isFrozen],["deleted",this.deleted],["opted-in-at-round",this.optedInAtRound],["opted-out-at-round",this.optedOutAtRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHolding: ${t}`);return new _a({amount:t.get("amount"),assetId:t.get("asset-id"),isFrozen:t.get("is-frozen"),deleted:t.get("deleted"),optedInAtRound:t.get("opted-in-at-round"),optedOutAtRound:t.get("opted-out-at-round")})}}class Ma{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"assets",valueSchema:new he(_a.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({assets:t,currentRound:e,nextToken:n}){this.assets=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return Ma.encodingSchema}toEncodingData(){return new Map([["assets",this.assets.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetHoldingsResponse: ${t}`);return new Ma({assets:(t.get("assets")??[]).map((t=>_a.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class Da{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"creator",valueSchema:new re,omitEmpty:!0},{key:"decimals",valueSchema:new ae,omitEmpty:!0},{key:"total",valueSchema:new ae,omitEmpty:!0},{key:"clawback",valueSchema:new ve(new re),omitEmpty:!0},{key:"default-frozen",valueSchema:new ve(new ie),omitEmpty:!0},{key:"freeze",valueSchema:new ve(new re),omitEmpty:!0},{key:"manager",valueSchema:new ve(new re),omitEmpty:!0},{key:"metadata-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"name",valueSchema:new ve(new re),omitEmpty:!0},{key:"name-b64",valueSchema:new ve(new se),omitEmpty:!0},{key:"reserve",valueSchema:new ve(new re),omitEmpty:!0},{key:"unit-name",valueSchema:new ve(new re),omitEmpty:!0},{key:"unit-name-b64",valueSchema:new ve(new se),omitEmpty:!0},{key:"url",valueSchema:new ve(new re),omitEmpty:!0},{key:"url-b64",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({creator:t,decimals:e,total:n,clawback:i,defaultFrozen:r,freeze:a,manager:o,metadataHash:s,name:l,nameB64:c,reserve:h,unitName:d,unitNameB64:u,url:p,urlB64:m}){this.creator=t,this.decimals=y(e),this.total=w(n),this.clawback=i,this.defaultFrozen=r,this.freeze=a,this.manager=o,this.metadataHash="string"==typeof s?L(s):s,this.name=l,this.nameB64="string"==typeof c?L(c):c,this.reserve=h,this.unitName=d,this.unitNameB64="string"==typeof u?L(u):u,this.url=p,this.urlB64="string"==typeof m?L(m):m}getEncodingSchema(){return Da.encodingSchema}toEncodingData(){return new Map([["creator",this.creator],["decimals",this.decimals],["total",this.total],["clawback",this.clawback],["default-frozen",this.defaultFrozen],["freeze",this.freeze],["manager",this.manager],["metadata-hash",this.metadataHash],["name",this.name],["name-b64",this.nameB64],["reserve",this.reserve],["unit-name",this.unitName],["unit-name-b64",this.unitNameB64],["url",this.url],["url-b64",this.urlB64]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetParams: ${t}`);return new Da({creator:t.get("creator"),decimals:t.get("decimals"),total:t.get("total"),clawback:t.get("clawback"),defaultFrozen:t.get("default-frozen"),freeze:t.get("freeze"),manager:t.get("manager"),metadataHash:t.get("metadata-hash"),name:t.get("name"),nameB64:t.get("name-b64"),reserve:t.get("reserve"),unitName:t.get("unit-name"),unitNameB64:t.get("unit-name-b64"),url:t.get("url"),urlB64:t.get("url-b64")})}}class Pa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"asset",valueSchema:Ia.encodingSchema,omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({asset:t,currentRound:e}){this.asset=t,this.currentRound=w(e)}getEncodingSchema(){return Pa.encodingSchema}toEncodingData(){return new Map([["asset",this.asset.toEncodingData()],["current-round",this.currentRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetResponse: ${t}`);return new Pa({asset:Ia.fromEncodingData(t.get("asset")??new Map),currentRound:t.get("current-round")})}}class Ta{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"assets",valueSchema:new he(Ia.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({assets:t,currentRound:e,nextToken:n}){this.assets=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return Ta.encodingSchema}toEncodingData(){return new Map([["assets",this.assets.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded AssetsResponse: ${t}`);return new Ta({assets:(t.get("assets")??[]).map((t=>Ia.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class La{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"genesis-hash",valueSchema:new se,omitEmpty:!0},{key:"genesis-id",valueSchema:new re,omitEmpty:!0},{key:"previous-block-hash",valueSchema:new se,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"seed",valueSchema:new se,omitEmpty:!0},{key:"timestamp",valueSchema:new ae,omitEmpty:!0},{key:"transactions-root",valueSchema:new se,omitEmpty:!0},{key:"transactions-root-sha256",valueSchema:new se,omitEmpty:!0},{key:"bonus",valueSchema:new ve(new ae),omitEmpty:!0},{key:"fees-collected",valueSchema:new ve(new ae),omitEmpty:!0},{key:"participation-updates",valueSchema:new ve(Ja.encodingSchema),omitEmpty:!0},{key:"proposer",valueSchema:new ve(new re),omitEmpty:!0},{key:"proposer-payout",valueSchema:new ve(new ae),omitEmpty:!0},{key:"rewards",valueSchema:new ve(Fa.encodingSchema),omitEmpty:!0},{key:"state-proof-tracking",valueSchema:new ve(new he(no.encodingSchema)),omitEmpty:!0},{key:"transactions",valueSchema:new ve(new he(so.encodingSchema)),omitEmpty:!0},{key:"txn-counter",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-state",valueSchema:new ve(Ra.encodingSchema),omitEmpty:!0},{key:"upgrade-vote",valueSchema:new ve(Na.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({genesisHash:t,genesisId:e,previousBlockHash:n,round:i,seed:r,timestamp:a,transactionsRoot:o,transactionsRootSha256:s,bonus:l,feesCollected:c,participationUpdates:h,proposer:d,proposerPayout:u,rewards:p,stateProofTracking:m,transactions:g,txnCounter:f,upgradeState:v,upgradeVote:b}){this.genesisHash="string"==typeof t?L(t):t,this.genesisId=e,this.previousBlockHash="string"==typeof n?L(n):n,this.round=w(i),this.seed="string"==typeof r?L(r):r,this.timestamp=y(a),this.transactionsRoot="string"==typeof o?L(o):o,this.transactionsRootSha256="string"==typeof s?L(s):s,this.bonus=void 0===l?void 0:y(l),this.feesCollected=void 0===c?void 0:y(c),this.participationUpdates=h,this.proposer="string"==typeof d?Y.fromString(d):d,this.proposerPayout=void 0===u?void 0:y(u),this.rewards=p,this.stateProofTracking=m,this.transactions=g,this.txnCounter=void 0===f?void 0:y(f),this.upgradeState=v,this.upgradeVote=b}getEncodingSchema(){return La.encodingSchema}toEncodingData(){return new Map([["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["previous-block-hash",this.previousBlockHash],["round",this.round],["seed",this.seed],["timestamp",this.timestamp],["transactions-root",this.transactionsRoot],["transactions-root-sha256",this.transactionsRootSha256],["bonus",this.bonus],["fees-collected",this.feesCollected],["participation-updates",void 0!==this.participationUpdates?this.participationUpdates.toEncodingData():void 0],["proposer",void 0!==this.proposer?this.proposer.toString():void 0],["proposer-payout",this.proposerPayout],["rewards",void 0!==this.rewards?this.rewards.toEncodingData():void 0],["state-proof-tracking",void 0!==this.stateProofTracking?this.stateProofTracking.map((t=>t.toEncodingData())):void 0],["transactions",void 0!==this.transactions?this.transactions.map((t=>t.toEncodingData())):void 0],["txn-counter",this.txnCounter],["upgrade-state",void 0!==this.upgradeState?this.upgradeState.toEncodingData():void 0],["upgrade-vote",void 0!==this.upgradeVote?this.upgradeVote.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Block: ${t}`);return new La({genesisHash:t.get("genesis-hash"),genesisId:t.get("genesis-id"),previousBlockHash:t.get("previous-block-hash"),round:t.get("round"),seed:t.get("seed"),timestamp:t.get("timestamp"),transactionsRoot:t.get("transactions-root"),transactionsRootSha256:t.get("transactions-root-sha256"),bonus:t.get("bonus"),feesCollected:t.get("fees-collected"),participationUpdates:void 0!==t.get("participation-updates")?Ja.fromEncodingData(t.get("participation-updates")):void 0,proposer:t.get("proposer"),proposerPayout:t.get("proposer-payout"),rewards:void 0!==t.get("rewards")?Fa.fromEncodingData(t.get("rewards")):void 0,stateProofTracking:void 0!==t.get("state-proof-tracking")?t.get("state-proof-tracking").map((t=>no.fromEncodingData(t))):void 0,transactions:void 0!==t.get("transactions")?t.get("transactions").map((t=>so.fromEncodingData(t))):void 0,txnCounter:t.get("txn-counter"),upgradeState:void 0!==t.get("upgrade-state")?Ra.fromEncodingData(t.get("upgrade-state")):void 0,upgradeVote:void 0!==t.get("upgrade-vote")?Na.fromEncodingData(t.get("upgrade-vote")):void 0})}}class Ba{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"blocks",valueSchema:new he(La.encodingSchema),omitEmpty:!0},{key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({blocks:t,currentRound:e,nextToken:n}){this.blocks=t,this.currentRound=w(e),this.nextToken=n}getEncodingSchema(){return Ba.encodingSchema}toEncodingData(){return new Map([["blocks",this.blocks.map((t=>t.toEncodingData()))],["current-round",this.currentRound],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockHeadersResponse: ${t}`);return new Ba({blocks:(t.get("blocks")??[]).map((t=>La.fromEncodingData(t))),currentRound:t.get("current-round"),nextToken:t.get("next-token")})}}class Fa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"fee-sink",valueSchema:new re,omitEmpty:!0},{key:"rewards-calculation-round",valueSchema:new ae,omitEmpty:!0},{key:"rewards-level",valueSchema:new ae,omitEmpty:!0},{key:"rewards-pool",valueSchema:new re,omitEmpty:!0},{key:"rewards-rate",valueSchema:new ae,omitEmpty:!0},{key:"rewards-residue",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({feeSink:t,rewardsCalculationRound:e,rewardsLevel:n,rewardsPool:i,rewardsRate:r,rewardsResidue:a}){this.feeSink=t,this.rewardsCalculationRound=w(e),this.rewardsLevel=w(n),this.rewardsPool=i,this.rewardsRate=w(r),this.rewardsResidue=w(a)}getEncodingSchema(){return Fa.encodingSchema}toEncodingData(){return new Map([["fee-sink",this.feeSink],["rewards-calculation-round",this.rewardsCalculationRound],["rewards-level",this.rewardsLevel],["rewards-pool",this.rewardsPool],["rewards-rate",this.rewardsRate],["rewards-residue",this.rewardsResidue]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockRewards: ${t}`);return new Fa({feeSink:t.get("fee-sink"),rewardsCalculationRound:t.get("rewards-calculation-round"),rewardsLevel:t.get("rewards-level"),rewardsPool:t.get("rewards-pool"),rewardsRate:t.get("rewards-rate"),rewardsResidue:t.get("rewards-residue")})}}class Ra{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"current-protocol",valueSchema:new re,omitEmpty:!0},{key:"next-protocol",valueSchema:new ve(new re),omitEmpty:!0},{key:"next-protocol-approvals",valueSchema:new ve(new ae),omitEmpty:!0},{key:"next-protocol-switch-on",valueSchema:new ve(new ae),omitEmpty:!0},{key:"next-protocol-vote-before",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentProtocol:t,nextProtocol:e,nextProtocolApprovals:n,nextProtocolSwitchOn:i,nextProtocolVoteBefore:r}){this.currentProtocol=t,this.nextProtocol=e,this.nextProtocolApprovals=void 0===n?void 0:y(n),this.nextProtocolSwitchOn=void 0===i?void 0:w(i),this.nextProtocolVoteBefore=void 0===r?void 0:w(r)}getEncodingSchema(){return Ra.encodingSchema}toEncodingData(){return new Map([["current-protocol",this.currentProtocol],["next-protocol",this.nextProtocol],["next-protocol-approvals",this.nextProtocolApprovals],["next-protocol-switch-on",this.nextProtocolSwitchOn],["next-protocol-vote-before",this.nextProtocolVoteBefore]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockUpgradeState: ${t}`);return new Ra({currentProtocol:t.get("current-protocol"),nextProtocol:t.get("next-protocol"),nextProtocolApprovals:t.get("next-protocol-approvals"),nextProtocolSwitchOn:t.get("next-protocol-switch-on"),nextProtocolVoteBefore:t.get("next-protocol-vote-before")})}}class Na{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"upgrade-approve",valueSchema:new ve(new ie),omitEmpty:!0},{key:"upgrade-delay",valueSchema:new ve(new ae),omitEmpty:!0},{key:"upgrade-propose",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({upgradeApprove:t,upgradeDelay:e,upgradePropose:n}){this.upgradeApprove=t,this.upgradeDelay=void 0===e?void 0:w(e),this.upgradePropose=n}getEncodingSchema(){return Na.encodingSchema}toEncodingData(){return new Map([["upgrade-approve",this.upgradeApprove],["upgrade-delay",this.upgradeDelay],["upgrade-propose",this.upgradePropose]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BlockUpgradeVote: ${t}`);return new Na({upgradeApprove:t.get("upgrade-approve"),upgradeDelay:t.get("upgrade-delay"),upgradePropose:t.get("upgrade-propose")})}}class Va{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new se,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"value",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:t,round:e,value:n}){this.name="string"==typeof t?L(t):t,this.round=w(e),this.value="string"==typeof n?L(n):n}getEncodingSchema(){return Va.encodingSchema}toEncodingData(){return new Map([["name",this.name],["round",this.round],["value",this.value]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Box: ${t}`);return new Va({name:t.get("name"),round:t.get("round"),value:t.get("value")})}}class za{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"name",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({name:t}){this.name="string"==typeof t?L(t):t}getEncodingSchema(){return za.encodingSchema}toEncodingData(){return new Map([["name",this.name]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BoxDescriptor: ${t}`);return new za({name:t.get("name")})}}class Ga{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new ae,omitEmpty:!0},{key:"boxes",valueSchema:new he(za.encodingSchema),omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:t,boxes:e,nextToken:n}){this.applicationId=w(t),this.boxes=e,this.nextToken=n}getEncodingSchema(){return Ga.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["boxes",this.boxes.map((t=>t.toEncodingData()))],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded BoxesResponse: ${t}`);return new Ga({applicationId:t.get("application-id"),boxes:(t.get("boxes")??[]).map((t=>za.fromEncodingData(t))),nextToken:t.get("next-token")})}}class Wa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new re,omitEmpty:!0},{key:"data",valueSchema:new ve(Nn.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:t,data:e}){this.message=t,this.data=e}getEncodingSchema(){return Wa.encodingSchema}toEncodingData(){return new Map([["message",this.message],["data",void 0!==this.data?this.data.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ErrorResponse: ${t}`);return new Wa({message:t.get("message"),data:void 0!==t.get("data")?Nn.fromEncodingData(t.get("data")):void 0})}}class Oa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"action",valueSchema:new ae,omitEmpty:!0},{key:"bytes",valueSchema:new ve(new re),omitEmpty:!0},{key:"uint",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({action:t,bytes:e,uint:n}){this.action=y(t),this.bytes=e,this.uint=void 0===n?void 0:w(n)}getEncodingSchema(){return Oa.encodingSchema}toEncodingData(){return new Map([["action",this.action],["bytes",this.bytes],["uint",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EvalDelta: ${t}`);return new Oa({action:t.get("action"),bytes:t.get("bytes"),uint:t.get("uint")})}}class Za{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new re,omitEmpty:!0},{key:"value",valueSchema:Oa.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key=t,this.value=e}getEncodingSchema(){return Za.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded EvalDeltaKeyValue: ${t}`);return new Za({key:t.get("key"),value:Oa.fromEncodingData(t.get("value")??new Map)})}}class Ya{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"hash-type",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({hashType:t}){this.hashType=void 0===t?void 0:y(t)}getEncodingSchema(){return Ya.encodingSchema}toEncodingData(){return new Map([["hash-type",this.hashType]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded HashFactory: ${t}`);return new Ya({hashType:t.get("hash-type")})}}class Ha{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"hb-pk",valueSchema:new ve(new se),omitEmpty:!0},{key:"hb-pk1sig",valueSchema:new ve(new se),omitEmpty:!0},{key:"hb-pk2",valueSchema:new ve(new se),omitEmpty:!0},{key:"hb-pk2sig",valueSchema:new ve(new se),omitEmpty:!0},{key:"hb-sig",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({hbPk:t,hbPk1sig:e,hbPk2:n,hbPk2sig:i,hbSig:r}){this.hbPk="string"==typeof t?L(t):t,this.hbPk1sig="string"==typeof e?L(e):e,this.hbPk2="string"==typeof n?L(n):n,this.hbPk2sig="string"==typeof i?L(i):i,this.hbSig="string"==typeof r?L(r):r}getEncodingSchema(){return Ha.encodingSchema}toEncodingData(){return new Map([["hb-pk",this.hbPk],["hb-pk1sig",this.hbPk1sig],["hb-pk2",this.hbPk2],["hb-pk2sig",this.hbPk2sig],["hb-sig",this.hbSig]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded HbProofFields: ${t}`);return new Ha({hbPk:t.get("hb-pk"),hbPk1sig:t.get("hb-pk1sig"),hbPk2:t.get("hb-pk2"),hbPk2sig:t.get("hb-pk2sig"),hbSig:t.get("hb-sig")})}}class ja{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"db-available",valueSchema:new ie,omitEmpty:!0},{key:"is-migrating",valueSchema:new ie,omitEmpty:!0},{key:"message",valueSchema:new re,omitEmpty:!0},{key:"round",valueSchema:new ae,omitEmpty:!0},{key:"version",valueSchema:new re,omitEmpty:!0},{key:"data",valueSchema:new ve(Nn.encodingSchema),omitEmpty:!0},{key:"errors",valueSchema:new ve(new he(new re)),omitEmpty:!0})),this.encodingSchemaValue}constructor({dbAvailable:t,isMigrating:e,message:n,round:i,version:r,data:a,errors:o}){this.dbAvailable=t,this.isMigrating=e,this.message=n,this.round=w(i),this.version=r,this.data=a,this.errors=o}getEncodingSchema(){return ja.encodingSchema}toEncodingData(){return new Map([["db-available",this.dbAvailable],["is-migrating",this.isMigrating],["message",this.message],["round",this.round],["version",this.version],["data",void 0!==this.data?this.data.toEncodingData():void 0],["errors",this.errors]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded HealthCheck: ${t}`);return new ja({dbAvailable:t.get("db-available"),isMigrating:t.get("is-migrating"),message:t.get("message"),round:t.get("round"),version:t.get("version"),data:void 0!==t.get("data")?Nn.fromEncodingData(t.get("data")):void 0,errors:t.get("errors")})}}class Xa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"block-headers-commitment",valueSchema:new ve(new se),omitEmpty:!0},{key:"first-attested-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"latest-attested-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"ln-proven-weight",valueSchema:new ve(new ae),omitEmpty:!0},{key:"voters-commitment",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({blockHeadersCommitment:t,firstAttestedRound:e,latestAttestedRound:n,lnProvenWeight:i,votersCommitment:r}){this.blockHeadersCommitment="string"==typeof t?L(t):t,this.firstAttestedRound=void 0===e?void 0:w(e),this.latestAttestedRound=void 0===n?void 0:w(n),this.lnProvenWeight=void 0===i?void 0:w(i),this.votersCommitment="string"==typeof r?L(r):r}getEncodingSchema(){return Xa.encodingSchema}toEncodingData(){return new Map([["block-headers-commitment",this.blockHeadersCommitment],["first-attested-round",this.firstAttestedRound],["latest-attested-round",this.latestAttestedRound],["ln-proven-weight",this.lnProvenWeight],["voters-commitment",this.votersCommitment]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded IndexerStateProofMessage: ${t}`);return new Xa({blockHeadersCommitment:t.get("block-headers-commitment"),firstAttestedRound:t.get("first-attested-round"),latestAttestedRound:t.get("latest-attested-round"),lnProvenWeight:t.get("ln-proven-weight"),votersCommitment:t.get("voters-commitment")})}}class Ua{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"hash-factory",valueSchema:new ve(Ya.encodingSchema),omitEmpty:!0},{key:"path",valueSchema:new ve(new he(new se)),omitEmpty:!0},{key:"tree-depth",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({hashFactory:t,path:e,treeDepth:n}){this.hashFactory=t,this.path=e,this.treeDepth=void 0===n?void 0:y(n)}getEncodingSchema(){return Ua.encodingSchema}toEncodingData(){return new Map([["hash-factory",void 0!==this.hashFactory?this.hashFactory.toEncodingData():void 0],["path",this.path],["tree-depth",this.treeDepth]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded MerkleArrayProof: ${t}`);return new Ua({hashFactory:void 0!==t.get("hash-factory")?Ya.fromEncodingData(t.get("hash-factory")):void 0,path:t.get("path"),treeDepth:t.get("tree-depth")})}}class Ka{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"is-frozen",valueSchema:new ie,omitEmpty:!0},{key:"deleted",valueSchema:new ve(new ie),omitEmpty:!0},{key:"opted-in-at-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"opted-out-at-round",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,amount:e,isFrozen:n,deleted:i,optedInAtRound:r,optedOutAtRound:a}){this.address=t,this.amount=w(e),this.isFrozen=n,this.deleted=i,this.optedInAtRound=void 0===r?void 0:w(r),this.optedOutAtRound=void 0===a?void 0:w(a)}getEncodingSchema(){return Ka.encodingSchema}toEncodingData(){return new Map([["address",this.address],["amount",this.amount],["is-frozen",this.isFrozen],["deleted",this.deleted],["opted-in-at-round",this.optedInAtRound],["opted-out-at-round",this.optedOutAtRound]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded MiniAssetHolding: ${t}`);return new Ka({address:t.get("address"),amount:t.get("amount"),isFrozen:t.get("is-frozen"),deleted:t.get("deleted"),optedInAtRound:t.get("opted-in-at-round"),optedOutAtRound:t.get("opted-out-at-round")})}}class Ja{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"absent-participation-accounts",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"expired-participation-accounts",valueSchema:new ve(new he(new re)),omitEmpty:!0})),this.encodingSchemaValue}constructor({absentParticipationAccounts:t,expiredParticipationAccounts:e}){this.absentParticipationAccounts=t,this.expiredParticipationAccounts=e}getEncodingSchema(){return Ja.encodingSchema}toEncodingData(){return new Map([["absent-participation-accounts",this.absentParticipationAccounts],["expired-participation-accounts",this.expiredParticipationAccounts]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded ParticipationUpdates: ${t}`);return new Ja({absentParticipationAccounts:t.get("absent-participation-accounts"),expiredParticipationAccounts:t.get("expired-participation-accounts")})}}class qa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"part-proofs",valueSchema:new ve(Ua.encodingSchema),omitEmpty:!0},{key:"positions-to-reveal",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"reveals",valueSchema:new ve(new he(Qa.encodingSchema)),omitEmpty:!0},{key:"salt-version",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sig-commit",valueSchema:new ve(new se),omitEmpty:!0},{key:"sig-proofs",valueSchema:new ve(Ua.encodingSchema),omitEmpty:!0},{key:"signed-weight",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({partProofs:t,positionsToReveal:e,reveals:n,saltVersion:i,sigCommit:r,sigProofs:a,signedWeight:o}){this.partProofs=t,this.positionsToReveal=void 0===e?void 0:e.map(w),this.reveals=n,this.saltVersion=void 0===i?void 0:y(i),this.sigCommit="string"==typeof r?L(r):r,this.sigProofs=a,this.signedWeight=void 0===o?void 0:w(o)}getEncodingSchema(){return qa.encodingSchema}toEncodingData(){return new Map([["part-proofs",void 0!==this.partProofs?this.partProofs.toEncodingData():void 0],["positions-to-reveal",this.positionsToReveal],["reveals",void 0!==this.reveals?this.reveals.map((t=>t.toEncodingData())):void 0],["salt-version",this.saltVersion],["sig-commit",this.sigCommit],["sig-proofs",void 0!==this.sigProofs?this.sigProofs.toEncodingData():void 0],["signed-weight",this.signedWeight]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofFields: ${t}`);return new qa({partProofs:void 0!==t.get("part-proofs")?Ua.fromEncodingData(t.get("part-proofs")):void 0,positionsToReveal:t.get("positions-to-reveal"),reveals:void 0!==t.get("reveals")?t.get("reveals").map((t=>Qa.fromEncodingData(t))):void 0,saltVersion:t.get("salt-version"),sigCommit:t.get("sig-commit"),sigProofs:void 0!==t.get("sig-proofs")?Ua.fromEncodingData(t.get("sig-proofs")):void 0,signedWeight:t.get("signed-weight")})}}class $a{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"verifier",valueSchema:new ve(io.encodingSchema),omitEmpty:!0},{key:"weight",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({verifier:t,weight:e}){this.verifier=t,this.weight=void 0===e?void 0:w(e)}getEncodingSchema(){return $a.encodingSchema}toEncodingData(){return new Map([["verifier",void 0!==this.verifier?this.verifier.toEncodingData():void 0],["weight",this.weight]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofParticipant: ${t}`);return new $a({verifier:void 0!==t.get("verifier")?io.fromEncodingData(t.get("verifier")):void 0,weight:t.get("weight")})}}class Qa{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"participant",valueSchema:new ve($a.encodingSchema),omitEmpty:!0},{key:"position",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sig-slot",valueSchema:new ve(to.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({participant:t,position:e,sigSlot:n}){this.participant=t,this.position=void 0===e?void 0:w(e),this.sigSlot=n}getEncodingSchema(){return Qa.encodingSchema}toEncodingData(){return new Map([["participant",void 0!==this.participant?this.participant.toEncodingData():void 0],["position",this.position],["sig-slot",void 0!==this.sigSlot?this.sigSlot.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofReveal: ${t}`);return new Qa({participant:void 0!==t.get("participant")?$a.fromEncodingData(t.get("participant")):void 0,position:t.get("position"),sigSlot:void 0!==t.get("sig-slot")?to.fromEncodingData(t.get("sig-slot")):void 0})}}class to{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"lower-sig-weight",valueSchema:new ve(new ae),omitEmpty:!0},{key:"signature",valueSchema:new ve(eo.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({lowerSigWeight:t,signature:e}){this.lowerSigWeight=void 0===t?void 0:w(t),this.signature=e}getEncodingSchema(){return to.encodingSchema}toEncodingData(){return new Map([["lower-sig-weight",this.lowerSigWeight],["signature",void 0!==this.signature?this.signature.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofSigSlot: ${t}`);return new to({lowerSigWeight:t.get("lower-sig-weight"),signature:void 0!==t.get("signature")?eo.fromEncodingData(t.get("signature")):void 0})}}class eo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"falcon-signature",valueSchema:new ve(new se),omitEmpty:!0},{key:"merkle-array-index",valueSchema:new ve(new ae),omitEmpty:!0},{key:"proof",valueSchema:new ve(Ua.encodingSchema),omitEmpty:!0},{key:"verifying-key",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({falconSignature:t,merkleArrayIndex:e,proof:n,verifyingKey:i}){this.falconSignature="string"==typeof t?L(t):t,this.merkleArrayIndex=void 0===e?void 0:y(e),this.proof=n,this.verifyingKey="string"==typeof i?L(i):i}getEncodingSchema(){return eo.encodingSchema}toEncodingData(){return new Map([["falcon-signature",this.falconSignature],["merkle-array-index",this.merkleArrayIndex],["proof",void 0!==this.proof?this.proof.toEncodingData():void 0],["verifying-key",this.verifyingKey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofSignature: ${t}`);return new eo({falconSignature:t.get("falcon-signature"),merkleArrayIndex:t.get("merkle-array-index"),proof:void 0!==t.get("proof")?Ua.fromEncodingData(t.get("proof")):void 0,verifyingKey:t.get("verifying-key")})}}class no{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"next-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"online-total-weight",valueSchema:new ve(new ae),omitEmpty:!0},{key:"type",valueSchema:new ve(new ae),omitEmpty:!0},{key:"voters-commitment",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({nextRound:t,onlineTotalWeight:e,type:n,votersCommitment:i}){this.nextRound=void 0===t?void 0:w(t),this.onlineTotalWeight=void 0===e?void 0:w(e),this.type=void 0===n?void 0:y(n),this.votersCommitment="string"==typeof i?L(i):i}getEncodingSchema(){return no.encodingSchema}toEncodingData(){return new Map([["next-round",this.nextRound],["online-total-weight",this.onlineTotalWeight],["type",this.type],["voters-commitment",this.votersCommitment]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofTracking: ${t}`);return new no({nextRound:t.get("next-round"),onlineTotalWeight:t.get("online-total-weight"),type:t.get("type"),votersCommitment:t.get("voters-commitment")})}}class io{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"commitment",valueSchema:new ve(new se),omitEmpty:!0},{key:"key-lifetime",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({commitment:t,keyLifetime:e}){this.commitment="string"==typeof t?L(t):t,this.keyLifetime=void 0===e?void 0:w(e)}getEncodingSchema(){return io.encodingSchema}toEncodingData(){return new Map([["commitment",this.commitment],["key-lifetime",this.keyLifetime]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateProofVerifier: ${t}`);return new io({commitment:t.get("commitment"),keyLifetime:t.get("key-lifetime")})}}class ro{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"num-byte-slice",valueSchema:new ae,omitEmpty:!0},{key:"num-uint",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({numByteSlice:t,numUint:e}){this.numByteSlice=y(t),this.numUint=y(e)}getEncodingSchema(){return ro.encodingSchema}toEncodingData(){return new Map([["num-byte-slice",this.numByteSlice],["num-uint",this.numUint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded StateSchema: ${t}`);return new ro({numByteSlice:t.get("num-byte-slice"),numUint:t.get("num-uint")})}}class ao{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"key",valueSchema:new se,omitEmpty:!0},{key:"value",valueSchema:oo.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({key:t,value:e}){this.key="string"==typeof t?L(t):t,this.value=e}getEncodingSchema(){return ao.encodingSchema}toEncodingData(){return new Map([["key",this.key],["value",this.value.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TealKeyValue: ${t}`);return new ao({key:t.get("key"),value:oo.fromEncodingData(t.get("value")??new Map)})}}class oo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"bytes",valueSchema:new se,omitEmpty:!0},{key:"type",valueSchema:new ae,omitEmpty:!0},{key:"uint",valueSchema:new ae,omitEmpty:!0})),this.encodingSchemaValue}constructor({bytes:t,type:e,uint:n}){this.bytes="string"==typeof t?L(t):t,this.type=y(e),this.uint=w(n)}getEncodingSchema(){return oo.encodingSchema}toEncodingData(){return new Map([["bytes",this.bytes],["type",this.type],["uint",this.uint]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TealValue: ${t}`);return new oo({bytes:t.get("bytes"),type:t.get("type"),uint:t.get("uint")})}}class so{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"fee",valueSchema:new ae,omitEmpty:!0},{key:"first-valid",valueSchema:new ae,omitEmpty:!0},{key:"last-valid",valueSchema:new ae,omitEmpty:!0},{key:"sender",valueSchema:new re,omitEmpty:!0},{key:"application-transaction",valueSchema:new ve(lo.encodingSchema),omitEmpty:!0},{key:"asset-config-transaction",valueSchema:new ve(co.encodingSchema),omitEmpty:!0},{key:"asset-freeze-transaction",valueSchema:new ve(ho.encodingSchema),omitEmpty:!0},{key:"asset-transfer-transaction",valueSchema:new ve(uo.encodingSchema),omitEmpty:!0},{key:"auth-addr",valueSchema:new ve(new re),omitEmpty:!0},{key:"close-rewards",valueSchema:new ve(new ae),omitEmpty:!0},{key:"closing-amount",valueSchema:new ve(new ae),omitEmpty:!0},{key:"confirmed-round",valueSchema:new ve(new ae),omitEmpty:!0},{key:"created-application-index",valueSchema:new ve(new ae),omitEmpty:!0},{key:"created-asset-index",valueSchema:new ve(new ae),omitEmpty:!0},{key:"genesis-hash",valueSchema:new ve(new se),omitEmpty:!0},{key:"genesis-id",valueSchema:new ve(new re),omitEmpty:!0},{key:"global-state-delta",valueSchema:new ve(new he(Za.encodingSchema)),omitEmpty:!0},{key:"group",valueSchema:new ve(new se),omitEmpty:!0},{key:"heartbeat-transaction",valueSchema:new ve(po.encodingSchema),omitEmpty:!0},{key:"id",valueSchema:new ve(new re),omitEmpty:!0},{key:"inner-txns",valueSchema:new ve(new he(so.encodingSchema)),omitEmpty:!0},{key:"intra-round-offset",valueSchema:new ve(new ae),omitEmpty:!0},{key:"keyreg-transaction",valueSchema:new ve(mo.encodingSchema),omitEmpty:!0},{key:"lease",valueSchema:new ve(new se),omitEmpty:!0},{key:"local-state-delta",valueSchema:new ve(new he(ga.encodingSchema)),omitEmpty:!0},{key:"logs",valueSchema:new ve(new he(new se)),omitEmpty:!0},{key:"note",valueSchema:new ve(new se),omitEmpty:!0},{key:"payment-transaction",valueSchema:new ve(go.encodingSchema),omitEmpty:!0},{key:"receiver-rewards",valueSchema:new ve(new ae),omitEmpty:!0},{key:"rekey-to",valueSchema:new ve(new re),omitEmpty:!0},{key:"round-time",valueSchema:new ve(new ae),omitEmpty:!0},{key:"sender-rewards",valueSchema:new ve(new ae),omitEmpty:!0},{key:"signature",valueSchema:new ve(yo.encodingSchema),omitEmpty:!0},{key:"state-proof-transaction",valueSchema:new ve(xo.encodingSchema),omitEmpty:!0},{key:"tx-type",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({fee:t,firstValid:e,lastValid:n,sender:i,applicationTransaction:r,assetConfigTransaction:a,assetFreezeTransaction:o,assetTransferTransaction:s,authAddr:l,closeRewards:c,closingAmount:h,confirmedRound:d,createdApplicationIndex:u,createdAssetIndex:p,genesisHash:m,genesisId:g,globalStateDelta:f,group:v,heartbeatTransaction:b,id:x,innerTxns:S,intraRoundOffset:A,keyregTransaction:C,lease:k,localStateDelta:I,logs:E,note:_,paymentTransaction:M,receiverRewards:D,rekeyTo:P,roundTime:T,senderRewards:B,signature:F,stateProofTransaction:R,txType:N}){this.fee=w(t),this.firstValid=w(e),this.lastValid=w(n),this.sender=i,this.applicationTransaction=r,this.assetConfigTransaction=a,this.assetFreezeTransaction=o,this.assetTransferTransaction=s,this.authAddr="string"==typeof l?Y.fromString(l):l,this.closeRewards=void 0===c?void 0:w(c),this.closingAmount=void 0===h?void 0:w(h),this.confirmedRound=void 0===d?void 0:w(d),this.createdApplicationIndex=void 0===u?void 0:w(u),this.createdAssetIndex=void 0===p?void 0:w(p),this.genesisHash="string"==typeof m?L(m):m,this.genesisId=g,this.globalStateDelta=f,this.group="string"==typeof v?L(v):v,this.heartbeatTransaction=b,this.id=x,this.innerTxns=S,this.intraRoundOffset=void 0===A?void 0:y(A),this.keyregTransaction=C,this.lease="string"==typeof k?L(k):k,this.localStateDelta=I,this.logs=E,this.note="string"==typeof _?L(_):_,this.paymentTransaction=M,this.receiverRewards=void 0===D?void 0:w(D),this.rekeyTo="string"==typeof P?Y.fromString(P):P,this.roundTime=void 0===T?void 0:y(T),this.senderRewards=void 0===B?void 0:w(B),this.signature=F,this.stateProofTransaction=R,this.txType=N}getEncodingSchema(){return so.encodingSchema}toEncodingData(){return new Map([["fee",this.fee],["first-valid",this.firstValid],["last-valid",this.lastValid],["sender",this.sender],["application-transaction",void 0!==this.applicationTransaction?this.applicationTransaction.toEncodingData():void 0],["asset-config-transaction",void 0!==this.assetConfigTransaction?this.assetConfigTransaction.toEncodingData():void 0],["asset-freeze-transaction",void 0!==this.assetFreezeTransaction?this.assetFreezeTransaction.toEncodingData():void 0],["asset-transfer-transaction",void 0!==this.assetTransferTransaction?this.assetTransferTransaction.toEncodingData():void 0],["auth-addr",void 0!==this.authAddr?this.authAddr.toString():void 0],["close-rewards",this.closeRewards],["closing-amount",this.closingAmount],["confirmed-round",this.confirmedRound],["created-application-index",this.createdApplicationIndex],["created-asset-index",this.createdAssetIndex],["genesis-hash",this.genesisHash],["genesis-id",this.genesisId],["global-state-delta",void 0!==this.globalStateDelta?this.globalStateDelta.map((t=>t.toEncodingData())):void 0],["group",this.group],["heartbeat-transaction",void 0!==this.heartbeatTransaction?this.heartbeatTransaction.toEncodingData():void 0],["id",this.id],["inner-txns",void 0!==this.innerTxns?this.innerTxns.map((t=>t.toEncodingData())):void 0],["intra-round-offset",this.intraRoundOffset],["keyreg-transaction",void 0!==this.keyregTransaction?this.keyregTransaction.toEncodingData():void 0],["lease",this.lease],["local-state-delta",void 0!==this.localStateDelta?this.localStateDelta.map((t=>t.toEncodingData())):void 0],["logs",this.logs],["note",this.note],["payment-transaction",void 0!==this.paymentTransaction?this.paymentTransaction.toEncodingData():void 0],["receiver-rewards",this.receiverRewards],["rekey-to",void 0!==this.rekeyTo?this.rekeyTo.toString():void 0],["round-time",this.roundTime],["sender-rewards",this.senderRewards],["signature",void 0!==this.signature?this.signature.toEncodingData():void 0],["state-proof-transaction",void 0!==this.stateProofTransaction?this.stateProofTransaction.toEncodingData():void 0],["tx-type",this.txType]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded Transaction: ${t}`);return new so({fee:t.get("fee"),firstValid:t.get("first-valid"),lastValid:t.get("last-valid"),sender:t.get("sender"),applicationTransaction:void 0!==t.get("application-transaction")?lo.fromEncodingData(t.get("application-transaction")):void 0,assetConfigTransaction:void 0!==t.get("asset-config-transaction")?co.fromEncodingData(t.get("asset-config-transaction")):void 0,assetFreezeTransaction:void 0!==t.get("asset-freeze-transaction")?ho.fromEncodingData(t.get("asset-freeze-transaction")):void 0,assetTransferTransaction:void 0!==t.get("asset-transfer-transaction")?uo.fromEncodingData(t.get("asset-transfer-transaction")):void 0,authAddr:t.get("auth-addr"),closeRewards:t.get("close-rewards"),closingAmount:t.get("closing-amount"),confirmedRound:t.get("confirmed-round"),createdApplicationIndex:t.get("created-application-index"),createdAssetIndex:t.get("created-asset-index"),genesisHash:t.get("genesis-hash"),genesisId:t.get("genesis-id"),globalStateDelta:void 0!==t.get("global-state-delta")?t.get("global-state-delta").map((t=>Za.fromEncodingData(t))):void 0,group:t.get("group"),heartbeatTransaction:void 0!==t.get("heartbeat-transaction")?po.fromEncodingData(t.get("heartbeat-transaction")):void 0,id:t.get("id"),innerTxns:void 0!==t.get("inner-txns")?t.get("inner-txns").map((t=>so.fromEncodingData(t))):void 0,intraRoundOffset:t.get("intra-round-offset"),keyregTransaction:void 0!==t.get("keyreg-transaction")?mo.fromEncodingData(t.get("keyreg-transaction")):void 0,lease:t.get("lease"),localStateDelta:void 0!==t.get("local-state-delta")?t.get("local-state-delta").map((t=>ga.fromEncodingData(t))):void 0,logs:t.get("logs"),note:t.get("note"),paymentTransaction:void 0!==t.get("payment-transaction")?go.fromEncodingData(t.get("payment-transaction")):void 0,receiverRewards:t.get("receiver-rewards"),rekeyTo:t.get("rekey-to"),roundTime:t.get("round-time"),senderRewards:t.get("sender-rewards"),signature:void 0!==t.get("signature")?yo.fromEncodingData(t.get("signature")):void 0,stateProofTransaction:void 0!==t.get("state-proof-transaction")?xo.fromEncodingData(t.get("state-proof-transaction")):void 0,txType:t.get("tx-type")})}}class lo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"application-id",valueSchema:new ae,omitEmpty:!0},{key:"accounts",valueSchema:new ve(new he(new re)),omitEmpty:!0},{key:"application-args",valueSchema:new ve(new he(new se)),omitEmpty:!0},{key:"approval-program",valueSchema:new ve(new se),omitEmpty:!0},{key:"clear-state-program",valueSchema:new ve(new se),omitEmpty:!0},{key:"extra-program-pages",valueSchema:new ve(new ae),omitEmpty:!0},{key:"foreign-apps",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"foreign-assets",valueSchema:new ve(new he(new ae)),omitEmpty:!0},{key:"global-state-schema",valueSchema:new ve(ro.encodingSchema),omitEmpty:!0},{key:"local-state-schema",valueSchema:new ve(ro.encodingSchema),omitEmpty:!0},{key:"on-completion",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({applicationId:t,accounts:e,applicationArgs:n,approvalProgram:i,clearStateProgram:r,extraProgramPages:a,foreignApps:o,foreignAssets:s,globalStateSchema:l,localStateSchema:c,onCompletion:h}){this.applicationId=w(t),this.accounts=void 0!==e?e.map((t=>"string"==typeof t?Y.fromString(t):t)):void 0,this.applicationArgs=n,this.approvalProgram="string"==typeof i?L(i):i,this.clearStateProgram="string"==typeof r?L(r):r,this.extraProgramPages=void 0===a?void 0:y(a),this.foreignApps=void 0===o?void 0:o.map(w),this.foreignAssets=void 0===s?void 0:s.map(w),this.globalStateSchema=l,this.localStateSchema=c,this.onCompletion=h}getEncodingSchema(){return lo.encodingSchema}toEncodingData(){return new Map([["application-id",this.applicationId],["accounts",void 0!==this.accounts?this.accounts.map((t=>t.toString())):void 0],["application-args",this.applicationArgs],["approval-program",this.approvalProgram],["clear-state-program",this.clearStateProgram],["extra-program-pages",this.extraProgramPages],["foreign-apps",this.foreignApps],["foreign-assets",this.foreignAssets],["global-state-schema",void 0!==this.globalStateSchema?this.globalStateSchema.toEncodingData():void 0],["local-state-schema",void 0!==this.localStateSchema?this.localStateSchema.toEncodingData():void 0],["on-completion",this.onCompletion]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionApplication: ${t}`);return new lo({applicationId:t.get("application-id"),accounts:t.get("accounts"),applicationArgs:t.get("application-args"),approvalProgram:t.get("approval-program"),clearStateProgram:t.get("clear-state-program"),extraProgramPages:t.get("extra-program-pages"),foreignApps:t.get("foreign-apps"),foreignAssets:t.get("foreign-assets"),globalStateSchema:void 0!==t.get("global-state-schema")?ro.fromEncodingData(t.get("global-state-schema")):void 0,localStateSchema:void 0!==t.get("local-state-schema")?ro.fromEncodingData(t.get("local-state-schema")):void 0,onCompletion:t.get("on-completion")})}}class co{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"asset-id",valueSchema:new ve(new ae),omitEmpty:!0},{key:"params",valueSchema:new ve(Da.encodingSchema),omitEmpty:!0})),this.encodingSchemaValue}constructor({assetId:t,params:e}){this.assetId=void 0===t?void 0:w(t),this.params=e}getEncodingSchema(){return co.encodingSchema}toEncodingData(){return new Map([["asset-id",this.assetId],["params",void 0!==this.params?this.params.toEncodingData():void 0]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionAssetConfig: ${t}`);return new co({assetId:t.get("asset-id"),params:void 0!==t.get("params")?Da.fromEncodingData(t.get("params")):void 0})}}class ho{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"address",valueSchema:new re,omitEmpty:!0},{key:"asset-id",valueSchema:new ae,omitEmpty:!0},{key:"new-freeze-status",valueSchema:new ie,omitEmpty:!0})),this.encodingSchemaValue}constructor({address:t,assetId:e,newFreezeStatus:n}){this.address=t,this.assetId=w(e),this.newFreezeStatus=n}getEncodingSchema(){return ho.encodingSchema}toEncodingData(){return new Map([["address",this.address],["asset-id",this.assetId],["new-freeze-status",this.newFreezeStatus]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionAssetFreeze: ${t}`);return new ho({address:t.get("address"),assetId:t.get("asset-id"),newFreezeStatus:t.get("new-freeze-status")})}}class uo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"asset-id",valueSchema:new ae,omitEmpty:!0},{key:"receiver",valueSchema:new re,omitEmpty:!0},{key:"close-amount",valueSchema:new ve(new ae),omitEmpty:!0},{key:"close-to",valueSchema:new ve(new re),omitEmpty:!0},{key:"sender",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:t,assetId:e,receiver:n,closeAmount:i,closeTo:r,sender:a}){this.amount=w(t),this.assetId=w(e),this.receiver=n,this.closeAmount=void 0===i?void 0:w(i),this.closeTo=r,this.sender=a}getEncodingSchema(){return uo.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["asset-id",this.assetId],["receiver",this.receiver],["close-amount",this.closeAmount],["close-to",this.closeTo],["sender",this.sender]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionAssetTransfer: ${t}`);return new uo({amount:t.get("amount"),assetId:t.get("asset-id"),receiver:t.get("receiver"),closeAmount:t.get("close-amount"),closeTo:t.get("close-to"),sender:t.get("sender")})}}class po{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"hb-address",valueSchema:new re,omitEmpty:!0},{key:"hb-key-dilution",valueSchema:new ae,omitEmpty:!0},{key:"hb-proof",valueSchema:Ha.encodingSchema,omitEmpty:!0},{key:"hb-seed",valueSchema:new se,omitEmpty:!0},{key:"hb-vote-id",valueSchema:new se,omitEmpty:!0})),this.encodingSchemaValue}constructor({hbAddress:t,hbKeyDilution:e,hbProof:n,hbSeed:i,hbVoteId:r}){this.hbAddress=t,this.hbKeyDilution=w(e),this.hbProof=n,this.hbSeed="string"==typeof i?L(i):i,this.hbVoteId="string"==typeof r?L(r):r}getEncodingSchema(){return po.encodingSchema}toEncodingData(){return new Map([["hb-address",this.hbAddress],["hb-key-dilution",this.hbKeyDilution],["hb-proof",this.hbProof.toEncodingData()],["hb-seed",this.hbSeed],["hb-vote-id",this.hbVoteId]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionHeartbeat: ${t}`);return new po({hbAddress:t.get("hb-address"),hbKeyDilution:t.get("hb-key-dilution"),hbProof:Ha.fromEncodingData(t.get("hb-proof")??new Map),hbSeed:t.get("hb-seed"),hbVoteId:t.get("hb-vote-id")})}}class mo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"non-participation",valueSchema:new ve(new ie),omitEmpty:!0},{key:"selection-participation-key",valueSchema:new ve(new se),omitEmpty:!0},{key:"state-proof-key",valueSchema:new ve(new se),omitEmpty:!0},{key:"vote-first-valid",valueSchema:new ve(new ae),omitEmpty:!0},{key:"vote-key-dilution",valueSchema:new ve(new ae),omitEmpty:!0},{key:"vote-last-valid",valueSchema:new ve(new ae),omitEmpty:!0},{key:"vote-participation-key",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({nonParticipation:t,selectionParticipationKey:e,stateProofKey:n,voteFirstValid:i,voteKeyDilution:r,voteLastValid:a,voteParticipationKey:o}){this.nonParticipation=t,this.selectionParticipationKey="string"==typeof e?L(e):e,this.stateProofKey="string"==typeof n?L(n):n,this.voteFirstValid=void 0===i?void 0:w(i),this.voteKeyDilution=void 0===r?void 0:w(r),this.voteLastValid=void 0===a?void 0:w(a),this.voteParticipationKey="string"==typeof o?L(o):o}getEncodingSchema(){return mo.encodingSchema}toEncodingData(){return new Map([["non-participation",this.nonParticipation],["selection-participation-key",this.selectionParticipationKey],["state-proof-key",this.stateProofKey],["vote-first-valid",this.voteFirstValid],["vote-key-dilution",this.voteKeyDilution],["vote-last-valid",this.voteLastValid],["vote-participation-key",this.voteParticipationKey]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionKeyreg: ${t}`);return new mo({nonParticipation:t.get("non-participation"),selectionParticipationKey:t.get("selection-participation-key"),stateProofKey:t.get("state-proof-key"),voteFirstValid:t.get("vote-first-valid"),voteKeyDilution:t.get("vote-key-dilution"),voteLastValid:t.get("vote-last-valid"),voteParticipationKey:t.get("vote-participation-key")})}}class go{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"amount",valueSchema:new ae,omitEmpty:!0},{key:"receiver",valueSchema:new re,omitEmpty:!0},{key:"close-amount",valueSchema:new ve(new ae),omitEmpty:!0},{key:"close-remainder-to",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({amount:t,receiver:e,closeAmount:n,closeRemainderTo:i}){this.amount=w(t),this.receiver=e,this.closeAmount=void 0===n?void 0:w(n),this.closeRemainderTo=i}getEncodingSchema(){return go.encodingSchema}toEncodingData(){return new Map([["amount",this.amount],["receiver",this.receiver],["close-amount",this.closeAmount],["close-remainder-to",this.closeRemainderTo]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionPayment: ${t}`);return new go({amount:t.get("amount"),receiver:t.get("receiver"),closeAmount:t.get("close-amount"),closeRemainderTo:t.get("close-remainder-to")})}}class fo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"transaction",valueSchema:so.encodingSchema,omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:t,transaction:e}){this.currentRound=w(t),this.transaction=e}getEncodingSchema(){return fo.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["transaction",this.transaction.toEncodingData()]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionResponse: ${t}`);return new fo({currentRound:t.get("current-round"),transaction:so.fromEncodingData(t.get("transaction")??new Map)})}}class yo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"logicsig",valueSchema:new ve(vo.encodingSchema),omitEmpty:!0},{key:"multisig",valueSchema:new ve(wo.encodingSchema),omitEmpty:!0},{key:"sig",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({logicsig:t,multisig:e,sig:n}){this.logicsig=t,this.multisig=e,this.sig="string"==typeof n?L(n):n}getEncodingSchema(){return yo.encodingSchema}toEncodingData(){return new Map([["logicsig",void 0!==this.logicsig?this.logicsig.toEncodingData():void 0],["multisig",void 0!==this.multisig?this.multisig.toEncodingData():void 0],["sig",this.sig]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionSignature: ${t}`);return new yo({logicsig:void 0!==t.get("logicsig")?vo.fromEncodingData(t.get("logicsig")):void 0,multisig:void 0!==t.get("multisig")?wo.fromEncodingData(t.get("multisig")):void 0,sig:t.get("sig")})}}class vo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"logic",valueSchema:new se,omitEmpty:!0},{key:"args",valueSchema:new ve(new he(new se)),omitEmpty:!0},{key:"multisig-signature",valueSchema:new ve(wo.encodingSchema),omitEmpty:!0},{key:"signature",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({logic:t,args:e,multisigSignature:n,signature:i}){this.logic="string"==typeof t?L(t):t,this.args=e,this.multisigSignature=n,this.signature="string"==typeof i?L(i):i}getEncodingSchema(){return vo.encodingSchema}toEncodingData(){return new Map([["logic",this.logic],["args",this.args],["multisig-signature",void 0!==this.multisigSignature?this.multisigSignature.toEncodingData():void 0],["signature",this.signature]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionSignatureLogicsig: ${t}`);return new vo({logic:t.get("logic"),args:t.get("args"),multisigSignature:void 0!==t.get("multisig-signature")?wo.fromEncodingData(t.get("multisig-signature")):void 0,signature:t.get("signature")})}}class wo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"subsignature",valueSchema:new ve(new he(bo.encodingSchema)),omitEmpty:!0},{key:"threshold",valueSchema:new ve(new ae),omitEmpty:!0},{key:"version",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({subsignature:t,threshold:e,version:n}){this.subsignature=t,this.threshold=void 0===e?void 0:y(e),this.version=void 0===n?void 0:y(n)}getEncodingSchema(){return wo.encodingSchema}toEncodingData(){return new Map([["subsignature",void 0!==this.subsignature?this.subsignature.map((t=>t.toEncodingData())):void 0],["threshold",this.threshold],["version",this.version]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionSignatureMultisig: ${t}`);return new wo({subsignature:void 0!==t.get("subsignature")?t.get("subsignature").map((t=>bo.fromEncodingData(t))):void 0,threshold:t.get("threshold"),version:t.get("version")})}}class bo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"public-key",valueSchema:new ve(new se),omitEmpty:!0},{key:"signature",valueSchema:new ve(new se),omitEmpty:!0})),this.encodingSchemaValue}constructor({publicKey:t,signature:e}){this.publicKey="string"==typeof t?L(t):t,this.signature="string"==typeof e?L(e):e}getEncodingSchema(){return bo.encodingSchema}toEncodingData(){return new Map([["public-key",this.publicKey],["signature",this.signature]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionSignatureMultisigSubsignature: ${t}`);return new bo({publicKey:t.get("public-key"),signature:t.get("signature")})}}class xo{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"message",valueSchema:new ve(Xa.encodingSchema),omitEmpty:!0},{key:"state-proof",valueSchema:new ve(qa.encodingSchema),omitEmpty:!0},{key:"state-proof-type",valueSchema:new ve(new ae),omitEmpty:!0})),this.encodingSchemaValue}constructor({message:t,stateProof:e,stateProofType:n}){this.message=t,this.stateProof=e,this.stateProofType=void 0===n?void 0:y(n)}getEncodingSchema(){return xo.encodingSchema}toEncodingData(){return new Map([["message",void 0!==this.message?this.message.toEncodingData():void 0],["state-proof",void 0!==this.stateProof?this.stateProof.toEncodingData():void 0],["state-proof-type",this.stateProofType]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionStateProof: ${t}`);return new xo({message:void 0!==t.get("message")?Xa.fromEncodingData(t.get("message")):void 0,stateProof:void 0!==t.get("state-proof")?qa.fromEncodingData(t.get("state-proof")):void 0,stateProofType:t.get("state-proof-type")})}}class So{static get encodingSchema(){return this.encodingSchemaValue||(this.encodingSchemaValue=new ue([]),this.encodingSchemaValue.pushEntries({key:"current-round",valueSchema:new ae,omitEmpty:!0},{key:"transactions",valueSchema:new he(so.encodingSchema),omitEmpty:!0},{key:"next-token",valueSchema:new ve(new re),omitEmpty:!0})),this.encodingSchemaValue}constructor({currentRound:t,transactions:e,nextToken:n}){this.currentRound=w(t),this.transactions=e,this.nextToken=n}getEncodingSchema(){return So.encodingSchema}toEncodingData(){return new Map([["current-round",this.currentRound],["transactions",this.transactions.map((t=>t.toEncodingData()))],["next-token",this.nextToken]])}static fromEncodingData(t){if(!(t instanceof Map))throw new Error(`Invalid decoded TransactionsResponse: ${t}`);return new So({currentRound:t.get("current-round"),transactions:(t.get("transactions")??[]).map((t=>so.fromEncodingData(t))),nextToken:t.get("next-token")})}}class Ao extends Cr{path(){return"/health"}prepare(t){return ee(t.getJSONText(),ja)}}class Co extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/assets/${this.index}/balances`}limit(t){return this.query.limit=t,this}currencyGreaterThan(t){return this.query["currency-greater-than"]=t.toString(),this}currencyLessThan(t){return this.query["currency-less-than"]=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}prepare(t){return ee(t.getJSONText(),Ea)}}function ko(t){return"string"==typeof t?t:B(t)}class Io extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}/transactions`}notePrefix(t){return this.query["note-prefix"]=ko(t),this}txType(t){return this.query["tx-type"]=t,this}sigType(t){return this.query["sig-type"]=t,this}txid(t){return this.query.txid=t,this}round(t){return this.query.round=t,this}minRound(t){return this.query["min-round"]=t,this}maxRound(t){return this.query["max-round"]=t,this}assetID(t){return this.query["asset-id"]=t,this}limit(t){return this.query.limit=t,this}beforeTime(t){return this.query["before-time"]=t instanceof Date?t.toISOString():t,this}afterTime(t){return this.query["after-time"]=t instanceof Date?t.toISOString():t,this}currencyGreaterThan(t){return this.query["currency-greater-than"]=t.toString(),this}currencyLessThan(t){return this.query["currency-less-than"]=t,this}nextToken(t){return this.query.next=t,this}rekeyTo(t){return this.query["rekey-to"]=t,this}prepare(t){return ee(t.getJSONText(),So)}}class Eo extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/assets/${this.index}/transactions`}notePrefix(t){return this.query["note-prefix"]=ko(t),this}txType(t){return this.query["tx-type"]=t,this}sigType(t){return this.query["sig-type"]=t,this}txid(t){return this.query.txid=t,this}round(t){return this.query.round=t,this}minRound(t){return this.query["min-round"]=t,this}maxRound(t){return this.query["max-round"]=t,this}limit(t){return this.query.limit=t,this}beforeTime(t){return this.query["before-time"]=t instanceof Date?t.toISOString():t,this}afterTime(t){return this.query["after-time"]=t instanceof Date?t.toISOString():t,this}currencyGreaterThan(t){return this.query["currency-greater-than"]=t.toString(),this}currencyLessThan(t){return this.query["currency-less-than"]=t,this}addressRole(t){return this.query["address-role"]=t,this}address(t){return this.query.address=t.toString(),this}excludeCloseTo(t){return this.query["exclude-close-to"]=t,this}nextToken(t){return this.query.next=t,this}rekeyTo(t){return this.query["rekey-to"]=t,this}prepare(t){return ee(t.getJSONText(),So)}}class _o extends Cr{constructor(t,e){super(t),this.round=BigInt(e)}path(){return`/v2/blocks/${this.round}`}headerOnly(t){return this.query["header-only"]=t,this}prepare(t){return ee(t.getJSONText(),La)}}class Mo extends Cr{constructor(t,e){super(t),this.txID=e}path(){return`/v2/transactions/${this.txID}`}prepare(t){return ee(t.getJSONText(),fo)}}class Do extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}`}round(t){return this.query.round=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}exclude(t){return this.query.exclude=t,this}prepare(t){return ee(t.getJSONText(),ma)}}class Po extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}/assets`}limit(t){return this.query.limit=t,this}round(t){return this.query.round=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}assetId(t){return this.query["asset-id"]=t,this}prepare(t){return ee(t.getJSONText(),Ma)}}class To extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}/created-assets`}limit(t){return this.query.limit=t,this}round(t){return this.query.round=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}assetID(t){return this.query["asset-id"]=t,this}prepare(t){return ee(t.getJSONText(),Ta)}}class Lo extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}/apps-local-state`}limit(t){return this.query.limit=t,this}round(t){return this.query.round=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}applicationID(t){return this.query["application-id"]=t,this}prepare(t){return ee(t.getJSONText(),wa)}}class Bo extends Cr{constructor(t,e){super(t),this.account=e.toString()}path(){return`/v2/accounts/${this.account}/created-applications`}limit(t){return this.query.limit=t,this}round(t){return this.query.round=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}applicationID(t){return this.query["application-id"]=t,this}prepare(t){return ee(t.getJSONText(),ka)}}class Fo extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/assets/${this.index}`}includeAll(t=!0){return this.query["include-all"]=t,this}prepare(t){return ee(t.getJSONText(),Pa)}}class Ro extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/applications/${this.index}`}includeAll(t=!0){return this.query["include-all"]=t,this}prepare(t){return ee(t.getJSONText(),Aa)}}class No extends Cr{constructor(t,e){super(t),this.appID=BigInt(e)}path(){return`/v2/applications/${this.appID}/logs`}limit(t){return this.query.limit=t,this}minRound(t){return this.query["min-round"]=t,this}maxRound(t){return this.query["max-round"]=t,this}nextToken(t){return this.query.next=t,this}sender(t){return this.query["sender-address"]=t,this}txid(t){return this.query.txid=t,this}prepare(t){return ee(t.getJSONText(),xa)}}class Vo extends Cr{constructor(t,e,n){super(t),this.index=BigInt(e);const i=B(n);this.query.name=encodeURI(`b64:${i}`)}path(){return`/v2/applications/${this.index}/box`}prepare(t){return ee(t.getJSONText(),Va)}}class zo extends Cr{path(){return"/v2/accounts"}currencyGreaterThan(t){return this.query["currency-greater-than"]=t.toString(),this}currencyLessThan(t){return this.query["currency-less-than"]=t,this}limit(t){return this.query.limit=t,this}assetID(t){return this.query["asset-id"]=t,this}nextToken(t){return this.query.next=t,this}round(t){return this.query.round=t,this}authAddr(t){return this.query["auth-addr"]=t.toString(),this}applicationID(t){return this.query["application-id"]=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}exclude(t){return this.query.exclude=t,this}prepare(t){return ee(t.getJSONText(),fa)}}class Go extends Cr{path(){return"/v2/block-headers"}absent(t){return this.query.absent=t,this}afterTime(t){return this.query["after-time"]=t instanceof Date?t.toISOString():t,this}beforeTime(t){return this.query["before-time"]=t instanceof Date?t.toISOString():t,this}expired(t){return this.query.expired=t,this}limit(t){return this.query.limit=t,this}maxRound(t){return this.query["max-round"]=t,this}minRound(t){return this.query["min-round"]=t,this}nextToken(t){return this.query.next=t,this}proposers(t){return this.query.proposers=t,this}prepare(t){return ee(t.getJSONText(),Ba)}}class Wo extends Cr{path(){return"/v2/transactions"}notePrefix(t){return this.query["note-prefix"]=ko(t),this}txType(t){return this.query["tx-type"]=t,this}sigType(t){return this.query["sig-type"]=t,this}txid(t){return this.query.txid=t,this}round(t){return this.query.round=t,this}minRound(t){return this.query["min-round"]=t,this}maxRound(t){return this.query["max-round"]=t,this}assetID(t){return this.query["asset-id"]=t,this}limit(t){return this.query.limit=t,this}beforeTime(t){return this.query["before-time"]=t instanceof Date?t.toISOString():t,this}afterTime(t){return this.query["after-time"]=t instanceof Date?t.toISOString():t,this}addressRole(t){return this.query["address-role"]=t,this}address(t){return this.query.address=t.toString(),this}excludeCloseTo(t){return this.query["exclude-close-to"]=t,this}nextToken(t){return this.query.next=t,this}rekeyTo(t){return this.query["rekey-to"]=t,this}applicationID(t){return this.query["application-id"]=t,this}currencyGreaterThan(t){return this.query["currency-greater-than"]=t.toString(),this}currencyLessThan(t){return this.query["currency-less-than"]=t,this}prepare(t){return ee(t.getJSONText(),So)}}class Oo extends Cr{path(){return"/v2/assets"}limit(t){return this.query.limit=t,this}creator(t){return this.query.creator=t.toString(),this}name(t){return this.query.name=t,this}unit(t){return this.query.unit=t,this}index(t){return this.query["asset-id"]=t,this}nextToken(t){return this.query.next=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}prepare(t){return ee(t.getJSONText(),Ta)}}class Zo extends Cr{path(){return"/v2/applications"}index(t){return this.query["application-id"]=t,this}creator(t){return this.query.creator=t.toString(),this}nextToken(t){return this.query.next=t,this}limit(t){return this.query.limit=t,this}includeAll(t=!0){return this.query["include-all"]=t,this}prepare(t){return ee(t.getJSONText(),ka)}}class Yo extends Cr{constructor(t,e){super(t),this.index=BigInt(e)}path(){return`/v2/applications/${this.index}/boxes`}nextToken(t){return this.query.next=t,this}limit(t){return this.query.limit=t,this}prepare(t){return ee(t.getJSONText(),Ga)}}class Ho extends at{constructor(t,e="http://127.0.0.1",n=8080,i={}){super("X-Indexer-API-Token",t,e,n,i)}makeHealthCheck(){return new Ao(this.c)}lookupAssetBalances(t){return new Co(this.c,t)}lookupAssetTransactions(t){return new Eo(this.c,t)}lookupAccountTransactions(t){return new Io(this.c,t)}lookupBlock(t){return new _o(this.c,t)}lookupTransactionByID(t){return new Mo(this.c,t)}lookupAccountByID(t){return new Do(this.c,t)}lookupAccountAssets(t){return new Po(this.c,t)}lookupAccountCreatedAssets(t){return new To(this.c,t)}lookupAccountAppLocalStates(t){return new Lo(this.c,t)}lookupAccountCreatedApplications(t){return new Bo(this.c,t)}lookupAssetByID(t){return new Fo(this.c,t)}lookupApplications(t){return new Ro(this.c,t)}lookupApplicationLogs(t){return new No(this.c,t)}searchAccounts(){return new zo(this.c)}searchForBlockHeaders(){return new Go(this.c)}searchForTransactions(){return new Wo(this.c)}searchForAssets(){return new Oo(this.c)}searchForApplications(){return new Zo(this.c)}searchForApplicationBoxes(t){return new Yo(this.c,t)}lookupApplicationBoxByIDandName(t,e){return new Vo(this.c,t,e)}}async function jo(t,e,n){const i=await t.status().do();if(void 0===i)throw new Error("Unable to get node status");const r=i.lastRound+BigInt(1),a=r+BigInt(n);let o=r;for(;o<a;){let n=!1;try{const i=await t.pendingTransactionInformation(e).do();if(i.confirmedRound)return i;if(i.poolError)throw n=!0,new Error(`Transaction Rejected: ${i.poolError}`)}catch(t){if(n)throw t}await t.statusAfterBlock(o).do(),o+=BigInt(1)}throw new Error(`Transaction not confirmed after ${n} rounds`)}function Xo(t,e){let n=t.toString(16);n.length!==2*e&&(n=n.padStart(2*e,"0"));const i=new Uint8Array(n.length/2);for(let t=0,e=0;t<n.length/2;t++,e+=2)i[t]=parseInt(n.slice(e,e+2),16);return i}function Uo(t){let e=BigInt(0);const n=new DataView(t.buffer,t.byteOffset);for(let i=0;i<t.length;i++)e=BigInt(Number(n.getUint8(i)))+e*BigInt(256);return e}function Ko(){const t=S((e=s.box.secretKeyLength,function(){const{navigator:t}=globalThis;return"object"==typeof t&&"ReactNative"===t.product}()&&console.warn("It looks like you're running in react-native. In order to perform common crypto operations you will need to polyfill common operations such as crypto.getRandomValues"),s.randomBytes(e)));var e;return{addr:new Y(t.publicKey),sk:t.secretKey}}const Jo=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"],qo="failed to decode mnemonic",$o="the mnemonic contains a word that is not in the wordlist";function Qo(t){const e=[];let n=0,i=0;return t.forEach((function(t){n|=t<<i,i+=8,i>=11&&(e.push(2047&n),n>>=11,i-=11)})),i&&e.push(n),e}function ts(t){return t.map((t=>Jo[t]))}function es(t){return ts(Qo(x(t)))[0]}function ns(t){if(t.length!==M)throw new RangeError(`Seed length must be ${M}`);const e=ts(Qo(t)),n=es(t);return`${e.join(" ")} ${n}`}function is(t){const e=t.split(" "),n=e.slice(0,24);for(const t of n)if(-1===Jo.indexOf(t))throw new Error($o);const i=e[e.length-1];let r=function(t){const e=[];let n=0,i=0;return t.forEach((function(t){for(n|=t<<i,i+=11;i>=8;)e.push(255&n),n>>=8,i-=8})),i&&e.push(n),new Uint8Array(e)}(n.map((t=>Jo.indexOf(t))));if(33!==r.length)throw new Error(qo);if(0!==r[r.length-1])throw new Error(qo);if(r=r.slice(0,r.length-1),es(r)===i)return r;throw new Error(qo)}function rs(t){const e=S(is(t));return{addr:new Y(e.publicKey),sk:e.secretKey}}function as(t){return ns(t.slice(0,M))}function os(t){return is(t)}function ss(t){return ns(t)}const ls=16,cs=(new TextEncoder).encode("TG");function hs(t){const e=[];for(const n of t)e.push(n.rawTxID());const n=x(function(t){if(t.length>ls)throw new Error(`${t.length} transactions grouped together but max group size is ${ls}`);if(0===t.length)throw new Error("Cannot compute group ID of zero transactions");const e=Gt({txlist:t});return g(cs,e)}(e));return Uint8Array.from(n)}function ds(t){const e=hs(t);for(const n of t)n.group=e;return t}function us(t,e){let n,i;return e instanceof gn?(n=e.lsig,i=e.address()):(n=e,i=n.sig?new Y(t.sender.publicKey):n.msig?en({version:n.msig.v,threshold:n.msig.thr,pks:n.msig.subsig.map((t=>t.pk))}):n.address()),function(t,e,n){if(!e.verify(n.publicKey))throw new Error("Logic signature verification failed. Ensure the program and signature are valid.");let i;I(n.publicKey,t.sender.publicKey)||(i=n);const r=new xn({lsig:e,txn:t,sgnr:i});return{txID:t.txID(),blob:te(r)}}(t,n,i)}function ps(t,e){return us(t,e)}const ms="Not enough multisig transactions to merge. Need at least two",gs="Cannot merge txs. txIDs differ",fs="Cannot merge txs. Auth addrs differ",ys="Cannot merge txs. Multisig preimages differ",vs="Cannot merge txs. subsigs are mismatched.",ws="Cannot add multisig signature. Signature is not of the correct length.",bs="Key does not exist";function xs(t,{version:e,threshold:n,addrs:i}){const r=tn(i),a={v:e,thr:n,subsig:r.map((t=>({pk:t})))},o=en({version:e,threshold:n,pks:r});let s;return t.sender.equals(o)||(s=o),te(new xn({txn:t,msig:a,sgnr:s}))}function Ss(t,{rawSig:e,myPk:n},{version:i,threshold:r,pks:a}){const o=Qt(xs(t,{version:i,threshold:r,addrs:a.map((t=>new Y(t)))}),xn);let s=!1;if(o.msig.subsig.forEach(((t,i)=>{I(t.pk,n)&&(s=!0,o.msig.subsig[i].s=e)})),!s)throw new Error(bs);return te(o)}function As(t,{version:e,threshold:n,pks:i},r){const a=C(r).publicKey;return Ss(t,{rawSig:t.rawSignTxn(r),myPk:a},{version:e,threshold:n,pks:i})}function Cs(t){if(t.length<2)throw new Error(ms);const e=Qt(t[0],xn);if(!e.msig)throw new Error("Invalid multisig transaction, multisig structure missing at index 0");const n=e.txn.txID(),i=e.sgnr?e.sgnr.toString():void 0,r=en({version:e.msig.v,threshold:e.msig.thr,pks:e.msig.subsig.map((t=>t.pk))}),a=e.msig.subsig.map((t=>({...t})));for(let o=1;o<t.length;o++){const s=Qt(t[o],xn);if(!s.msig)throw new Error(`Invalid multisig transaction, multisig structure missing at index ${o}`);if(s.txn.txID()!==n)throw new Error(gs);if(i!==(s.sgnr?s.sgnr.toString():void 0))throw new Error(fs);if(s.msig.subsig.length!==e.msig.subsig.length)throw new Error(ys);const l=en({version:s.msig.v,threshold:s.msig.thr,pks:s.msig.subsig.map((t=>t.pk))});if(!r.equals(l))throw new Error(ys);s.msig.subsig.forEach(((t,e)=>{if(!t.s)return;const n=a[e];if(n.s&&!m(t.s,n.s))throw new Error(vs);n.s=t.s}))}const o={v:e.msig.v,thr:e.msig.thr,subsig:a},s=void 0!==i?e.sgnr:void 0;return te(new xn({msig:o,txn:e.txn,sgnr:s}))}function ks(t,{version:e,threshold:n,addrs:i},r){const a=As(t,{version:e,threshold:n,pks:tn(i)},r);return{txID:t.txID(),blob:a}}function Is(t,{version:e,threshold:n,addrs:i},r){const a=tn(i),o=Qt(t,xn),s=As(o.txn,{version:e,threshold:n,pks:a},r);return{txID:o.txn.txID(),blob:Cs([t,s])}}function Es(t,{version:e,threshold:n,addrs:i},r,a){const o=tn(i),s=Qt(t,xn),l=function(t,e,n,i){if(!A(i.length))throw new Error(ws);return Ss(t,{rawSig:i,myPk:("string"==typeof n?Y.fromString(n):n).publicKey},e)}(s.txn,{version:e,threshold:n,pks:o},r,a);return{txID:s.txn.txID(),blob:Cs([t,l])}}let _s={},Ms={};function Ds(t){let e=[],n=0,i=0;for(let r=0;r<t.length;r+=1){let a=_s[t[r]];if(void 0===a)throw new Error("Invalid character ("+t[r]+")");const o=32&a;if(a&=31,i+=a<<n,o)n+=5;else{const t=1&i;i>>>=1,t?e.push(0===i?-2147483648:-i):e.push(i),i=n=0}}return e}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").forEach((function(t,e){_s[t]=e,Ms[e]=t}));class Ps{constructor({version:t,sources:e,names:n,mappings:i}){if(this.version=t,this.sources=e,this.names=n,this.mappings=i,3!==this.version)throw new Error(`Only version 3 is supported, got ${this.version}`);if(void 0===this.mappings)throw new Error("mapping undefined, cannot build source map without `mapping`");const r=this.mappings.split(";").map(Ds);this.pcToLocation=new Map,this.sourceAndLineToPc=new Map;const a={line:0,column:0,sourceIndex:0,nameIndex:0};for(const[t,e]of r.entries()){if(e.length<4)continue;const n=e.length>4?e[4]:void 0,[,i,r,o]=e;a.sourceIndex+=i,a.line+=r,a.column+=o,void 0!==n&&(a.nameIndex+=n);const s=`${a.sourceIndex}:${a.line}`;let l=this.sourceAndLineToPc.get(s);void 0===l&&(l=[],this.sourceAndLineToPc.set(s,l));const c={pc:t,column:a.column},h={line:a.line,column:a.column,sourceIndex:a.sourceIndex};void 0!==n&&(c.nameIndex=a.nameIndex,h.nameIndex=a.nameIndex),l.push(c),this.pcToLocation.set(t,h)}}getPcs(){return Array.from(this.pcToLocation.keys())}getLocationForPc(t){return this.pcToLocation.get(t)}getPcsOnSourceLine(t,e){const n=this.sourceAndLineToPc.get(`${t}:${e}`);return void 0===n?[]:n}}const Ts=1380011588,Ls=30;async function Bs({client:t,txns:e,protocolVersion:n,latestTimestamp:i,round:r,sources:a}){const o=[],s=[],l=[],c=[],h=[];for(const t of e)if(t.txn.type===Kt.appl)if(h.push(t.txn.sender.toString()),h.push(...t.txn.applicationCall.accounts.map((t=>t.toString()))),l.push(...t.txn.applicationCall.foreignApps),h.push(...t.txn.applicationCall.foreignApps.map(K).map((t=>t.toString()))),c.push(...t.txn.applicationCall.foreignAssets),t.txn.applicationCall.appIndex===BigInt(0))o.push(new gi({id:Ts,params:new bi({creator:t.txn.sender.toString(),approvalProgram:t.txn.applicationCall.approvalProgram,clearStateProgram:t.txn.applicationCall.clearProgram,localStateSchema:new Si({numUint:t.txn.applicationCall.numLocalInts,numByteSlice:t.txn.applicationCall.numLocalByteSlices}),globalStateSchema:new Si({numUint:t.txn.applicationCall.numGlobalInts,numByteSlice:t.txn.applicationCall.numGlobalByteSlices})})}));else{const{appIndex:e}=t.txn.applicationCall;l.push(e),h.push(K(e).toString())}const d=[];for(const e of new Set(c))d.push(t.getAssetByID(e).do().then((t=>{h.push(t.params.creator)})));await Promise.all(d);const u=[];for(const e of new Set(l))u.push(t.getApplicationByID(e).do().then((t=>{o.push(t),h.push(t.params.creator.toString())})));await Promise.all(u);const p=[];for(const e of new Set(h))p.push(t.accountInformation(e).do().then((t=>{s.push(t)})));return await Promise.all(p),new Gi({txns:e.slice(),accounts:s,apps:o,latestTimestamp:i??0,round:r??0,protocolVersion:n??"",sources:a??[]})}function Fs(t,e){return t.length>e&&e>0?`${t.slice(0,e)}...`:t}function Rs(t,e){if(0===e.length)return"";let n=null;for(let i=0;i<e.length;i++)(i>t.length||p(t[i])!==p(e[i]))&&(n=i);if(null==n)return"";const i=e[n];return i.bytes.length>0?`${n} = 0x${N(i.bytes)}`:`${n} = ${i.uint.toString()}`}function Ns(t,e){return`[${(e?t.reverse():t).map((t=>{switch(t.type){case 1:return`0x${N(t.bytes)}`;case 2:return t.uint.toString();default:return""}})).join(", ")}]`}function Vs(t,e,n){const i=n.maxValueWidth||Ls,r=[["pc#","ln#","source","scratch","stack"]];for(let a=0;a<t.length;a++){const{line:o,error:s,pc:l,scratch:c,stack:h}=t[a],d=void 0!==c?c:[],u=a>0&&void 0!==t[a-1].scratch?t[a-1].scratch:[],p=s?`!! ${s} !!`:e[o];r.push([l.toString().padEnd(3," "),o.toString().padEnd(3," "),Fs(p,i),Fs(Rs(u,d),i),Fs(Ns(h,n.topOfStackFirst),i)])}const a=r.reduce(((t,e)=>{const n=new Array(r[0].length).fill(0);for(let i=0;i<t.length;i++)n[i]=e[i].length>t[i]?e[i].length:t[i];return n}),new Array(r[0].length).fill(0));return`${r.map((t=>t.map(((t,e)=>t.padEnd(a[e]+1," "))).join("|").trim())).join("\n")}\n`}function zs(t,e){if(!t.appCallTrace||!t.disassembly)return"";let n=e;return n=void 0!==e?e:{maxValueWidth:Ls,topOfStackFirst:!1},Vs(t.appCallTrace,t.disassembly,n)}function Gs(t,e){if(!t.logicSigTrace||!t.logicSigDisassembly)return"";let n;return n=void 0!==e?e:{maxValueWidth:Ls,topOfStackFirst:!0},Vs(t.logicSigTrace,t.logicSigDisassembly,n)}function Ws({sender:t,receiver:e,amount:n,closeRemainderTo:i,suggestedParams:r,note:a,lease:o,rekeyTo:s}){return new je({type:Kt.pay,sender:t,note:a,lease:o,rekeyTo:s,suggestedParams:r,paymentParams:{receiver:e,amount:n,closeRemainderTo:i}})}function Os({sender:t,voteKey:e,selectionKey:n,stateProofKey:i,voteFirst:r,voteLast:a,voteKeyDilution:o,nonParticipation:s,suggestedParams:l,note:c,lease:h,rekeyTo:d}){return new je({type:Kt.keyreg,sender:t,note:c,lease:h,rekeyTo:d,suggestedParams:l,keyregParams:{voteKey:e,selectionKey:n,stateProofKey:i,voteFirst:r,voteLast:a,voteKeyDilution:o,nonParticipation:s}})}function Zs({sender:t,assetIndex:e,total:n,decimals:i,defaultFrozen:r,manager:a,reserve:o,freeze:s,clawback:l,unitName:c,assetName:h,assetURL:d,assetMetadataHash:u,note:p,lease:m,rekeyTo:g,suggestedParams:f}){return new je({type:Kt.acfg,sender:t,note:p,lease:m,rekeyTo:g,suggestedParams:f,assetConfigParams:{assetIndex:e,total:n,decimals:i,defaultFrozen:r,manager:a,reserve:o,freeze:s,clawback:l,unitName:c,assetName:h,assetURL:d,assetMetadataHash:u}})}function Ys({sender:t,total:e,decimals:n,defaultFrozen:i,manager:r,reserve:a,freeze:o,clawback:s,unitName:l,assetName:c,assetURL:h,assetMetadataHash:d,note:u,lease:p,rekeyTo:m,suggestedParams:g}){return Zs({sender:t,total:e,decimals:n,defaultFrozen:i,manager:r,reserve:a,freeze:o,clawback:s,unitName:l,assetName:c,assetURL:h,assetMetadataHash:d,note:u,lease:p,rekeyTo:m,suggestedParams:g})}function Hs({sender:t,assetIndex:e,manager:n,reserve:i,freeze:r,clawback:a,strictEmptyAddressChecking:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("assetIndex must be provided");if((o??1)&&(null==n||null==i||null==r||null==a))throw Error("strictEmptyAddressChecking is enabled, but an address is empty. If this is intentional, set strictEmptyAddressChecking to false.");return Zs({sender:t,assetIndex:e,manager:n,reserve:i,freeze:r,clawback:a,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function js({sender:t,assetIndex:e,note:n,lease:i,rekeyTo:r,suggestedParams:a}){if(!e)throw Error("assetIndex must be provided");return Zs({sender:t,assetIndex:e,note:n,lease:i,rekeyTo:r,suggestedParams:a})}function Xs({sender:t,assetIndex:e,freezeTarget:n,frozen:i,suggestedParams:r,note:a,lease:o,rekeyTo:s}){return new je({type:Kt.afrz,sender:t,note:a,lease:o,rekeyTo:s,suggestedParams:r,assetFreezeParams:{assetIndex:e,freezeTarget:n,frozen:i}})}function Us({sender:t,receiver:e,amount:n,closeRemainderTo:i,assetSender:r,note:a,assetIndex:o,suggestedParams:s,rekeyTo:l,lease:c}){if(!o)throw Error("assetIndex must be provided");return new je({type:Kt.axfer,sender:t,note:a,lease:c,rekeyTo:l,suggestedParams:s,assetTransferParams:{assetIndex:o,receiver:e,amount:n,assetSender:r,closeRemainderTo:i}})}function Ks({sender:t,appIndex:e,onComplete:n,appArgs:i,accounts:r,foreignApps:a,foreignAssets:o,boxes:s,approvalProgram:l,clearProgram:c,numLocalInts:h,numLocalByteSlices:d,numGlobalInts:u,numGlobalByteSlices:p,extraPages:m,note:g,lease:f,rekeyTo:y,suggestedParams:v}){if(null==n)throw Error("onComplete must be provided");return new je({type:Kt.appl,sender:t,note:g,lease:f,rekeyTo:y,suggestedParams:v,appCallParams:{appIndex:e,onComplete:n,appArgs:i,accounts:r,foreignAssets:o,foreignApps:a,boxes:s,approvalProgram:l,clearProgram:c,numLocalInts:h,numLocalByteSlices:d,numGlobalInts:u,numGlobalByteSlices:p,extraPages:m}})}function Js({sender:t,onComplete:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,approvalProgram:s,clearProgram:l,numLocalInts:c,numLocalByteSlices:h,numGlobalInts:d,numGlobalByteSlices:u,extraPages:p,note:m,lease:g,rekeyTo:f,suggestedParams:y}){if(!s||!l)throw Error("approvalProgram and clearProgram must be provided");if(null==e)throw Error("onComplete must be provided");return Ks({sender:t,appIndex:0,onComplete:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,approvalProgram:s,clearProgram:l,numLocalInts:c,numLocalByteSlices:h,numGlobalInts:d,numGlobalByteSlices:u,extraPages:p,note:m,lease:g,rekeyTo:f,suggestedParams:y})}function qs({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,approvalProgram:s,clearProgram:l,note:c,lease:h,rekeyTo:d,suggestedParams:u}){if(!e)throw Error("appIndex must be provided");if(!s||!l)throw Error("approvalProgram and clearProgram must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.UpdateApplicationOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,approvalProgram:s,clearProgram:l,note:c,lease:h,rekeyTo:d,suggestedParams:u})}function $s({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("appIndex must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.DeleteApplicationOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function Qs({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("appIndex must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.OptInOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function tl({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("appIndex must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.CloseOutOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function el({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("appIndex must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.ClearStateOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function nl({sender:t,appIndex:e,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h}){if(!e)throw Error("appIndex must be provided");return Ks({sender:t,appIndex:e,onComplete:Jt.NoOpOC,appArgs:n,accounts:i,foreignApps:r,foreignAssets:a,boxes:o,note:s,lease:l,rekeyTo:c,suggestedParams:h})}function il(t){return(e,n)=>{const i=[];for(const r of n)i.push(e[r].signTxn(t.sk));return Promise.resolve(i)}}function rl(t){return(e,n)=>{const i=[];for(const r of n){const{blob:n}=us(e[r],t);i.push(n)}return Promise.resolve(i)}}function al(t,e){return(n,i)=>{const r=[];for(const a of i){const i=n[a],o=[];for(const n of e){const{blob:e}=ks(i,t,n);o.push(e)}o.length>1?r.push(Cs(o)):r.push(o[0])}return Promise.resolve(r)}}function ol(){return(t,e)=>{const n=[];for(const i of e)n.push(An(t[i]));return Promise.resolve(n)}}function sl(t){return"object"==typeof t&&2===Object.keys(t).length&&"object"==typeof t.txn&&"function"==typeof t.signer}const ll=65535,cl=32,hl=1,dl=1,ul=2,pl=/^([a-z\d[\](),]+)\[(0|[1-9][\d]*)]$/,ml=/^ufixed([1-9][\d]*)x([1-9][\d]*)$/;class gl{static from(t){if(t.endsWith("[]")){const e=gl.from(t.slice(0,t.length-2));return new Al(e)}if(t.endsWith("]")){const e=t.match(pl);if(!e||3!==e.length)throw new Error(`malformed static array string: ${t}`);const n=e[2],i=parseInt(n,10);if(i>ll)throw new Error(`array length exceeds limit ${ll}`);const r=gl.from(e[1]);return new Sl(r,i)}if(t.startsWith("uint")){const e=t=>[...t].every((t=>"0123456789".includes(t))),n=t.slice(4,t.length);if(!e(n))throw new Error(`malformed uint string: ${n}`);const i=parseInt(n,10);if(i>ll)throw new Error(`malformed uint string: ${i}`);return new fl(i)}if("byte"===t)return new bl;if(t.startsWith("ufixed")){const e=t.match(ml);if(!e||3!==e.length)throw new Error(`malformed ufixed type: ${t}`);const n=parseInt(e[1],10),i=parseInt(e[2],10);return new yl(n,i)}if("bool"===t)return new wl;if("address"===t)return new vl;if("string"===t)return new xl;if(t.length>=2&&"("===t[0]&&")"===t[t.length-1]){const e=Cl.parseTupleContent(t.slice(1,t.length-1)),n=[];for(let t=0;t<e.length;t++){const i=gl.from(e[t]);n.push(i)}return new Cl(n)}throw new Error(`cannot convert a string ${t} to an ABI type`)}}class fl extends gl{constructor(t){if(super(),t%8!=0||t<8||t>512)throw new Error(`unsupported uint type bitSize: ${t}`);this.bitSize=t}toString(){return`uint${this.bitSize}`}equals(t){return t instanceof fl&&this.bitSize===t.bitSize}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(t){if("bigint"!=typeof t&&"number"!=typeof t)throw new Error(`Cannot encode value as uint${this.bitSize}: ${t}`);if(t>=BigInt(2**this.bitSize)||t<BigInt(0))throw new Error(`${t} is not a non-negative int or too big to fit in size uint${this.bitSize}`);if("number"==typeof t&&!Number.isSafeInteger(t))throw new Error(`${t} should be converted into a BigInt before it is encoded`);return Xo(t,this.bitSize/8)}decode(t){if(t.length!==this.bitSize/8)throw new Error(`byte string must correspond to a uint${this.bitSize}`);return Uo(t)}}class yl extends gl{constructor(t,e){if(super(),t%8!=0||t<8||t>512)throw new Error(`unsupported ufixed type bitSize: ${t}`);if(e>160||e<1)throw new Error(`unsupported ufixed type precision: ${e}`);this.bitSize=t,this.precision=e}toString(){return`ufixed${this.bitSize}x${this.precision}`}equals(t){return t instanceof yl&&this.bitSize===t.bitSize&&this.precision===t.precision}isDynamic(){return!1}byteLen(){return this.bitSize/8}encode(t){if("bigint"!=typeof t&&"number"!=typeof t)throw new Error(`Cannot encode value as ${this.toString()}: ${t}`);if(t>=BigInt(2**this.bitSize)||t<BigInt(0))throw new Error(`${t} is not a non-negative int or too big to fit in size ${this.toString()}`);if("number"==typeof t&&!Number.isSafeInteger(t))throw new Error(`${t} should be converted into a BigInt before it is encoded`);return Xo(t,this.bitSize/8)}decode(t){if(t.length!==this.bitSize/8)throw new Error(`byte string must correspond to a ${this.toString()}`);return Uo(t)}}class vl extends gl{toString(){return"address"}equals(t){return t instanceof vl}isDynamic(){return!1}byteLen(){return cl}encode(t){if("string"==typeof t)return H(t).publicKey;if(t instanceof Y)return t.publicKey;if(t instanceof Uint8Array){if(32!==t.byteLength)throw new Error("byte string must be 32 bytes long for an address");return t}throw new Error(`Cannot encode value as ${this.toString()}: ${t}`)}decode(t){if(32!==t.byteLength)throw new Error("byte string must be 32 bytes long for an address");return X(t)}}class wl extends gl{toString(){return"bool"}equals(t){return t instanceof wl}isDynamic(){return!1}byteLen(){return dl}encode(t){if("boolean"!=typeof t)throw new Error(`Cannot encode value as bool: ${t}`);return t?new Uint8Array([128]):new Uint8Array([0])}decode(t){if(1!==t.byteLength)throw new Error("bool string must be 1 byte long");const e=t[0];if(128===e)return!0;if(0===e)return!1;throw new Error("boolean could not be decoded from the byte string")}}class bl extends gl{toString(){return"byte"}equals(t){return t instanceof bl}isDynamic(){return!1}byteLen(){return hl}encode(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new Error(`Cannot encode value as byte: ${t}`);if("bigint"==typeof t&&(t=Number(t)),t<0||t>255)throw new Error(`${t} cannot be encoded into a byte`);return new Uint8Array([t])}decode(t){if(1!==t.byteLength)throw new Error("byte string must be 1 byte long");return t[0]}}class xl extends gl{toString(){return"string"}equals(t){return t instanceof xl}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(t){if("string"!=typeof t&&!(t instanceof Uint8Array))throw new Error(`Cannot encode value as string: ${t}`);let e;e="string"==typeof t?(new TextEncoder).encode(t):t;const n=Xo(e.length,ul),i=new Uint8Array(e.length+ul);return i.set(n),i.set(e,ul),i}decode(t){if(t.length<ul)throw new Error(`byte string is too short to be decoded. Actual length is ${t.length}, but expected at least ${ul}`);const e=new DataView(t.buffer,t.byteOffset,ul).getUint16(0),n=t.slice(ul,t.length);if(e!==n.length)throw new Error(`string length bytes do not match the actual length of string. Expected ${e}, got ${n.length}`);return new TextDecoder("utf-8").decode(n)}}class Sl extends gl{constructor(t,e){if(super(),e<0)throw new Error(`static array must have a non negative length: ${e}`);this.childType=t,this.staticLength=e}toString(){return`${this.childType.toString()}[${this.staticLength}]`}equals(t){return t instanceof Sl&&this.staticLength===t.staticLength&&this.childType.equals(t.childType)}isDynamic(){return this.childType.isDynamic()}byteLen(){return this.childType.constructor===wl?Math.ceil(this.staticLength/8):this.staticLength*this.childType.byteLen()}encode(t){if(!(Array.isArray(t)||t instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${t}`);if(t.length!==this.staticLength)throw new Error(`Value array does not match static array length. Expected ${this.staticLength}, got ${t.length}`);return this.toABITupleType().encode(t)}decode(t){return this.toABITupleType().decode(t)}toABITupleType(){return new Cl(Array(this.staticLength).fill(this.childType))}}class Al extends gl{constructor(t){super(),this.childType=t}toString(){return`${this.childType.toString()}[]`}equals(t){return t instanceof Al&&this.childType.equals(t.childType)}isDynamic(){return!0}byteLen(){throw new Error(`${this.toString()} is a dynamic type`)}encode(t){if(!(Array.isArray(t)||t instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${t}`);const e=this.toABITupleType(t.length),n=e.encode(t);return g(Xo(e.childTypes.length,ul),n)}decode(t){const e=new DataView(t.buffer,0,ul).getUint16(0);return this.toABITupleType(e).decode(t.slice(ul,t.length))}toABITupleType(t){return new Cl(Array(t).fill(this.childType))}}class Cl extends gl{constructor(t){if(super(),t.length>=ll)throw new Error("tuple type child type number larger than maximum uint16 error");this.childTypes=t}toString(){const t=[];for(let e=0;e<this.childTypes.length;e++)t[e]=this.childTypes[e].toString();return`(${t.join(",")})`}equals(t){return t instanceof Cl&&this.childTypes.length===t.childTypes.length&&this.childTypes.every(((e,n)=>e.equals(t.childTypes[n])))}isDynamic(){return this.childTypes.some((t=>t.isDynamic()))}byteLen(){let t=0;for(let e=0;e<this.childTypes.length;e++)if(this.childTypes[e].constructor===wl){const n=Il(this.childTypes,e,1),i=n+1;e+=n,t+=Math.trunc((i+7)/8)}else t+=this.childTypes[e].byteLen();return t}encode(t){if(!(Array.isArray(t)||t instanceof Uint8Array))throw new Error(`Cannot encode value as ${this.toString()}: ${t}`);const e=Array.from(t);if(t.length>ll)throw new Error("length of tuple array should not exceed a uint16");const n=this.childTypes,i=[],r=[],a=new Map;let o=0;for(;o<n.length;){const t=n[o];if(t.isDynamic())a.set(i.length,!0),i.push(new Uint8Array([0,0])),r.push(t.encode(e[o]));else{if(t.constructor===wl){const t=Il(n,o,-1);let r=Il(n,o,1);if(t%8!=0)throw new Error("expected before index should have number of bool mod 8 equal 0");r=Math.min(7,r);const a=kl(e.slice(o,o+r+1));i.push(Xo(a,1)),o+=r}else{const n=t.encode(e[o]);i.push(n)}a.set(o,!1),r.push(new Uint8Array)}o+=1}let s=0;for(const t of i)s+=t.length;let l=0;for(let t=0;t<i.length;t++){if(a.get(t)){const e=s+l;if(e>ll)throw new Error(`byte length of ${e} should not exceed a uint16`);i[t]=Xo(e,ul)}l+=r[t].length}return g(...i,...r)}decode(t){const e=this.childTypes,n=[],i=[];let r=0,a=0;const o=new DataView(t.buffer);for(;r<e.length;){const s=e[r];if(s.isDynamic()){if(t.slice(a,t.length).length<ul)throw new Error("dynamic type in tuple is too short to be decoded");const e=o.getUint16(a);if(n.length>0&&(n[n.length-1].right=e,e<n[n.length-1].left))throw new Error("dynamic index segment miscalculation: left is greater than right index");const r={left:e,right:-1};n.push(r),i.push(null),a+=ul}else if(s.constructor===wl){const e=Il(this.childTypes,r,-1);let n=Il(this.childTypes,r,1);if(e%8!=0)throw new Error("expected before bool number mod 8 === 0");n=Math.min(7,n);for(let e=0;e<=n;e++){const n=128>>e;(t[a]&n)>0?i.push(new Uint8Array([128])):i.push(new Uint8Array([0]))}r+=n,a+=1}else{const e=s.byteLen();i.push(t.slice(a,a+e)),a+=e}if(r!==e.length-1&&a>=t.length)throw new Error("input byte not enough to decode");r+=1}if(n.length>0&&(n[n.length-1].right=t.length,a=t.length),a<t.length)throw new Error("input byte not fully consumed");for(let t=0;t<n.length;t++){const e=n[t];if(e.left>e.right)throw new Error("dynamic segment should display a [l, r] space with l <= r");if(t!==n.length-1&&e.right!==n[t+1].left)throw new Error("dynamic segment should be consecutive")}let s=0;for(let r=0;r<e.length;r++)e[r].isDynamic()&&(i[r]=t.slice(n[s].left,n[s].right),s+=1);const l=[];for(let t=0;t<e.length;t++){const n=e[t].decode(i[t]);l.push(n)}return l}static parseTupleContent(t){if(0===t.length)return[];if(t.endsWith(",")||t.startsWith(","))throw new Error("tuple string should not start with comma");if(t.includes(",,"))throw new Error("tuple string should not have consecutive commas");const e=[];let n=0,i="";for(const r of t)i+=r,"("===r?n+=1:")"===r?n-=1:","===r&&0===n&&(e.push(i.slice(0,i.length-1)),i="");if(0!==i.length&&e.push(i),0!==n)throw new Error("tuple string has mismatched parentheses");return e}}function kl(t){let e=0;if(t.length>8)throw new Error("value list passed in should be no greater than length 8");for(let n=0;n<t.length;n++){const i=t[n];if("boolean"!=typeof i)throw new Error("non-boolean values cannot be compressed into a byte");i&&(e|=1<<7-n)}return e}function Il(t,e,n){let i=0;for(;;){const r=e+n*i;if(t[r].constructor!==wl){i-=1;break}if(r!==t.length-1&&1===n)i+=1;else{if(!(r>0&&-1===n))break;i+=1}}return i}var El,_l;function Ml(t){return t===El.any||t===El.pay||t===El.keyreg||t===El.acfg||t===El.axfer||t===El.afrz||t===El.appl}function Dl(t,e){return t===El.any||!!e.type&&e.type.toString()===t.toString()}function Pl(t){return t===_l.account||t===_l.application||t===_l.asset}!function(t){t.any="txn",t.pay="pay",t.keyreg="keyreg",t.acfg="acfg",t.axfer="axfer",t.afrz="afrz",t.appl="appl"}(El||(El={})),function(t){t.account="account",t.application="application",t.asset="asset"}(_l||(_l={}));class Tl{constructor(t){if("string"!=typeof t.name||"object"!=typeof t.returns||!Array.isArray(t.args))throw new Error("Invalid ABIMethod parameters");this.name=t.name,this.description=t.desc,this.args=t.args.map((({type:t,name:e,desc:n})=>Ml(t)||Pl(t)?{type:t,name:e,description:n}:{type:gl.from(t),name:e,description:n})),this.returns={type:"void"===t.returns.type?t.returns.type:gl.from(t.returns.type),description:t.returns.desc},this.events=t.events,this.readonly=t.readonly}getSignature(){const t=this.args.map((t=>t.type.toString())).join(","),e=this.returns.type.toString();return`${this.name}(${t})${e}`}getSelector(){const t=x(this.getSignature());return new Uint8Array(t.slice(0,4))}txnCount(){let t=1;for(const e of this.args)"string"==typeof e.type&&Ml(e.type)&&(t+=1);return t}toJSON(){return{name:this.name,desc:this.description,args:this.args.map((({type:t,name:e,description:n})=>({type:t.toString(),name:e,desc:n}))),returns:{type:this.returns.type.toString(),desc:this.returns.description},events:this.events,readonly:this.readonly}}static fromSignature(t){const{name:e,args:n,returns:i}=function(t){const e=t.indexOf("(");if(-1===e)throw new Error(`Invalid method signature: ${t}`);let n=-1,i=0;for(let r=e;r<t.length;r++){const e=t[r];if("("===e)i+=1;else if(")"===e){if(0===i)break;if(i-=1,0===i){n=r;break}}}if(-1===n)throw new Error(`Invalid method signature: ${t}`);return{name:t.slice(0,e),args:Cl.parseTupleContent(t.slice(e+1,n)),returns:t.slice(n+1)}}(t);return new Tl({name:e,args:n.map((t=>({type:t}))),returns:{type:i}})}}function Ll(t,e){if(null===t||!Array.isArray(t)||!t.every((t=>t instanceof Tl)))throw new Error("Methods list provided is null or not the correct type");const n=t.filter((t=>t.name===e));if(n.length>1)throw new Error(`found ${n.length} methods with the same name ${n.map((t=>t.getSignature())).join(",")}`);if(0===n.length)throw new Error(`found 0 methods with the name ${e}`);return n[0]}class Bl{constructor(t){if("string"!=typeof t.name||!Array.isArray(t.methods)||t.networks&&"object"!=typeof t.networks)throw new Error("Invalid ABIContract parameters");this.name=t.name,this.description=t.desc,this.networks=t.networks?{...t.networks}:{},this.methods=t.methods.map((t=>new Tl(t))),this.events=t.events}toJSON(){return{name:this.name,desc:this.description,networks:this.networks,methods:this.methods.map((t=>t.toJSON())),events:this.events}}getMethodByName(t){return Ll(this.methods,t)}}class Fl{constructor(t){if("string"!=typeof t.name||!Array.isArray(t.methods))throw new Error("Invalid ABIInterface parameters");this.name=t.name,this.description=t.desc,this.methods=t.methods.map((t=>new Tl(t)))}toJSON(){return{name:this.name,desc:this.description,methods:this.methods.map((t=>t.toJSON()))}}getMethodByName(t){return Ll(this.methods,t)}}const Rl=new Uint8Array([21,31,124,117]);var Nl;function Vl(t,e,n){if(null!=n&&t===n)return 0;const i=null==n?0:1;for(let n=0;n<e.length;n++)if(t===e[n])return n+i;return e.push(t),e.length-1+i}!function(t){t[t.BUILDING=0]="BUILDING",t[t.BUILT=1]="BUILT",t[t.SIGNED=2]="SIGNED",t[t.SUBMITTED=3]="SUBMITTED",t[t.COMMITTED=4]="COMMITTED"}(Nl||(Nl={}));class zl{constructor(){this.status=Nl.BUILDING,this.transactions=[],this.methodCalls=new Map,this.signedTxns=[],this.txIDs=[]}getStatus(){return this.status}count(){return this.transactions.length}clone(){const t=new zl;return t.transactions=this.transactions.map((({txn:t,signer:e})=>{const n=t.toEncodingData();return n.delete("grp"),{txn:je.fromEncodingData(n),signer:e}})),t.methodCalls=new Map(this.methodCalls),t}addTransaction(t){if(this.status!==Nl.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length===zl.MAX_GROUP_SIZE)throw new Error(`Adding an additional transaction exceeds the maximum atomic group size of ${zl.MAX_GROUP_SIZE}`);if(t.txn.group&&t.txn.group.some((t=>0!==t)))throw new Error("Cannot add a transaction with nonzero group ID");this.transactions.push(t)}addMethodCall({appID:t,method:e,methodArgs:n,sender:i,suggestedParams:r,onComplete:a,approvalProgram:o,clearProgram:s,numGlobalInts:l,numGlobalByteSlices:c,numLocalInts:h,numLocalByteSlices:d,extraPages:u,appAccounts:p,appForeignApps:m,appForeignAssets:g,boxes:f,note:y,lease:v,rekeyTo:w,signer:x}){if(this.status!==Nl.BUILDING)throw new Error("Cannot add transactions when composer status is not BUILDING");if(this.transactions.length+e.txnCount()>zl.MAX_GROUP_SIZE)throw new Error(`Adding additional transactions exceeds the maximum atomic group size of ${zl.MAX_GROUP_SIZE}`);if(BigInt(t)===BigInt(0)){if(null==o||null==s||null==l||null==c||null==h||null==d)throw new Error("One of the following required parameters for application creation is missing: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices")}else if(a===Jt.UpdateApplicationOC){if(null==o||null==s)throw new Error("One of the following required parameters for OnApplicationComplete.UpdateApplicationOC is missing: approvalProgram, clearProgram");if(null!=l||null!=c||null!=h||null!=d||null!=u)throw new Error("One of the following application creation parameters were set on a non-creation call: numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages")}else if(null!=o||null!=s||null!=l||null!=c||null!=h||null!=d||null!=u)throw new Error("One of the following application creation parameters were set on a non-creation call: approvalProgram, clearProgram, numGlobalInts, numGlobalByteSlices, numLocalInts, numLocalByteSlices, extraPages");if(null==n&&(n=[]),n.length!==e.args.length)throw new Error(`Incorrect number of method arguments. Expected ${e.args.length}, got ${n.length}`);let S=[],A=[];const C=[],k=[],I=[],E=new Map,_=f||[];for(let t=0;t<n.length;t++){let i=e.args[t].type;const r=n[t];if(Ml(i)){if(!sl(r)||!Dl(i,r.txn))throw new Error(`Expected ${i} TransactionWithSigner for argument at index ${t}`);if(r.txn.group&&r.txn.group.some((t=>0!==t)))throw new Error("Cannot add a transaction with nonzero group ID");C.push(r)}else{if(sl(r))throw new Error(`Expected non-transaction value for argument at index ${t}`);if(Pl(i)&&(E.set(k.length,S.length),k.push(i),I.push(r),i=new fl(8)),"string"==typeof i)throw new Error(`Unknown ABI type: ${i}`);S.push(i),A.push(r)}}const M=[],D=null==p?[]:p.map((t=>t.toString())),P=null==m?[]:m.map(b),T=null==g?[]:g.map(b);for(let e=0;e<k.length;e++){const n=k[e],r=I[e];let a=0;switch(n){case _l.account:{const t=new vl;a=Vl(t.decode(t.encode(r)),D,i.toString());break}case _l.application:{const e=new fl(64),n=e.decode(e.encode(r));if(n>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for application value, got ${n}`);a=Vl(n,P,b(t));break}case _l.asset:{const t=new fl(64),e=t.decode(t.encode(r));if(e>Number.MAX_SAFE_INTEGER)throw new Error(`Expected safe integer for asset value, got ${e}`);a=Vl(e,T);break}default:throw new Error(`Unknown reference type: ${n}`)}M.push(a)}for(let t=0;t<M.length;t++)A[E.get(t)]=M[t];if(S.length>15){const t=S.slice(14),e=A.slice(14);S=S.slice(0,14),A=A.slice(0,14),S.push(new Cl(t)),A.push(e)}const L=[e.getSelector()];for(let t=0;t<S.length;t++)L.push(S[t].encode(A[t]));const B={txn:Ks({sender:i,appIndex:t,appArgs:L,accounts:D,foreignApps:P,foreignAssets:T,boxes:_,onComplete:null==a?Jt.NoOpOC:a,approvalProgram:o,clearProgram:s,numGlobalInts:l,numGlobalByteSlices:c,numLocalInts:h,numLocalByteSlices:d,extraPages:u,lease:v,note:y,rekeyTo:w,suggestedParams:r}),signer:x};this.transactions.push(...C,B),this.methodCalls.set(this.transactions.length-1,e)}buildGroup(){if(this.status===Nl.BUILDING){if(0===this.transactions.length)throw new Error("Cannot build a group with 0 transactions");this.transactions.length>1&&ds(this.transactions.map((t=>t.txn))),this.status=Nl.BUILT}return this.transactions}async gatherSignatures(){if(this.status>=Nl.SIGNED)return this.signedTxns;const t=this.buildGroup(),e=t.map((t=>t.txn)),n=new Map;for(let e=0;e<t.length;e++){const{signer:i}=t[e];n.has(i)||n.set(i,[]),n.get(i).push(e)}const i=Array.from(n),r=await Promise.all(i.map((([t,n])=>t(e,n)))),a=t.map((()=>null));for(let t=0;t<i.length;t++){const e=i[t][1],n=r[t];for(let t=0;t<e.length;t++)a[e[t]]=n[t]}if(!a.every((t=>null!=t)))throw new Error(`Missing signatures. Got ${a}`);const o=a.map(((t,e)=>{try{return Qt(t,xn).txn.txID()}catch(t){throw new Error(`Cannot decode signed transaction at index ${e}. ${t}`)}}));return this.signedTxns=a,this.txIDs=o,this.status=Nl.SIGNED,a}async submit(t){if(this.status>Nl.SUBMITTED)throw new Error("Transaction group cannot be resubmitted");const e=await this.gatherSignatures();return await t.sendRawTransaction(e).do(),this.status=Nl.SUBMITTED,this.txIDs}async simulate(t,e){if(this.status>Nl.SUBMITTED)throw new Error("Simulated Transaction group has already been submitted to the network");const n=(await this.gatherSignatures()).map((t=>Qt(t,xn))),i=null==e?new ar({txnGroups:[]}):e;i.txnGroups=[new or({txns:n})];const r=await t.simulateTransactions(i).do(),a=[];for(const[t,e]of this.methodCalls){const n=this.txIDs[t],i=r.txnGroups[0].txnResults[t].txnResult,o={txID:n,rawReturnValue:new Uint8Array,method:e};a.push(zl.parseMethodResponse(e,o,i))}return{methodResults:a,simulateResponse:r}}async execute(t,e){if(this.status===Nl.COMMITTED)throw new Error("Transaction group has already been executed successfully");const n=await this.submit(t);this.status=Nl.SUBMITTED;const i=this.transactions.findIndex(((t,e)=>this.methodCalls.has(e))),r=-1===i?0:i,a=await jo(t,n[r],e);this.status=Nl.COMMITTED;const o=a.confirmedRound,s=[];for(const[e,r]of this.methodCalls){const o=n[e];let l={txID:o,rawReturnValue:new Uint8Array,method:r};try{const n=e===i?a:await t.pendingTransactionInformation(o).do();l=zl.parseMethodResponse(r,l,n)}catch(t){l.decodeError=t}s.push(l)}return{confirmedRound:o,txIDs:n,methodResults:s}}static parseMethodResponse(t,e,n){const i=e;try{if(i.txInfo=n,"void"!==t.returns.type){const r=n.logs||[];if(0===r.length)throw new Error(`App call transaction did not log a return value ${p(n)}`);const a=r[r.length-1];if(a.byteLength<4||!m(a.slice(0,4),Rl))throw new Error(`App call transaction did not log a ABI return value ${p(n)}`);i.rawReturnValue=new Uint8Array(a.slice(4)),i.returnValue=t.returns.type.decode(e.rawReturnValue)}}catch(t){i.decodeError=t}return i}}zl.MAX_GROUP_SIZE=16;const Gl=Uint8Array.from([77,88]),Wl="The transaction sender address and multisig preimage do not match.";function Ol(t,e){return{txID:t.txID(),blob:t.signTxn(e)}}function Zl(t,e){return k(g(Gl,t),e)}function Yl(t,e,n){return E(g(Gl,t),e,("string"==typeof n?Y.fromString(n):n).publicKey)}const Hl=new Error(Wl),jl=new Error(q),Xl=a},4143:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(1601),r=n.n(i),a=n(6314),o=n.n(a)()(r());o.push([t.id,'/* ==========================================\n SDK-SPECIFIC STYLES (ALGOMINTX)\n ========================================== */\n\n/* Outer panel: tabs + forms — hidden until wallet connects */\n#algox-mintx-content {\n padding: 0;\n gap: 0;\n display: none;\n flex-direction: column;\n overflow-y: auto;\n flex-grow: 1;\n}\n\n#algox-mintx-nft-form,\n#algox-mintx-ft-content {\n display: flex;\n padding: 15px;\n flex-direction: column;\n gap: 10px;\n overflow-y: auto;\n flex-grow: 1;\n border-bottom: 1px solid #ddd;\n}\n\n.dark-theme #algox-mintx-nft-form,\n.dark-theme #algox-mintx-ft-content {\n border-bottom-color: #333;\n}\n\n#algox-mintx-nft-form input[type="text"],\n#algox-mintx-nft-form textarea,\n#algox-mintx-nft-form input[type="file"],\n#algox-mintx-ft-content input[type="text"],\n#algox-mintx-ft-content input[type="number"],\n#algox-mintx-ft-content textarea,\n#algox-mintx-ft-content input[type="file"] {\n padding: 8px;\n font-size: 1rem;\n color: #111827;\n background-color: white;\n border: 1px solid #ddd;\n border-radius: 4px;\n transition: border-color 0.3s ease;\n}\n\n.dark-theme #algox-mintx-nft-form input[type="text"],\n.dark-theme #algox-mintx-nft-form textarea,\n.dark-theme #algox-mintx-nft-form input[type="file"],\n.dark-theme #algox-mintx-ft-content input[type="text"],\n.dark-theme #algox-mintx-ft-content input[type="number"],\n.dark-theme #algox-mintx-ft-content textarea,\n.dark-theme #algox-mintx-ft-content input[type="file"] {\n color: #f9fafb;\n background-color: #2d2d2d;\n border-color: #444;\n}\n\n#algox-mintx-nft-form input[type="text"]:focus,\n#algox-mintx-nft-form textarea:focus,\n#algox-mintx-ft-content input[type="text"]:focus,\n#algox-mintx-ft-content input[type="number"]:focus,\n#algox-mintx-ft-content textarea:focus {\n outline: none;\n border-color: #3498db;\n}\n\n#algox-mintx-nft-form input[type="text"].error,\n#algox-mintx-nft-form textarea.error,\n#algox-mintx-ft-content input[type="text"].error,\n#algox-mintx-ft-content input[type="number"].error,\n#algox-mintx-ft-content textarea.error {\n border-color: #ff4444;\n}\n\n#algox-mintx-nft-form textarea,\n#algox-mintx-ft-content textarea {\n resize: vertical;\n min-height: 10vh;\n}\n\n#algox-mintx-ft-content .algox-mintx-ft-file-label {\n font-size: 0.8rem;\n color: #6b7280;\n margin-bottom: -4px;\n}\n\n.dark-theme #algox-mintx-ft-content .algox-mintx-ft-file-label {\n color: #9ca3af;\n}\n\n#algox-mintx-nft-form button,\n#algox-mintx-ft-content button {\n padding: 10px;\n font-size: 1rem;\n cursor: pointer;\n background-color: #f8f9fa;\n border: 1px solid #ddd;\n border-radius: 4px;\n color: #111827;\n}\n\n.dark-theme #algox-mintx-nft-form button,\n.dark-theme #algox-mintx-ft-content button {\n background-color: #2d2d2d;\n border-color: #444;\n color: #f9fafb;\n}\n\n#algox-mintx-nft-form button:disabled,\n#algox-mintx-ft-content button:disabled {\n cursor: not-allowed;\n opacity: 0.7;\n}\n\n#algox-mintx-nft-form button:disabled:hover,\n#algox-mintx-ft-content button:disabled:hover {\n transform: none;\n box-shadow: none;\n}\n\n#algox-mintx-reset-btn,\n#algox-mintx-ft-reset-btn {\n display: none;\n}\n\n#algox-mintx-messages,\n#algox-mintx-ft-messages {\n margin-top: 10px;\n font-size: 0.85rem;\n color: #111827;\n word-break: break-word;\n user-select: text;\n cursor: pointer;\n display: none;\n padding: 8px;\n background-color: #f8f9fa;\n border-radius: 4px;\n border: 1px solid #ddd;\n}\n\n#algox-mintx-messages:not(:empty),\n#algox-mintx-ft-messages:not(:empty) {\n display: block;\n}\n\n.dark-theme #algox-mintx-messages,\n.dark-theme #algox-mintx-ft-messages {\n color: #f9fafb;\n background-color: #2d2d2d;\n border-color: #444;\n}\n\n#algox-nft-tab,\n#algox-ft-tab {\n gap: 0;\n}\n',""]);const s=o},4256:(t,e,n)=>{"use strict";n.d(e,{P:()=>dt,a:()=>Rt,b:()=>Tt,c:()=>Pt,d:()=>Bt,e:()=>Ft,f:()=>mt,g:()=>ht,h:()=>ut,i:()=>Lt,j:()=>pt,k:()=>Gt,l:()=>vt,r:()=>wt});var i=n(1704),r=n(3899),a=n(6880),o="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},s=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,h=!1;function d(){h=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)s[e]=t[e],l[t.charCodeAt(e)]=e;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63}function u(t,e,n){for(var i,r,a=[],o=e;o<n;o+=3)i=(t[o]<<16)+(t[o+1]<<8)+t[o+2],a.push(s[(r=i)>>18&63]+s[r>>12&63]+s[r>>6&63]+s[63&r]);return a.join("")}function p(t){var e;h||d();for(var n=t.length,i=n%3,r="",a=[],o=16383,l=0,c=n-i;l<c;l+=o)a.push(u(t,l,l+o>c?c:l+o));return 1===i?(e=t[n-1],r+=s[e>>2],r+=s[e<<4&63],r+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],r+=s[e>>10],r+=s[e>>4&63],r+=s[e<<2&63],r+="="),a.push(r),a.join("")}function m(t,e,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,c=l>>1,h=-7,d=n?r-1:0,u=n?-1:1,p=t[e+d];for(d+=u,a=p&(1<<-h)-1,p>>=-h,h+=s;h>0;a=256*a+t[e+d],d+=u,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=i;h>0;o=256*o+t[e+d],d+=u,h-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,i),a-=c}return(p?-1:1)*o*Math.pow(2,a-i)}function g(t,e,n,i,r,a){var o,s,l,c=8*a-r-1,h=(1<<c)-1,d=h>>1,u=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=i?0:a-1,m=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+d>=1?u/l:u*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=h?(s=0,o=h):o+d>=1?(s=(e*l-1)*Math.pow(2,r),o+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;t[n+p]=255&s,p+=m,s/=256,r-=8);for(o=o<<r|s,c+=r;c>0;t[n+p]=255&o,p+=m,o/=256,c-=8);t[n+p-m]|=128*g}var f={}.toString,y=Array.isArray||function(t){return"[object Array]"==f.call(t)};function v(){return b.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(t,e){if(v()<e)throw new RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=b.prototype:(null===t&&(t=new b(e)),t.length=e),t}function b(t,e,n){if(!(b.TYPED_ARRAY_SUPPORT||this instanceof b))return new b(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return A(this,t)}return x(this,t,e,n)}function x(t,e,n,i){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,i){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return e=void 0===n&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,n):new Uint8Array(e,n,i),b.TYPED_ARRAY_SUPPORT?(t=e).__proto__=b.prototype:t=C(t,e),t}(t,e,n,i):"string"==typeof e?function(t,e,n){if("string"==typeof n&&""!==n||(n="utf8"),!b.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|E(e,n),r=(t=w(t,i)).write(e,n);return r!==i&&(t=t.slice(0,r)),t}(t,e,n):function(t,e){if(I(e)){var n=0|k(e.length);return 0===(t=w(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?w(t,0):C(t,e);if("Buffer"===e.type&&y(e.data))return C(t,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function S(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function A(t,e){if(S(e),t=w(t,e<0?0:0|k(e)),!b.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function C(t,e){var n=e.length<0?0:0|k(e.length);t=w(t,n);for(var i=0;i<n;i+=1)t[i]=255&e[i];return t}function k(t){if(t>=v())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v().toString(16)+" bytes");return 0|t}function I(t){return!(null==t||!t._isBuffer)}function E(t,e){if(I(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return tt(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return et(t).length;default:if(i)return tt(t).length;e=(""+e).toLowerCase(),i=!0}}function _(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Z(this,e,n);case"utf8":case"utf-8":return z(this,e,n);case"ascii":return W(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return V(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function M(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function D(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=b.from(e,i)),I(e))return 0===e.length?-1:P(t,e,n,i,r);if("number"==typeof e)return e&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):P(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function P(t,e,n,i,r){var a,o=1,s=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var h=-1;for(a=n;a<s;a++)if(c(t,a)===c(e,-1===h?0:a-h)){if(-1===h&&(h=a),a-h+1===l)return h*o}else-1!==h&&(a-=a-h),h=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var d=!0,u=0;u<l;u++)if(c(t,a+u)!==c(e,u)){d=!1;break}if(d)return a}return-1}function T(t,e,n,i){n=Number(n)||0;var r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o<i;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[n+o]=s}return o}function L(t,e,n,i){return nt(tt(e,t.length-n),t,n,i)}function B(t,e,n,i){return nt(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function F(t,e,n,i){return B(t,e,n,i)}function R(t,e,n,i){return nt(et(e),t,n,i)}function N(t,e,n,i){return nt(function(t,e){for(var n,i,r,a=[],o=0;o<t.length&&!((e-=2)<0);++o)i=(n=t.charCodeAt(o))>>8,r=n%256,a.push(r),a.push(i);return a}(e,t.length-n),t,n,i)}function V(t,e,n){return 0===e&&n===t.length?p(t):p(t.slice(e,n))}function z(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r<n;){var a,o,s,l,c=t[r],h=null,d=c>239?4:c>223?3:c>191?2:1;if(r+d<=n)switch(d){case 1:c<128&&(h=c);break;case 2:128==(192&(a=t[r+1]))&&(l=(31&c)<<6|63&a)>127&&(h=l);break;case 3:a=t[r+1],o=t[r+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(h=l);break;case 4:a=t[r+1],o=t[r+2],s=t[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(h=l)}null===h?(h=65533,d=1):h>65535&&(h-=65536,i.push(h>>>10&1023|55296),h=56320|1023&h),i.push(h),r+=d}return function(t){var e=t.length;if(e<=G)return String.fromCharCode.apply(String,t);for(var n="",i=0;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=G));return n}(i)}b.TYPED_ARRAY_SUPPORT=void 0===o.TYPED_ARRAY_SUPPORT||o.TYPED_ARRAY_SUPPORT,v(),b.poolSize=8192,b._augment=function(t){return t.__proto__=b.prototype,t},b.from=function(t,e,n){return x(null,t,e,n)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array),b.alloc=function(t,e,n){return function(t,e,n,i){return S(e),e<=0?w(t,e):void 0!==n?"string"==typeof i?w(t,e).fill(n,i):w(t,e).fill(n):w(t,e)}(null,t,e,n)},b.allocUnsafe=function(t){return A(null,t)},b.allocUnsafeSlow=function(t){return A(null,t)},b.isBuffer=function(t){return null!=t&&(!!t._isBuffer||it(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&it(t.slice(0,0))}(t))},b.compare=function(t,e){if(!I(t)||!I(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,r=0,a=Math.min(n,i);r<a;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0},b.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},b.concat=function(t,e){if(!y(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return b.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=b.allocUnsafe(e),r=0;for(n=0;n<t.length;++n){var a=t[n];if(!I(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,r),r+=a.length}return i},b.byteLength=E,b.prototype._isBuffer=!0,b.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)M(this,e,e+1);return this},b.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)M(this,e,e+3),M(this,e+1,e+2);return this},b.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)M(this,e,e+7),M(this,e+1,e+6),M(this,e+2,e+5),M(this,e+3,e+4);return this},b.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?z(this,0,t):_.apply(this,arguments)},b.prototype.equals=function(t){if(!I(t))throw new TypeError("Argument must be a Buffer");return this===t||0===b.compare(this,t)},b.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},b.prototype.compare=function(t,e,n,i,r){if(!I(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),s=Math.min(a,o),l=this.slice(i,r),c=t.slice(e,n),h=0;h<s;++h)if(l[h]!==c[h]){a=l[h],o=c[h];break}return a<o?-1:o<a?1:0},b.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},b.prototype.indexOf=function(t,e,n){return D(this,t,e,n,!0)},b.prototype.lastIndexOf=function(t,e,n){return D(this,t,e,n,!1)},b.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return L(this,t,e,n);case"ascii":return B(this,t,e,n);case"latin1":case"binary":return F(this,t,e,n);case"base64":return R(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var G=4096;function W(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(127&t[r]);return i}function O(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;r<n;++r)i+=String.fromCharCode(t[r]);return i}function Z(t,e,n){var i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);for(var r="",a=e;a<n;++a)r+=Q(t[a]);return r}function Y(t,e,n){for(var i=t.slice(e,n),r="",a=0;a<i.length;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function H(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,n,i,r,a){if(!I(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<a)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function X(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,a=Math.min(t.length-n,2);r<a;++r)t[n+r]=(e&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function U(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,a=Math.min(t.length-n,4);r<a;++r)t[n+r]=e>>>8*(i?r:3-r)&255}function K(t,e,n,i,r,a){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function J(t,e,n,i,r){return r||K(t,0,n,4),g(t,e,n,i,23,4),n+4}function q(t,e,n,i,r){return r||K(t,0,n,8),g(t,e,n,i,52,8),n+8}b.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<t&&(e=t),b.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=b.prototype;else{var r=e-t;n=new b(r,void 0);for(var a=0;a<r;++a)n[a]=this[a+t]}return n},b.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||H(t,e,this.length);for(var i=this[t],r=1,a=0;++a<e&&(r*=256);)i+=this[t+a]*r;return i},b.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||H(t,e,this.length);for(var i=this[t+--e],r=1;e>0&&(r*=256);)i+=this[t+--e]*r;return i},b.prototype.readUInt8=function(t,e){return e||H(t,1,this.length),this[t]},b.prototype.readUInt16LE=function(t,e){return e||H(t,2,this.length),this[t]|this[t+1]<<8},b.prototype.readUInt16BE=function(t,e){return e||H(t,2,this.length),this[t]<<8|this[t+1]},b.prototype.readUInt32LE=function(t,e){return e||H(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},b.prototype.readUInt32BE=function(t,e){return e||H(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},b.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||H(t,e,this.length);for(var i=this[t],r=1,a=0;++a<e&&(r*=256);)i+=this[t+a]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*e)),i},b.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||H(t,e,this.length);for(var i=e,r=1,a=this[t+--i];i>0&&(r*=256);)a+=this[t+--i]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*e)),a},b.prototype.readInt8=function(t,e){return e||H(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},b.prototype.readInt16LE=function(t,e){e||H(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt16BE=function(t,e){e||H(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},b.prototype.readInt32LE=function(t,e){return e||H(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},b.prototype.readInt32BE=function(t,e){return e||H(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},b.prototype.readFloatLE=function(t,e){return e||H(t,4,this.length),m(this,t,!0,23,4)},b.prototype.readFloatBE=function(t,e){return e||H(t,4,this.length),m(this,t,!1,23,4)},b.prototype.readDoubleLE=function(t,e){return e||H(t,8,this.length),m(this,t,!0,52,8)},b.prototype.readDoubleBE=function(t,e){return e||H(t,8,this.length),m(this,t,!1,52,8)},b.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,a=0;for(this[e]=255&t;++a<n&&(r*=256);)this[e+a]=t/r&255;return e+n},b.prototype.writeUIntBE=function(t,e,n,i){t=+t,e|=0,n|=0,i||j(this,t,e,n,Math.pow(2,8*n)-1,0);var r=n-1,a=1;for(this[e+r]=255&t;--r>=0&&(a*=256);)this[e+r]=t/a&255;return e+n},b.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,255,0),b.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},b.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):X(this,t,e,!0),e+2},b.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):X(this,t,e,!1),e+2},b.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):U(this,t,e,!0),e+4},b.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,4294967295,0),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},b.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var a=0,o=1,s=0;for(this[e]=255&t;++a<n&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o|0)-s&255;return e+n},b.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);j(this,t,e,n,r-1,-r)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o|0)-s&255;return e+n},b.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,1,127,-128),b.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},b.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):X(this,t,e,!0),e+2},b.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):X(this,t,e,!1),e+2},b.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):U(this,t,e,!0),e+4},b.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):U(this,t,e,!1),e+4},b.prototype.writeFloatLE=function(t,e,n){return J(this,t,e,!0,n)},b.prototype.writeFloatBE=function(t,e,n){return J(this,t,e,!1,n)},b.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},b.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},b.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var r,a=i-n;if(this===t&&n<e&&e<i)for(r=a-1;r>=0;--r)t[r+e]=this[r+n];else if(a<1e3||!b.TYPED_ARRAY_SUPPORT)for(r=0;r<a;++r)t[r+e]=this[r+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},b.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===t.length){var r=t.charCodeAt(0);r<256&&(t=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!b.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var o=I(t)?t:tt(new b(t,i).toString()),s=o.length;for(a=0;a<n-e;++a)this[a+e]=o[a%s]}return this};var $=/[^+\/0-9A-Za-z-_]/g;function Q(t){return t<16?"0"+t.toString(16):t.toString(16)}function tt(t,e){var n;e=e||1/0;for(var i=t.length,r=null,a=[],o=0;o<i;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function et(t){return function(t){var e,n,i,r,a,o;h||d();var s=t.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===t[s-2]?2:"="===t[s-1]?1:0,o=new c(3*s/4-a),i=a>0?s-4:s;var u=0;for(e=0,n=0;e<i;e+=4,n+=3)r=l[t.charCodeAt(e)]<<18|l[t.charCodeAt(e+1)]<<12|l[t.charCodeAt(e+2)]<<6|l[t.charCodeAt(e+3)],o[u++]=r>>16&255,o[u++]=r>>8&255,o[u++]=255&r;return 2===a?(r=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,o[u++]=255&r):1===a&&(r=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,o[u++]=r>>8&255,o[u++]=255&r),o}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function nt(t,e,n,i){for(var r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}function it(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function rt(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class at extends Error{constructor(t,e,...n){super(...n),Error.captureStackTrace&&Error.captureStackTrace(this,at),this.name="PeraWalletConnectError",this.data=t,this.message=e}}const ot=new class{constructor(t){this.listener=void 0,this.channel=t.channel}setupListener({onReceiveMessage:t}){this.close(),this.listener=e=>{if("object"==typeof e.data)try{e.data.channel===this.channel&&t(e)}catch(t){console.error(t)}},window.addEventListener("message",this.listener)}sendMessage({message:t,targetWindow:e,origin:n,timeout:i=1e3}){setTimeout((()=>{const i={channel:this.channel,message:t};e.postMessage(i,{targetOrigin:n||"*"})}),i)}close(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}}({channel:"pera-web-wallet"});function st(){const t=document.querySelector('meta[name="name"]'),e=document.querySelector('meta[name="description"]');let{title:n}=document,i="";return t instanceof HTMLMetaElement&&(n=t.content),e instanceof HTMLMetaElement&&(i=e.content),{title:n,description:i,url:window.location.origin,favicon:lt()[0]}}function lt(){const t=document.getElementsByTagName("link"),e=[];for(let n=0;n<t.length;n++){const i=t[n],r=i.getAttribute("rel");if(r&&r.toLowerCase().indexOf("icon")>-1){const t=i.getAttribute("href");if(t&&-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let n=`${window.location.protocol}//${window.location.host}`;if(0===t.indexOf("/"))n+=t;else{const e=window.location.pathname.split("/");e.pop(),n+=`${e.join("/")}/${t}`}e.push(n)}else if(0===(null==t?void 0:t.indexOf("//"))){const n=window.location.protocol+t;e.push(n)}else t&&e.push(t)}}return e}function ct(t){return new Promise(((e,n)=>{try{const i=window.open(t,"_blank");let r=0;const a=setInterval((()=>{if(r+=1,50===r)return clearInterval(a),void n(new at({type:"MESSAGE_NOT_RECEIVED"},"Couldn't open Pera Wallet, please try again."));i&&(!0===i.closed&&(clearInterval(a),n(new at({type:"OPERATION_CANCELLED"},"Operation cancelled by user"))),ot.sendMessage({message:{type:"TAB_OPEN"},origin:t,targetWindow:i}))}),700);ot.setupListener({onReceiveMessage:t=>{"TAB_OPEN_RECEIVED"===t.data.message.type&&(clearInterval(a),e(i))}})}catch(t){n(t)}}))}const ht="pera-wallet-connect-modal-wrapper",dt="pera-wallet-redirect-modal-wrapper",ut="pera-wallet-sign-txn-toast-wrapper",pt="pera-wallet-sign-txn-modal-wrapper",mt="pera-wallet-modal";function gt(t){const e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e}function ft(){gt(dt).innerHTML="<pera-wallet-redirect-modal></pera-wallet-redirect-modal>"}function yt(){gt(ut).innerHTML="<pera-wallet-sign-txn-toast></pera-wallet-sign-txn-toast>"}function vt(){wt(ut)}function wt(t){const e=document.getElementById(t);e&&e.remove()}const bt="PeraWallet.Wallet",xt="walletconnect";function St(){return"undefined"==typeof localStorage?void 0:localStorage}function At(t,e){var n;null===(n=St())||void 0===n||n.setItem(bt,JSON.stringify({type:e||"pera-wallet",accounts:t,selectedAccount:t[0]}))}function Ct(){var t;const e=null===(t=St())||void 0===t?void 0:t.getItem(bt);return e?JSON.parse(e):null}function kt(){return new Promise(((t,e)=>{var n,i;try{null===(n=St())||void 0===n||n.removeItem(xt),null===(i=St())||void 0===i||i.removeItem(bt),t(void 0)}catch(t){e(t)}}))}function It(t){const e=t.slice();for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function Et(){return rt(this,void 0,void 0,(function*(){let t={bridgeURL:"",webWalletURL:"",isWebWalletAvailable:!1,shouldDisplayNewBadge:!1,shouldUseSound:!0,silent:!1,promoteMobile:!1};try{const e=yield function(t,e={}){return fetch("https://wc.perawallet.app/config.json",e).then((t=>t.json())).then((t=>t))}(0,{cache:"no-store"});void 0!==e.web_wallet&&e.web_wallet_url&&(t.isWebWalletAvailable=e.web_wallet),void 0!==e.display_new_badge&&(t.shouldDisplayNewBadge=e.display_new_badge),void 0!==e.use_sound&&(t.shouldUseSound=e.use_sound),void 0!==e.silent&&(t.silent=e.silent),void 0!==e.promote_mobile&&(t.promoteMobile=e.promote_mobile),t=Object.assign(Object.assign({},t),{bridgeURL:It(e.servers||[])[0]||"",webWalletURL:e.web_wallet_url||""})}catch(t){console.log(t)}return t}))}function _t(t){return Uint8Array.from(window.atob(t),(t=>t.charCodeAt(0)))}function Mt(t,e){return{id:Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3)),jsonrpc:"2.0",method:t,params:e}}function Dt(){return"undefined"!=typeof navigator}function Pt(){return Dt()&&/Android/i.test(navigator.userAgent)}function Tt(){return Dt()&&/iPhone|iPad|iPod/i.test(navigator.userAgent)}function Lt(){return Dt()&&/iPhone|iPod|Android/i.test(navigator.userAgent)}function Bt(){if(!Dt())return null;const{userAgent:t}=navigator;let e;return e=t.match(/DuckDuckGo/i)?"DuckDuckGo":t.match(/OPX/i)?"Opera GX":navigator.brave?"Brave":a.getParser(navigator.userAgent).getBrowserName(),e}const Ft="perawallet-wc://",Rt="https://perawallet.app/download/";function Nt(t){return{ROOT:`https://${t}`,CONNECT:`https://${t}/connect`,TRANSACTION_SIGN:`https://${t}/transaction/sign`}}function Vt({method:t,signTxnRequestParams:e,signer:n,chainId:i,webWalletURL:r,resolve:a,reject:o}){const s=Nt(r);!function(){rt(this,void 0,void 0,(function*(){try{const r=yield ct(s.TRANSACTION_SIGN);if(r){let a;"SIGN_TXN"===t?a={type:"SIGN_TXN",txn:e}:"SIGN_DATA"===t&&n&&i&&(a={type:"SIGN_DATA",data:e,signer:n,chainId:i}),a&&ot.sendMessage({message:a,origin:s.TRANSACTION_SIGN,targetWindow:r})}const l=setInterval((()=>{!0===(null==r?void 0:r.closed)&&(o(new at({type:`${t}_CANCELLED`},"Transaction signing is cancelled by user.")),clearInterval(l))}),2e3);ot.setupListener({onReceiveMessage:e=>function({event:t,newPeraWalletTab:e,method:n,resolve:i,reject:r}){switch(t.data.message.type){case"SIGN_TXN_CALLBACK":null==e||e.close(),i(t.data.message.signedTxns.map((t=>_t(t.signedTxn))));break;case"SIGN_DATA_CALLBACK":null==e||e.close(),i(t.data.message.signedData.map((t=>_t(t.signedData))));break;case"SIGN_TXN_NETWORK_MISMATCH":r(new at({type:`${n}_NETWORK_MISMATCH`,detail:t.data.message.error},t.data.message.error||"Network mismatch"));break;case"SIGN_TXN_CALLBACK_ERROR":null==e||e.close(),r(new at({type:`${n}_CANCELLED`},t.data.message.error));break;case"SESSION_DISCONNECTED":null==e||e.close(),kt(),r(new at({type:"SESSION_DISCONNECTED",detail:t.data.message.error},t.data.message.error))}}({event:e,newPeraWalletTab:r,method:t,resolve:a,reject:o})})}catch(t){o(t)}}))}()}function zt({isWebWalletAvailable:t,shouldDisplayNewBadge:e,shouldUseSound:n,compactMode:i,promoteMobile:r,singleAccount:a,selectedAccount:o}){return{open:(s={isWebWalletAvailable:t,shouldDisplayNewBadge:e,shouldUseSound:n,compactMode:i,promoteMobile:r,singleAccount:a,selectedAccount:o},t=>{if(!document.getElementById(ht)){const e=gt(ht),n=`${t}&algorand=true`,{isWebWalletAvailable:i,shouldDisplayNewBadge:r,shouldUseSound:a,compactMode:o,promoteMobile:l,singleAccount:c,selectedAccount:h}=s;e.innerHTML=`<pera-wallet-connect-modal uri="${n}" is-web-wallet-avaliable="${i}" should-display-new-badge="${r}" should-use-sound="${a}" compact-mode="${o}" promote-mobile="${l}" single-account="${c}" selected-account="${h||""}"></pera-wallet-connect-modal>`}}),close:()=>wt(ht)};var s}class Gt{constructor(t){this.bridge=(null==t?void 0:t.bridge)||"",this.connector=null,this.shouldShowSignTxnToast=void 0===(null==t?void 0:t.shouldShowSignTxnToast)||t.shouldShowSignTxnToast,this.chainId=null==t?void 0:t.chainId,this.compactMode=(null==t?void 0:t.compactMode)||!1,this.singleAccount=(null==t?void 0:t.singleAccount)||!1}get platform(){return function(){const t=Ct();let e=null;return"pera-wallet"===(null==t?void 0:t.type)?e="mobile":"pera-wallet-web"===(null==t?void 0:t.type)&&(e="web"),e}()}get isConnected(){var t;return"mobile"===this.platform?!!this.connector:"web"===this.platform&&!!(null===(t=Ct())||void 0===t?void 0:t.accounts.length)}get isPeraDiscoverBrowser(){return this.checkIsPeraDiscoverBrowser()}connect(t){return new Promise(((e,n)=>rt(this,void 0,void 0,(function*(){var r;try{if(null===(r=this.connector)||void 0===r?void 0:r.connected)try{yield this.connector.killSession()}catch(t){}const{isWebWalletAvailable:a,bridgeURL:o,webWalletURL:s,shouldDisplayNewBadge:l,shouldUseSound:c,promoteMobile:h}=yield Et(),d=function({webWalletURL:t,chainId:e,resolve:n,reject:i}){const r=Nt(t);return function(){return rt(this,void 0,void 0,(function*(){try{const t=yield ct(r.CONNECT);t&&ot.sendMessage({message:{type:"CONNECT",data:Object.assign(Object.assign({},st()),{chainId:e})},origin:r.CONNECT,targetWindow:t});const o=setInterval((()=>{!0===(null==t?void 0:t.closed)&&(i(new at({type:"CONNECT_CANCELLED"},"Connect is cancelled by user")),clearInterval(o),a())}),2e3);ot.setupListener({onReceiveMessage:e=>function({event:t,newPeraWalletTab:e,resolve:n,reject:i}){if(n&&"CONNECT_CALLBACK"===t.data.message.type){const i=t.data.message.data.addresses;At(i,"pera-wallet-web"),n(i),wt(ht),null==e||e.close()}else"CONNECT_NETWORK_MISMATCH"===t.data.message.type&&(i(new at({type:"CONNECT_NETWORK_MISMATCH",detail:t.data.message.error},t.data.message.error||"Your wallet is connected to a different network to this dApp. Update your wallet to the correct network (MainNet or TestNet) to continue.")),wt(ht),null==e||e.close())}({event:e,newPeraWalletTab:t,resolve:n,reject:i})})}catch(t){a(),i(t)}}))};function a(){wt(ht)}}({resolve:e,reject:n,webWalletURL:s,chainId:this.chainId,isCompactMode:this.compactMode});a&&(window.onWebWalletConnect=d),this.connector=new i.A({bridge:this.bridge||o||"https://bridge.walletconnect.org",qrcodeModal:zt({isWebWalletAvailable:a,shouldDisplayNewBadge:l,shouldUseSound:c,compactMode:this.compactMode,promoteMobile:h,singleAccount:this.singleAccount,selectedAccount:null==t?void 0:t.selectedAccount})}),yield this.connector.createSession({chainId:this.chainId||4160}),function(t,e){var n,i,r,a;const o=document.getElementById(t),s=null===(i=null===(n=null==o?void 0:o.querySelector(t.replace("-wrapper","")))||void 0===n?void 0:n.shadowRoot)||void 0===i?void 0:i.querySelector(`.${mt}`),l=null===(a=null===(r=null==s?void 0:s.querySelector("pera-wallet-modal-header"))||void 0===r?void 0:r.shadowRoot)||void 0===a?void 0:a.getElementById("pera-wallet-modal-header-close-button");null==l||l.addEventListener("click",(()=>{e(),wt(t)}))}(ht,(()=>n(new at({type:"CONNECT_MODAL_CLOSED"},"Connect modal is closed by user")))),this.connector.on("connect",((t,i)=>{var r,a;t&&n(t),e((null===(r=this.connector)||void 0===r?void 0:r.accounts)||[]),At((null===(a=this.connector)||void 0===a?void 0:a.accounts)||[])}))}catch(t){console.log(t),n(new at({type:"SESSION_CONNECT",detail:t},t.message||"There was an error while connecting to Pera Wallet"))}}))))}reconnectSession(){return new Promise(((t,e)=>rt(this,void 0,void 0,(function*(){var n,r;try{const a=Ct();if(!a)return void t([]);if("pera-wallet-web"===(null==a?void 0:a.type)){const{isWebWalletAvailable:n}=yield Et();n?t(a.accounts||[]):e(new at({type:"SESSION_RECONNECT",detail:"Pera Web is not available"},"Pera Web is not available"))}this.connector&&t(this.connector.accounts||[]),this.bridge=(null===(n=function(){var t;const e=null===(t=St())||void 0===t?void 0:t.getItem(xt);return e?JSON.parse(e):null}())||void 0===n?void 0:n.bridge)||"",this.bridge&&(this.connector=new i.A({bridge:this.bridge}),t((null===(r=this.connector)||void 0===r?void 0:r.accounts)||[])),this.isConnected||t([])}catch(t){yield this.disconnect(),e(new at({type:"SESSION_RECONNECT",detail:t},t.message||"There was an error while reconnecting to Pera Wallet"))}}))))}disconnect(){var t;return rt(this,void 0,void 0,(function*(){let e;this.isConnected&&"mobile"===this.platform&&(e=null===(t=this.connector)||void 0===t?void 0:t.killSession(),null==e||e.then((()=>{this.connector=null}))),yield kt()}))}signTransactionWithMobile(t){return rt(this,void 0,void 0,(function*(){const e=Mt("algo_signTxn",[t]);try{try{const{silent:t}=yield Et(),n=(yield this.connector.sendCustomRequest(e,{forcePushNotification:!t})).filter(Boolean);return"string"==typeof n[0]?n.map(_t):n.map((t=>Uint8Array.from(t)))}catch(t){return yield Promise.reject(new at({type:"SIGN_TRANSACTIONS",detail:t},t.message||"Failed to sign transaction"))}}finally{wt(dt),wt(ut)}}))}signTransactionWithWeb(t,e){return new Promise(((n,i)=>Vt({signTxnRequestParams:t,webWalletURL:e,method:"SIGN_TXN",resolve:n,reject:i})))}signDataWithMobile({data:t,signer:e,chainId:n}){return rt(this,void 0,void 0,(function*(){const i=Mt("algo_signData",t.map((t=>Object.assign(Object.assign({},t),{signer:e,chainId:n}))));try{try{const{silent:t}=yield Et(),e=(yield this.connector.sendCustomRequest(i,{forcePushNotification:!t})).filter(Boolean);return"string"==typeof e[0]?e.map(_t):e.map((t=>Uint8Array.from(t)))}catch(t){return yield Promise.reject(new at({type:"SIGN_TRANSACTIONS",detail:t},t.message||"Failed to sign transaction"))}}finally{wt(dt),wt(ut)}}))}signDataWithWeb({data:t,signer:e,chainId:n,webWalletURL:i}){return new Promise(((r,a)=>Vt({method:"SIGN_DATA",signTxnRequestParams:t,signer:e,chainId:n,webWalletURL:i,resolve:r,reject:a})))}checkIsPeraDiscoverBrowser(){return window.navigator.userAgent.includes("pera")}signTransaction(t,e){return rt(this,void 0,void 0,(function*(){if("mobile"===this.platform&&(Lt()?ft():!Lt()&&this.shouldShowSignTxnToast&&yt(),!this.connector))throw new Error("PeraWalletConnect was not initialized correctly.");const n=t.flatMap((t=>t.map((t=>function(t,e){let n;e&&!(t.signers||[]).includes(e)&&(n=[]);const i={txn:(a=t.txn,Buffer.from(r.Ay$.encodeUnsignedTransaction(a)).toString("base64"))};var a;return Array.isArray(n)&&(i.signers=n),t.authAddr&&(i.authAddr=t.authAddr),t.message&&(i.message=t.message),t.msig&&(i.msig=t.msig),i}(t,e)))));if("web"===this.platform){const{webWalletURL:t}=yield Et();return this.signTransactionWithWeb(n,t)}return this.signTransactionWithMobile(n)}))}signData(t,e){return rt(this,void 0,void 0,(function*(){const n=this.chainId||4160;if("mobile"===this.platform&&(Lt()?ft():!Lt()&&this.shouldShowSignTxnToast&&yt(),!this.connector))throw new Error("PeraWalletConnect was not initialized correctly.");if("web"===this.platform){const{webWalletURL:i}=yield Et();return this.signDataWithWeb({data:t,signer:e,chainId:n,webWalletURL:i})}const i=t.map((t=>Object.assign(Object.assign({},t),{data:Buffer.from(t.data).toString("base64")})));return this.signDataWithMobile({data:i,signer:e,chainId:n})}))}}"undefined"!=typeof window&&(window.global=window,window.Buffer=window.Buffer||b,Promise.resolve().then(n.bind(n,8331)))},4280:t=>{"use strict";t.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,(t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`))},4462:(t,e,n)=>{var i;!function(){"use strict";var e="input is invalid type",r="object"==typeof window,a=r?window:{};a.JS_SHA512_NO_WINDOW&&(r=!1);var o=!r&&"object"==typeof self;!a.JS_SHA512_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?a=n.g:o&&(a=self);var s=!a.JS_SHA512_NO_COMMON_JS&&t.exports,l=n.amdO,c=!a.JS_SHA512_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,h="0123456789abcdef".split(""),d=[-2147483648,8388608,32768,128],u=[24,16,8,0],p=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],m=["hex","array","digest","arrayBuffer"],g=[];!a.JS_SHA512_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!c||!a.JS_SHA512_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var f=function(t,e){return function(n){return new b(e,!0).update(n)[t]()}},y=function(t){var e=f("hex",t);e.create=function(){return new b(t)},e.update=function(t){return e.create().update(t)};for(var n=0;n<m.length;++n){var i=m[n];e[i]=f(i,t)}return e},v=function(t,e){return function(n,i){return new x(n,e,!0).update(i)[t]()}},w=function(t){var e=v("hex",t);e.create=function(e){return new x(e,t)},e.update=function(t,n){return e.create(t).update(n)};for(var n=0;n<m.length;++n){var i=m[n];e[i]=v(i,t)}return e};function b(t,e){e?(g[0]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=g[16]=g[17]=g[18]=g[19]=g[20]=g[21]=g[22]=g[23]=g[24]=g[25]=g[26]=g[27]=g[28]=g[29]=g[30]=g[31]=g[32]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],384==t?(this.h0h=3418070365,this.h0l=3238371032,this.h1h=1654270250,this.h1l=914150663,this.h2h=2438529370,this.h2l=812702999,this.h3h=355462360,this.h3l=4144912697,this.h4h=1731405415,this.h4l=4290775857,this.h5h=2394180231,this.h5l=1750603025,this.h6h=3675008525,this.h6l=1694076839,this.h7h=1203062813,this.h7l=3204075428):256==t?(this.h0h=573645204,this.h0l=4230739756,this.h1h=2673172387,this.h1l=3360449730,this.h2h=596883563,this.h2l=1867755857,this.h3h=2520282905,this.h3l=1497426621,this.h4h=2519219938,this.h4l=2827943907,this.h5h=3193839141,this.h5l=1401305490,this.h6h=721525244,this.h6l=746961066,this.h7h=246885852,this.h7l=2177182882):224==t?(this.h0h=2352822216,this.h0l=424955298,this.h1h=1944164710,this.h1l=2312950998,this.h2h=502970286,this.h2l=855612546,this.h3h=1738396948,this.h3l=1479516111,this.h4h=258812777,this.h4l=2077511080,this.h5h=2011393907,this.h5l=79989058,this.h6h=1067287976,this.h6l=1780299464,this.h7h=286451373,this.h7l=2446758561):(this.h0h=1779033703,this.h0l=4089235720,this.h1h=3144134277,this.h1l=2227873595,this.h2h=1013904242,this.h2l=4271175723,this.h3h=2773480762,this.h3l=1595750129,this.h4h=1359893119,this.h4l=2917565137,this.h5h=2600822924,this.h5l=725511199,this.h6h=528734635,this.h6l=4215389547,this.h7h=1541459225,this.h7l=327033209),this.bits=t,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1}function x(t,n,i){var r,a=typeof t;if("string"!==a){if("object"!==a)throw new Error(e);if(null===t)throw new Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||c&&ArrayBuffer.isView(t)))throw new Error(e);r=!0}var o=t.length;if(!r){for(var s,l=[],h=(o=t.length,0),d=0;d<o;++d)(s=t.charCodeAt(d))<128?l[h++]=s:s<2048?(l[h++]=192|s>>6,l[h++]=128|63&s):s<55296||s>=57344?(l[h++]=224|s>>12,l[h++]=128|s>>6&63,l[h++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++d)),l[h++]=240|s>>18,l[h++]=128|s>>12&63,l[h++]=128|s>>6&63,l[h++]=128|63&s);t=l}t.length>128&&(t=new b(n,!0).update(t).array());var u=[],p=[];for(d=0;d<128;++d){var m=t[d]||0;u[d]=92^m,p[d]=54^m}b.call(this,n,i),this.update(p),this.oKeyPad=u,this.inner=!0,this.sharedMemory=i}b.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var n,i=typeof t;if("string"!==i){if("object"!==i)throw new Error(e);if(null===t)throw new Error(e);if(c&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||c&&ArrayBuffer.isView(t)))throw new Error(e);n=!0}for(var r,a,o=0,s=t.length,l=this.blocks;o<s;){if(this.hashed&&(this.hashed=!1,l[0]=this.block,l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=l[16]=l[17]=l[18]=l[19]=l[20]=l[21]=l[22]=l[23]=l[24]=l[25]=l[26]=l[27]=l[28]=l[29]=l[30]=l[31]=l[32]=0),n)for(a=this.start;o<s&&a<128;++o)l[a>>2]|=t[o]<<u[3&a++];else for(a=this.start;o<s&&a<128;++o)(r=t.charCodeAt(o))<128?l[a>>2]|=r<<u[3&a++]:r<2048?(l[a>>2]|=(192|r>>6)<<u[3&a++],l[a>>2]|=(128|63&r)<<u[3&a++]):r<55296||r>=57344?(l[a>>2]|=(224|r>>12)<<u[3&a++],l[a>>2]|=(128|r>>6&63)<<u[3&a++],l[a>>2]|=(128|63&r)<<u[3&a++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),l[a>>2]|=(240|r>>18)<<u[3&a++],l[a>>2]|=(128|r>>12&63)<<u[3&a++],l[a>>2]|=(128|r>>6&63)<<u[3&a++],l[a>>2]|=(128|63&r)<<u[3&a++]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=128?(this.block=l[32],this.start=a-128,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this},b.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[32]=this.block,t[e>>2]|=d[3&e],this.block=t[32],e>=112&&(this.hashed||this.hash(),t[0]=this.block,t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=t[16]=t[17]=t[18]=t[19]=t[20]=t[21]=t[22]=t[23]=t[24]=t[25]=t[26]=t[27]=t[28]=t[29]=t[30]=t[31]=t[32]=0),t[30]=this.hBytes<<3|this.bytes>>>29,t[31]=this.bytes<<3,this.hash()}},b.prototype.hash=function(){var t,e,n,i,r,a,o,s,l,c,h,d,u,m,g,f,y,v,w,b,x,S,A,C,k,I=this.h0h,E=this.h0l,_=this.h1h,M=this.h1l,D=this.h2h,P=this.h2l,T=this.h3h,L=this.h3l,B=this.h4h,F=this.h4l,R=this.h5h,N=this.h5l,V=this.h6h,z=this.h6l,G=this.h7h,W=this.h7l,O=this.blocks;for(t=32;t<160;t+=2)e=((b=O[t-30])>>>1|(x=O[t-29])<<31)^(b>>>8|x<<24)^b>>>7,n=(x>>>1|b<<31)^(x>>>8|b<<24)^(x>>>7|b<<25),i=((b=O[t-4])>>>19|(x=O[t-3])<<13)^(x>>>29|b<<3)^b>>>6,r=(x>>>19|b<<13)^(b>>>29|x<<3)^(x>>>6|b<<26),b=O[t-32],x=O[t-31],l=((S=O[t-14])>>>16)+(b>>>16)+(e>>>16)+(i>>>16)+((s=(65535&S)+(65535&b)+(65535&e)+(65535&i)+((o=((A=O[t-13])>>>16)+(x>>>16)+(n>>>16)+(r>>>16)+((a=(65535&A)+(65535&x)+(65535&n)+(65535&r))>>>16))>>>16))>>>16),O[t]=l<<16|65535&s,O[t+1]=o<<16|65535&a;var Z=I,Y=E,H=_,j=M,X=D,U=P,K=T,J=L,q=B,$=F,Q=R,tt=N,et=V,nt=z,it=G,rt=W;for(f=H&X,y=j&U,t=0;t<160;t+=8)e=(Z>>>28|Y<<4)^(Y>>>2|Z<<30)^(Y>>>7|Z<<25),n=(Y>>>28|Z<<4)^(Z>>>2|Y<<30)^(Z>>>7|Y<<25),i=(q>>>14|$<<18)^(q>>>18|$<<14)^($>>>9|q<<23),r=($>>>14|q<<18)^($>>>18|q<<14)^(q>>>9|$<<23),v=(c=Z&H)^Z&X^f,w=(h=Y&j)^Y&U^y,C=q&Q^~q&et,k=$&tt^~$&nt,b=O[t],x=O[t+1],b=(l=((S=p[t])>>>16)+(b>>>16)+(C>>>16)+(i>>>16)+(it>>>16)+((s=(65535&S)+(65535&b)+(65535&C)+(65535&i)+(65535&it)+((o=((A=p[t+1])>>>16)+(x>>>16)+(k>>>16)+(r>>>16)+(rt>>>16)+((a=(65535&A)+(65535&x)+(65535&k)+(65535&r)+(65535&rt))>>>16))>>>16))>>>16))<<16|65535&s,x=o<<16|65535&a,S=(l=(v>>>16)+(e>>>16)+((s=(65535&v)+(65535&e)+((o=(w>>>16)+(n>>>16)+((a=(65535&w)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,it=(l=(K>>>16)+(b>>>16)+((s=(65535&K)+(65535&b)+((o=(J>>>16)+(x>>>16)+((a=(65535&J)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s,rt=o<<16|65535&a,e=((K=(l=(S>>>16)+(b>>>16)+((s=(65535&S)+(65535&b)+((o=(A>>>16)+(x>>>16)+((a=(65535&A)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(J=o<<16|65535&a)<<4)^(J>>>2|K<<30)^(J>>>7|K<<25),n=(J>>>28|K<<4)^(K>>>2|J<<30)^(K>>>7|J<<25),i=(it>>>14|rt<<18)^(it>>>18|rt<<14)^(rt>>>9|it<<23),r=(rt>>>14|it<<18)^(rt>>>18|it<<14)^(it>>>9|rt<<23),v=(d=K&Z)^K&H^c,w=(u=J&Y)^J&j^h,C=it&q^~it&Q,k=rt&$^~rt&tt,b=O[t+2],x=O[t+3],b=(l=((S=p[t+2])>>>16)+(b>>>16)+(C>>>16)+(i>>>16)+(et>>>16)+((s=(65535&S)+(65535&b)+(65535&C)+(65535&i)+(65535&et)+((o=((A=p[t+3])>>>16)+(x>>>16)+(k>>>16)+(r>>>16)+(nt>>>16)+((a=(65535&A)+(65535&x)+(65535&k)+(65535&r)+(65535&nt))>>>16))>>>16))>>>16))<<16|65535&s,x=o<<16|65535&a,S=(l=(v>>>16)+(e>>>16)+((s=(65535&v)+(65535&e)+((o=(w>>>16)+(n>>>16)+((a=(65535&w)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,et=(l=(X>>>16)+(b>>>16)+((s=(65535&X)+(65535&b)+((o=(U>>>16)+(x>>>16)+((a=(65535&U)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s,nt=o<<16|65535&a,e=((X=(l=(S>>>16)+(b>>>16)+((s=(65535&S)+(65535&b)+((o=(A>>>16)+(x>>>16)+((a=(65535&A)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(U=o<<16|65535&a)<<4)^(U>>>2|X<<30)^(U>>>7|X<<25),n=(U>>>28|X<<4)^(X>>>2|U<<30)^(X>>>7|U<<25),i=(et>>>14|nt<<18)^(et>>>18|nt<<14)^(nt>>>9|et<<23),r=(nt>>>14|et<<18)^(nt>>>18|et<<14)^(et>>>9|nt<<23),v=(m=X&K)^X&Z^d,w=(g=U&J)^U&Y^u,C=et&it^~et&q,k=nt&rt^~nt&$,b=O[t+4],x=O[t+5],b=(l=((S=p[t+4])>>>16)+(b>>>16)+(C>>>16)+(i>>>16)+(Q>>>16)+((s=(65535&S)+(65535&b)+(65535&C)+(65535&i)+(65535&Q)+((o=((A=p[t+5])>>>16)+(x>>>16)+(k>>>16)+(r>>>16)+(tt>>>16)+((a=(65535&A)+(65535&x)+(65535&k)+(65535&r)+(65535&tt))>>>16))>>>16))>>>16))<<16|65535&s,x=o<<16|65535&a,S=(l=(v>>>16)+(e>>>16)+((s=(65535&v)+(65535&e)+((o=(w>>>16)+(n>>>16)+((a=(65535&w)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,Q=(l=(H>>>16)+(b>>>16)+((s=(65535&H)+(65535&b)+((o=(j>>>16)+(x>>>16)+((a=(65535&j)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s,tt=o<<16|65535&a,e=((H=(l=(S>>>16)+(b>>>16)+((s=(65535&S)+(65535&b)+((o=(A>>>16)+(x>>>16)+((a=(65535&A)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s)>>>28|(j=o<<16|65535&a)<<4)^(j>>>2|H<<30)^(j>>>7|H<<25),n=(j>>>28|H<<4)^(H>>>2|j<<30)^(H>>>7|j<<25),i=(Q>>>14|tt<<18)^(Q>>>18|tt<<14)^(tt>>>9|Q<<23),r=(tt>>>14|Q<<18)^(tt>>>18|Q<<14)^(Q>>>9|tt<<23),v=(f=H&X)^H&K^m,w=(y=j&U)^j&J^g,C=Q&et^~Q&it,k=tt&nt^~tt&rt,b=O[t+6],x=O[t+7],b=(l=((S=p[t+6])>>>16)+(b>>>16)+(C>>>16)+(i>>>16)+(q>>>16)+((s=(65535&S)+(65535&b)+(65535&C)+(65535&i)+(65535&q)+((o=((A=p[t+7])>>>16)+(x>>>16)+(k>>>16)+(r>>>16)+($>>>16)+((a=(65535&A)+(65535&x)+(65535&k)+(65535&r)+(65535&$))>>>16))>>>16))>>>16))<<16|65535&s,x=o<<16|65535&a,S=(l=(v>>>16)+(e>>>16)+((s=(65535&v)+(65535&e)+((o=(w>>>16)+(n>>>16)+((a=(65535&w)+(65535&n))>>>16))>>>16))>>>16))<<16|65535&s,A=o<<16|65535&a,q=(l=(Z>>>16)+(b>>>16)+((s=(65535&Z)+(65535&b)+((o=(Y>>>16)+(x>>>16)+((a=(65535&Y)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s,$=o<<16|65535&a,Z=(l=(S>>>16)+(b>>>16)+((s=(65535&S)+(65535&b)+((o=(A>>>16)+(x>>>16)+((a=(65535&A)+(65535&x))>>>16))>>>16))>>>16))<<16|65535&s,Y=o<<16|65535&a;l=(I>>>16)+(Z>>>16)+((s=(65535&I)+(65535&Z)+((o=(E>>>16)+(Y>>>16)+((a=(65535&E)+(65535&Y))>>>16))>>>16))>>>16),this.h0h=l<<16|65535&s,this.h0l=o<<16|65535&a,l=(_>>>16)+(H>>>16)+((s=(65535&_)+(65535&H)+((o=(M>>>16)+(j>>>16)+((a=(65535&M)+(65535&j))>>>16))>>>16))>>>16),this.h1h=l<<16|65535&s,this.h1l=o<<16|65535&a,l=(D>>>16)+(X>>>16)+((s=(65535&D)+(65535&X)+((o=(P>>>16)+(U>>>16)+((a=(65535&P)+(65535&U))>>>16))>>>16))>>>16),this.h2h=l<<16|65535&s,this.h2l=o<<16|65535&a,l=(T>>>16)+(K>>>16)+((s=(65535&T)+(65535&K)+((o=(L>>>16)+(J>>>16)+((a=(65535&L)+(65535&J))>>>16))>>>16))>>>16),this.h3h=l<<16|65535&s,this.h3l=o<<16|65535&a,l=(B>>>16)+(q>>>16)+((s=(65535&B)+(65535&q)+((o=(F>>>16)+($>>>16)+((a=(65535&F)+(65535&$))>>>16))>>>16))>>>16),this.h4h=l<<16|65535&s,this.h4l=o<<16|65535&a,l=(R>>>16)+(Q>>>16)+((s=(65535&R)+(65535&Q)+((o=(N>>>16)+(tt>>>16)+((a=(65535&N)+(65535&tt))>>>16))>>>16))>>>16),this.h5h=l<<16|65535&s,this.h5l=o<<16|65535&a,l=(V>>>16)+(et>>>16)+((s=(65535&V)+(65535&et)+((o=(z>>>16)+(nt>>>16)+((a=(65535&z)+(65535&nt))>>>16))>>>16))>>>16),this.h6h=l<<16|65535&s,this.h6l=o<<16|65535&a,l=(G>>>16)+(it>>>16)+((s=(65535&G)+(65535&it)+((o=(W>>>16)+(rt>>>16)+((a=(65535&W)+(65535&rt))>>>16))>>>16))>>>16),this.h7h=l<<16|65535&s,this.h7l=o<<16|65535&a},b.prototype.hex=function(){this.finalize();var t=this.h0h,e=this.h0l,n=this.h1h,i=this.h1l,r=this.h2h,a=this.h2l,o=this.h3h,s=this.h3l,l=this.h4h,c=this.h4l,d=this.h5h,u=this.h5l,p=this.h6h,m=this.h6l,g=this.h7h,f=this.h7l,y=this.bits,v=h[t>>28&15]+h[t>>24&15]+h[t>>20&15]+h[t>>16&15]+h[t>>12&15]+h[t>>8&15]+h[t>>4&15]+h[15&t]+h[e>>28&15]+h[e>>24&15]+h[e>>20&15]+h[e>>16&15]+h[e>>12&15]+h[e>>8&15]+h[e>>4&15]+h[15&e]+h[n>>28&15]+h[n>>24&15]+h[n>>20&15]+h[n>>16&15]+h[n>>12&15]+h[n>>8&15]+h[n>>4&15]+h[15&n]+h[i>>28&15]+h[i>>24&15]+h[i>>20&15]+h[i>>16&15]+h[i>>12&15]+h[i>>8&15]+h[i>>4&15]+h[15&i]+h[r>>28&15]+h[r>>24&15]+h[r>>20&15]+h[r>>16&15]+h[r>>12&15]+h[r>>8&15]+h[r>>4&15]+h[15&r]+h[a>>28&15]+h[a>>24&15]+h[a>>20&15]+h[a>>16&15]+h[a>>12&15]+h[a>>8&15]+h[a>>4&15]+h[15&a]+h[o>>28&15]+h[o>>24&15]+h[o>>20&15]+h[o>>16&15]+h[o>>12&15]+h[o>>8&15]+h[o>>4&15]+h[15&o];return y>=256&&(v+=h[s>>28&15]+h[s>>24&15]+h[s>>20&15]+h[s>>16&15]+h[s>>12&15]+h[s>>8&15]+h[s>>4&15]+h[15&s]),y>=384&&(v+=h[l>>28&15]+h[l>>24&15]+h[l>>20&15]+h[l>>16&15]+h[l>>12&15]+h[l>>8&15]+h[l>>4&15]+h[15&l]+h[c>>28&15]+h[c>>24&15]+h[c>>20&15]+h[c>>16&15]+h[c>>12&15]+h[c>>8&15]+h[c>>4&15]+h[15&c]+h[d>>28&15]+h[d>>24&15]+h[d>>20&15]+h[d>>16&15]+h[d>>12&15]+h[d>>8&15]+h[d>>4&15]+h[15&d]+h[u>>28&15]+h[u>>24&15]+h[u>>20&15]+h[u>>16&15]+h[u>>12&15]+h[u>>8&15]+h[u>>4&15]+h[15&u]),512==y&&(v+=h[p>>28&15]+h[p>>24&15]+h[p>>20&15]+h[p>>16&15]+h[p>>12&15]+h[p>>8&15]+h[p>>4&15]+h[15&p]+h[m>>28&15]+h[m>>24&15]+h[m>>20&15]+h[m>>16&15]+h[m>>12&15]+h[m>>8&15]+h[m>>4&15]+h[15&m]+h[g>>28&15]+h[g>>24&15]+h[g>>20&15]+h[g>>16&15]+h[g>>12&15]+h[g>>8&15]+h[g>>4&15]+h[15&g]+h[f>>28&15]+h[f>>24&15]+h[f>>20&15]+h[f>>16&15]+h[f>>12&15]+h[f>>8&15]+h[f>>4&15]+h[15&f]),v},b.prototype.toString=b.prototype.hex,b.prototype.digest=function(){this.finalize();var t=this.h0h,e=this.h0l,n=this.h1h,i=this.h1l,r=this.h2h,a=this.h2l,o=this.h3h,s=this.h3l,l=this.h4h,c=this.h4l,h=this.h5h,d=this.h5l,u=this.h6h,p=this.h6l,m=this.h7h,g=this.h7l,f=this.bits,y=[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,i>>24&255,i>>16&255,i>>8&255,255&i,r>>24&255,r>>16&255,r>>8&255,255&r,a>>24&255,a>>16&255,a>>8&255,255&a,o>>24&255,o>>16&255,o>>8&255,255&o];return f>=256&&y.push(s>>24&255,s>>16&255,s>>8&255,255&s),f>=384&&y.push(l>>24&255,l>>16&255,l>>8&255,255&l,c>>24&255,c>>16&255,c>>8&255,255&c,h>>24&255,h>>16&255,h>>8&255,255&h,d>>24&255,d>>16&255,d>>8&255,255&d),512==f&&y.push(u>>24&255,u>>16&255,u>>8&255,255&u,p>>24&255,p>>16&255,p>>8&255,255&p,m>>24&255,m>>16&255,m>>8&255,255&m,g>>24&255,g>>16&255,g>>8&255,255&g),y},b.prototype.array=b.prototype.digest,b.prototype.arrayBuffer=function(){this.finalize();var t=this.bits,e=new ArrayBuffer(t/8),n=new DataView(e);return n.setUint32(0,this.h0h),n.setUint32(4,this.h0l),n.setUint32(8,this.h1h),n.setUint32(12,this.h1l),n.setUint32(16,this.h2h),n.setUint32(20,this.h2l),n.setUint32(24,this.h3h),t>=256&&n.setUint32(28,this.h3l),t>=384&&(n.setUint32(32,this.h4h),n.setUint32(36,this.h4l),n.setUint32(40,this.h5h),n.setUint32(44,this.h5l)),512==t&&(n.setUint32(48,this.h6h),n.setUint32(52,this.h6l),n.setUint32(56,this.h7h),n.setUint32(60,this.h7l)),e},b.prototype.clone=function(){var t=new b(this.bits,!1);return this.copyTo(t),t},b.prototype.copyTo=function(t){var e=0,n=["h0h","h0l","h1h","h1l","h2h","h2l","h3h","h3l","h4h","h4l","h5h","h5l","h6h","h6l","h7h","h7l","start","bytes","hBytes","finalized","hashed","lastByteIndex"];for(e=0;e<n.length;++e)t[n[e]]=this[n[e]];for(e=0;e<this.blocks.length;++e)t.blocks[e]=this.blocks[e]},x.prototype=new b,x.prototype.finalize=function(){if(b.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();b.call(this,this.bits,this.sharedMemory),this.update(this.oKeyPad),this.update(t),b.prototype.finalize.call(this)}},x.prototype.clone=function(){var t=new x([],this.bits,!1);this.copyTo(t),t.inner=this.inner;for(var e=0;e<this.oKeyPad.length;++e)t.oKeyPad[e]=this.oKeyPad[e];return t};var S=y(512);S.sha512=S,S.sha384=y(384),S.sha512_256=y(256),S.sha512_224=y(224),S.sha512.hmac=w(512),S.sha384.hmac=w(384),S.sha512_256.hmac=w(256),S.sha512_224.hmac=w(224),s?t.exports=S:(a.sha512=S.sha512,a.sha384=S.sha384,a.sha512_256=S.sha512_256,a.sha512_224=S.sha512_224,l&&(void 0===(i=function(){return S}.call(S,n,S,t))||(t.exports=i)))}()},4527:(t,e,n)=>{var i=n(9225).strict;t.exports=function(t){if(i(t)){var e=Buffer.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(e=e.slice(t.byteOffset,t.byteOffset+t.byteLength)),e}return Buffer.from(t)}},5056:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},5072:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var a={},o=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],h=a[c]||0,d="".concat(c," ").concat(h);a[c]=h+1;var u=n(d),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)e[u].references++,e[u].updater(p);else{var m=r(p,i);i.byIndex=s,e.splice(s,0,{identifier:d,updater:m,references:1})}o.push(d)}return o}function r(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,r){var a=i(t=t||[],r=r||{});return function(t){t=t||[];for(var o=0;o<a.length;o++){var s=n(a[o]);e[s].references--}for(var l=i(t,r),c=0;c<a.length;c++){var h=n(a[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}a=l}}},5682:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(8186);i.__exportStar(n(7173),e),i.__exportStar(n(1089),e)},5818:(t,e,n)=>{var i;!function(){"use strict";var e="object"==typeof window?window:{};!e.HI_BASE32_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node&&(e=n.g);var r=!e.HI_BASE32_NO_COMMON_JS&&t.exports,a=n.amdO,o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),s={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},l=[0,0,0,0,0,0,0,0],c=function(t,e){e.length>10&&(e="..."+e.substr(-10));var n=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+t+" bytes: "+e+" <-");throw n.position=t,n},h=function(t){if(""===t)return[];if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");for(var e,n,i,r,a,o,l,c,h=[],d=0,u=(t=t.replace(/=/g,"")).length,p=0,m=u>>3<<3;p<m;)e=s[t.charAt(p++)],n=s[t.charAt(p++)],i=s[t.charAt(p++)],r=s[t.charAt(p++)],a=s[t.charAt(p++)],o=s[t.charAt(p++)],l=s[t.charAt(p++)],c=s[t.charAt(p++)],h[d++]=255&(e<<3|n>>>2),h[d++]=255&(n<<6|i<<1|r>>>4),h[d++]=255&(r<<4|a>>>1),h[d++]=255&(a<<7|o<<2|l>>>3),h[d++]=255&(l<<5|c);var g=u-m;return 2===g?(e=s[t.charAt(p++)],n=s[t.charAt(p++)],h[d++]=255&(e<<3|n>>>2)):4===g?(e=s[t.charAt(p++)],n=s[t.charAt(p++)],i=s[t.charAt(p++)],r=s[t.charAt(p++)],h[d++]=255&(e<<3|n>>>2),h[d++]=255&(n<<6|i<<1|r>>>4)):5===g?(e=s[t.charAt(p++)],n=s[t.charAt(p++)],i=s[t.charAt(p++)],r=s[t.charAt(p++)],a=s[t.charAt(p++)],h[d++]=255&(e<<3|n>>>2),h[d++]=255&(n<<6|i<<1|r>>>4),h[d++]=255&(r<<4|a>>>1)):7===g&&(e=s[t.charAt(p++)],n=s[t.charAt(p++)],i=s[t.charAt(p++)],r=s[t.charAt(p++)],a=s[t.charAt(p++)],o=s[t.charAt(p++)],l=s[t.charAt(p++)],h[d++]=255&(e<<3|n>>>2),h[d++]=255&(n<<6|i<<1|r>>>4),h[d++]=255&(r<<4|a>>>1),h[d++]=255&(a<<7|o<<2|l>>>3)),h},d=function(t,e){if(!e)return function(t){for(var e,n,i="",r=t.length,a=0,o=0;a<r;)if((e=t[a++])<=127)i+=String.fromCharCode(e);else{e>191&&e<=223?(n=31&e,o=1):e<=239?(n=15&e,o=2):e<=247?(n=7&e,o=3):c(a,i);for(var s=0;s<o;++s)((e=t[a++])<128||e>191)&&c(a,i),n<<=6,n+=63&e;n>=55296&&n<=57343&&c(a,i),n>1114111&&c(a,i),n<=65535?i+=String.fromCharCode(n):(n-=65536,i+=String.fromCharCode(55296+(n>>10)),i+=String.fromCharCode(56320+(1023&n)))}return i}(h(t));if(""===t)return"";if(!/^[A-Z2-7=]+$/.test(t))throw new Error("Invalid base32 characters");var n,i,r,a,o,l,d,u,p="",m=t.indexOf("=");-1===m&&(m=t.length);for(var g=0,f=m>>3<<3;g<f;)n=s[t.charAt(g++)],i=s[t.charAt(g++)],r=s[t.charAt(g++)],a=s[t.charAt(g++)],o=s[t.charAt(g++)],l=s[t.charAt(g++)],d=s[t.charAt(g++)],u=s[t.charAt(g++)],p+=String.fromCharCode(255&(n<<3|i>>>2))+String.fromCharCode(255&(i<<6|r<<1|a>>>4))+String.fromCharCode(255&(a<<4|o>>>1))+String.fromCharCode(255&(o<<7|l<<2|d>>>3))+String.fromCharCode(255&(d<<5|u));var y=m-f;return 2===y?(n=s[t.charAt(g++)],i=s[t.charAt(g++)],p+=String.fromCharCode(255&(n<<3|i>>>2))):4===y?(n=s[t.charAt(g++)],i=s[t.charAt(g++)],r=s[t.charAt(g++)],a=s[t.charAt(g++)],p+=String.fromCharCode(255&(n<<3|i>>>2))+String.fromCharCode(255&(i<<6|r<<1|a>>>4))):5===y?(n=s[t.charAt(g++)],i=s[t.charAt(g++)],r=s[t.charAt(g++)],a=s[t.charAt(g++)],o=s[t.charAt(g++)],p+=String.fromCharCode(255&(n<<3|i>>>2))+String.fromCharCode(255&(i<<6|r<<1|a>>>4))+String.fromCharCode(255&(a<<4|o>>>1))):7===y&&(n=s[t.charAt(g++)],i=s[t.charAt(g++)],r=s[t.charAt(g++)],a=s[t.charAt(g++)],o=s[t.charAt(g++)],l=s[t.charAt(g++)],d=s[t.charAt(g++)],p+=String.fromCharCode(255&(n<<3|i>>>2))+String.fromCharCode(255&(i<<6|r<<1|a>>>4))+String.fromCharCode(255&(a<<4|o>>>1))+String.fromCharCode(255&(o<<7|l<<2|d>>>3))),p},u={encode:function(t,e){var n="string"!=typeof t;return n&&t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),n?function(t){for(var e,n,i,r,a,s="",l=t.length,c=0,h=5*parseInt(l/5);c<h;)e=t[c++],n=t[c++],i=t[c++],r=t[c++],a=t[c++],s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[31&(r<<3|a>>>5)]+o[31&a];var d=l-h;return 1===d?(e=t[c],s+=o[e>>>3]+o[e<<2&31]+"======"):2===d?(e=t[c++],n=t[c],s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[n<<4&31]+"===="):3===d?(e=t[c++],n=t[c++],i=t[c],s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[i<<1&31]+"==="):4===d&&(e=t[c++],n=t[c++],i=t[c++],r=t[c],s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[r<<3&31]+"="),s}(t):e?function(t){for(var e,n,i,r,a,s="",l=t.length,c=0,h=5*parseInt(l/5);c<h;)e=t.charCodeAt(c++),n=t.charCodeAt(c++),i=t.charCodeAt(c++),r=t.charCodeAt(c++),a=t.charCodeAt(c++),s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[31&(r<<3|a>>>5)]+o[31&a];var d=l-h;return 1===d?(e=t.charCodeAt(c),s+=o[e>>>3]+o[e<<2&31]+"======"):2===d?(e=t.charCodeAt(c++),n=t.charCodeAt(c),s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[n<<4&31]+"===="):3===d?(e=t.charCodeAt(c++),n=t.charCodeAt(c++),i=t.charCodeAt(c),s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[i<<1&31]+"==="):4===d&&(e=t.charCodeAt(c++),n=t.charCodeAt(c++),i=t.charCodeAt(c++),r=t.charCodeAt(c),s+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[r<<3&31]+"="),s}(t):function(t){var e,n,i,r,a,s,c,h=!1,d="",u=0,p=0,m=t.length;if(""===t)return d;do{for(l[0]=l[5],l[1]=l[6],l[2]=l[7],c=p;u<m&&c<5;++u)(s=t.charCodeAt(u))<128?l[c++]=s:s<2048?(l[c++]=192|s>>6,l[c++]=128|63&s):s<55296||s>=57344?(l[c++]=224|s>>12,l[c++]=128|s>>6&63,l[c++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++u)),l[c++]=240|s>>18,l[c++]=128|s>>12&63,l[c++]=128|s>>6&63,l[c++]=128|63&s);p=c-5,u===m&&++u,u>m&&c<6&&(h=!0),e=l[0],c>4?(n=l[1],i=l[2],r=l[3],a=l[4],d+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[31&(r<<3|a>>>5)]+o[31&a]):1===c?d+=o[e>>>3]+o[e<<2&31]+"======":2===c?(n=l[1],d+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[n<<4&31]+"===="):3===c?(n=l[1],i=l[2],d+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[i<<1&31]+"==="):(n=l[1],i=l[2],r=l[3],d+=o[e>>>3]+o[31&(e<<2|n>>>6)]+o[n>>>1&31]+o[31&(n<<4|i>>>4)]+o[31&(i<<1|r>>>7)]+o[r>>>2&31]+o[r<<3&31]+"=")}while(!h);return d}(t)},decode:d};d.asBytes=h,r?t.exports=u:(e.base32=u,a&&(void 0===(i=function(){return u}.call(u,n,u,t))||(t.exports=i)))}()},5975:(t,e,n)=>{"use strict";n.r(e);var i=n(7425),r=n(1634),a=n(9891);function o(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}n(8287),n(1704),n(3899),n(6880);var s=".defly-wallet-modal-header {\n position: absolute;\n top: -44px;\n right: 0px;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.defly-wallet-modal-header--mobile {\n position: static;\n}\n.defly-wallet-modal-header--mobile .defly-wallet-modal-header__close-button {\n width: 24px;\n height: 24px;\n margin: 0;\n padding: 0;\n background: transparent;\n border: unset;\n box-shadow: unset;\n}\n\n.defly-wallet-modal-header__brand {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 15px;\n font-weight: 600;\n line-height: 18px;\n letter-spacing: -0.13px;\n color: #ffffff;\n}\n\n.defly-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.defly-wallet-modal-header__close-button {\n width: 40px;\n height: 40px;\n margin: 0;\n padding: 0;\n background: #333333;\n border: 1.5px solid rgba(255, 255, 255, 0.08);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\n border-radius: 100%;\n}\n\n.defly-wallet-modal-header__close-button__close-icon {\n width: 20px;\n height: 20px;\n}";function l(){return document.documentElement.clientWidth<=935}function c(){document.documentElement.style.setProperty("--defly-wallet-vh",.01*window.innerHeight+"px")}o(s);const h=document.createElement("template"),d=(0,i.i)()?"defly-wallet-modal-header defly-wallet-modal-header--mobile":"defly-wallet-modal-header defly-wallet-modal-header--desktop";h.innerHTML=`\n <div class="${d}">\n ${l()&&(0,i.i)()?"":"<div class=\"defly-wallet-modal-header__brand\">\n <img src=\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3e %3cg transform='translate(18090 -8429)'%3e %3cg transform='translate(-18227.732 8408.374)'%3e %3cpath d='M168.632%2c47.566%2c155.742%2c26l-12.89%2c21.566%2c12.89-7.354Z' transform='translate(0)' fill='white'/%3e %3cpath d='M191.634%2c257.081l-10.639-5.607-10.639%2c5.607%2c10.639-3.464Z' transform='translate(-25.252 -207.321)' fill='white'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e\" />\n\n Defly Connect\n </div>\n "} \n\n <button\n id="defly-wallet-modal-header-close-button"\n class="defly-wallet-button defly-wallet-modal-header__close-button">\n <img\n class="defly-wallet-modal-header__close-button__close-icon"\n src="${l()&&(0,i.i)()?"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18 6L12 12M12 12L6 18M12 12L18 18M12 12L6 6' stroke='%23999999' stroke-width='2'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18 6L12 12M12 12L6 18M12 12L18 18M12 12L6 6' stroke='white' stroke-width='2'/%3e%3c/svg%3e"}"\n />\n </button>\n </div>\n`;class u extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=s,this.shadowRoot.append(h.content.cloneNode(!0),t),this.onClose()}}onClose(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-modal-header-close-button"),n=this.getAttribute("modal-id");e&&n===i.D&&e.addEventListener("click",(()=>{(0,i.r)(i.D)}))}}var p="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3e%3cg transform='translate(18090 -8429)'%3e%3cg transform='translate(-18090 8428)'%3e%3crect width='36' height='36' rx='18' transform='translate(0 1)'/%3e%3c/g%3e%3cg transform='translate(-18227.732 8408.374)'%3e%3cpath d='M168.632%2c47.566%2c155.742%2c26l-12.89%2c21.566%2c12.89-7.354Z' transform='translate(0)' fill='white'/%3e%3cpath d='M191.634%2c257.081l-10.639-5.607-10.639%2c5.607%2c10.639-3.464Z' transform='translate(-25.252 -207.321)' fill='white'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",m=".defly-wallet-download-qr-code-wrapper {\n width: fit-content;\n margin: 0 auto;\n display: flex;\n background-color: #ffffff;\n box-shadow: 0 12px 32px rgba(26, 35, 91, 0.1);\n border-radius: 30px;\n align-items: center;\n justify-content: center;\n padding: 15px;\n}\n\n@media (max-width: 935px) {\n .defly-wallet-download-qr-code-wrapper {\n margin-top: 32px;\n }\n}";o(m);const g=(0,i.a)()?"algorand://":"defly-wc://",f=document.createElement("template");f.innerHTML='\n <div id="defly-wallet-download-qr-code-wrapper" class="defly-wallet-download-qr-code-wrapper"></div> \n';class y extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=m,this.shadowRoot.append(f.content.cloneNode(!0),t)}}connectedCallback(){var t;const e=new r({width:250,height:250,type:"svg",data:"https://defly.app/",image:p,dotsOptions:{color:"#000",type:"dots"},imageOptions:{crossOrigin:"anonymous",margin:10},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}}),n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-download-qr-code-wrapper");n&&e.append(n)}}var v=".defly-wallet-connect-modal-desktop-mode {\n display: grid;\n grid-template-columns: 50% auto;\n gap: 24px;\n align-items: center;\n}\n.defly-wallet-connect-modal-desktop-mode--default .defly-wallet-connect-modal-desktop-mode__default-view {\n display: block;\n}\n.defly-wallet-connect-modal-desktop-mode--default .defly-wallet-connect-modal-desktop-mode__download-view {\n display: none;\n}\n.defly-wallet-connect-modal-desktop-mode--download .defly-wallet-connect-modal-desktop-mode__default-view {\n display: none;\n}\n.defly-wallet-connect-modal-desktop-mode--download .defly-wallet-connect-modal-desktop-mode__download-view {\n display: block;\n}\n.defly-wallet-connect-modal-desktop-mode--download .defly-wallet-connect-modal-desktop-mode__download-view .defly-wallet-connect-modal-download-defly-view__footer a {\n display: flex;\n cursor: pointer;\n}\n.defly-wallet-connect-modal-desktop-mode--select-account {\n width: 100%;\n height: 100%;\n}\n.defly-wallet-connect-modal-desktop-mode--select-account.defly-wallet-connect-modal-desktop-mode--default {\n overflow: hidden;\n}\n.defly-wallet-connect-modal-desktop-mode--select-account .defly-wallet-accordion {\n overflow: hidden;\n}\n.defly-wallet-connect-modal-desktop-mode--select-account #defly-wallet-iframe {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 3;\n width: 100%;\n height: 100%;\n border-radius: 16px;\n}\n\n.defly-wallet-connect-modal-desktop-mode__accordion__description,\n.defly-wallet-connect-modal-desktop-mode__connect-button-wrapper {\n padding: 0 40px 20px 64px;\n}\n\n.defly-wallet-connect-modal-desktop-mode__connect-button {\n display: block;\n width: 100%;\n height: 48px;\n border: unset;\n border-radius: 6px;\n background-color: #333333;\n color: white;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 13px;\n}\n\n.defly-wallet-connect-qr-code-wrapper {\n width: fit-content;\n padding: 10px;\n margin: 0 auto;\n display: flex;\n background-color: #ffffff;\n box-shadow: 0 12px 32px rgba(26, 35, 91, 0.1);\n border-radius: 30px;\n}\n\n.defly-wallet-connect-qr-code-wrapper {\n margin-top: 30px;\n cursor: pointer;\n}\n\n.defly-wallet-download-qr-code__image {\n width: 300px;\n height: 300px;\n}\n\n.defly-wallet-accordion-copy-button {\n display: block;\n width: 100%;\n color: #696868;\n text-align: center;\n margin-top: 15px;\n cursor: pointer;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: -0.1px;\n font-weight: 400;\n transition: all ease-in 0.2s;\n}\n.defly-wallet-accordion-copy-button:hover {\n color: #999999;\n}\n\n.defly-wallet-connect-modal-desktop-mode__scan-defly-description {\n color: #999999;\n text-align: center;\n margin: 15px 0 12px;\n font-size: 22px;\n font-weight: 600;\n line-height: 26px;\n letter-spacing: 0.2px;\n}\n.defly-wallet-connect-modal-desktop-mode__scan-defly-description a {\n color: #999999;\n}\n.defly-wallet-connect-modal-desktop-mode__scan-defly-description a:hover {\n color: #696868;\n}\n\n.defly-wallet-connect-modal-desktop-mode__download-defly-description {\n color: #696868;\n text-align: center;\n margin: 32px 0 12px;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.04px;\n}\n\n.defly-wallet-connect-modal-download-defly-view__back-button {\n display: flex;\n align-items: center;\n gap: 16px;\n margin-bottom: 14px;\n padding: 12px 24px;\n color: #3c3c49;\n background-color: #ffffff;\n outline: none;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border: unset;\n border-radius: 24px;\n font-size: 14px;\n font-weight: 600;\n line-height: 24px;\n letter-spacing: -0.1px;\n cursor: pointer;\n}\n\n.defly-wallet-connect-modal-download-defly-view {\n padding: 20px;\n background-color: #333333;\n border-radius: 30px;\n}\n\n.defly-wallet-connect-modal-download-defly-view__title {\n margin-bottom: 15px;\n color: #999999;\n font-weight: 600;\n font-size: 22px;\n line-height: 24px;\n text-align: center;\n letter-spacing: 0.2px;\n}\n\n.defly-wallet-connect-modal-download-defly-view__footer {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n margin-top: 20px;\n}\n\n.defly-wallet-connect-modal-download-defly-view__footer__button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n color: #6a6a81;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n text-decoration: none;\n border-radius: 12px;\n font-weight: 500;\n font-size: 13px;\n line-height: 200%;\n letter-spacing: -0.04px;\n cursor: pointer;\n}\n\n#defly-wallet-iframe {\n width: 285px;\n height: 376px;\n margin: 0 auto;\n border: none;\n}\n\n@media (max-width: 935px) {\n .defly-wallet-connect-modal-desktop-mode {\n grid-template-columns: 1fr;\n gap: 24px;\n }\n .defly-wallet-connect-qr-code-wrapper {\n margin-top: 16px;\n }\n .defly-wallet-connect-modal-download-defly-view {\n padding: 24px;\n }\n .defly-wallet-connect-modal-download-defly-view__footer {\n margin-top: 40px;\n }\n}";o(v);var w=".defly-wallet-accordion-item:not(:last-of-type) {\n margin-bottom: 20px;\n}\n.defly-wallet-accordion-item:not(:last-of-type) .defly-wallet-accordion-panel {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.defly-wallet-accordion-item .defly-wallet-accordion-item__content {\n height: 0;\n overflow: hidden;\n color: #696868;\n font-size: 12px;\n font-weight: 500;\n line-height: 16px;\n letter-spacing: -0.1px;\n transition: height ease-in 0.2s;\n}\n.defly-wallet-accordion-item--active .defly-wallet-accordion-item__content {\n height: 494px;\n transition: height ease-in 0.2s;\n}\n\n.defly-wallet-accordion-toggle {\n position: relative;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 24px;\n color: #2c3559;\n background-color: #ffffff;\n border: none;\n border-radius: 24px;\n outline: none;\n cursor: pointer;\n font-size: 16px;\n line-height: 18px;\n letter-spacing: -0.1px;\n font-weight: 600;\n transition: all ease-in 0.2s;\n}\n.defly-wallet-accordion-toggle__text, .defly-wallet-accordion-toggle__content-with-label__text {\n color: #6a6a81;\n}\n\n.defly-wallet-accordion-toggle__bold-color {\n color: #3c3c49;\n font-weight: 600;\n}\n\n.defly-wallet-accordion-toggle__content-with-label {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.defly-wallet-accordion-toggle__label {\n padding: 4px 9px;\n color: #00b19e;\n background: rgba(0, 177, 158, 0.08);\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n letter-spacing: 0.01px;\n}\n\n.defly-wallet-accordion-toggle__button {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n background: transparent;\n box-shadow: none;\n outline: none;\n border: none;\n cursor: pointer;\n}\n\n@media (max-width: 935px) {\n .defly-wallet-accordion-toggle {\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.1px;\n }\n}";o(w);const b=document.createElement("template"),x=document.createElement("style"),S=document.createElement("style");x.textContent=v,S.textContent=w,b.innerHTML="\n <div id=\"defly-wallet-connect-modal-desktop-mode\" class=\"defly-wallet-connect-modal-desktop-mode defly-wallet-connect-modal-desktop-mode--default\">\n <defly-wallet-connect-modal-information-section></defly-wallet-connect-modal-information-section>\n\n <div class=\"defly-wallet-connect-modal-desktop-mode__default-view\">\n\n <div class=\"defly-wallet-accordion-item defly-wallet-accordion-item--active\">\n\n <div class=\"defly-wallet-accordion-item__content\">\n <div id=\"defly-wallet-connect-modal-connect-qr-code\" class=\"defly-wallet-connect-qr-code-wrapper f_copy-button\"></div>\n\n <div class=\"defly-wallet-accordion-copy-button f_copy-button\">Tap to copy</div>\n <p class=\"defly-wallet-connect-modal-desktop-mode__scan-defly-description\">\n Scan with <a href=\"https://defly.app/\">Defly Wallet</a>\n </p>\n\n \n </div>\n </div>\n </div>\n\n <div class=\"defly-wallet-connect-modal-desktop-mode__download-view\">\n <button id=\"defly-wallet-connect-modal-download-defly-view-back-button\" class=\"defly-wallet-connect-modal-download-defly-view__back-button\">\n <img src=\"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.7071 6.29387C11.0976 6.68439 11.0976 7.31756 10.7071 7.70808L7.41421 11.001L19 11.001C19.5523 11.001 20 11.4487 20 12.001C20 12.5533 19.5523 13.001 19 13.001L7.41421 13.001L10.7071 16.2939C11.0976 16.6844 11.0976 17.3176 10.7071 17.7081C10.3166 18.0986 9.68342 18.0986 9.29289 17.7081L4.29289 12.7081C4.10536 12.5205 4 12.2662 4 12.001C4 11.7358 4.10536 11.4814 4.29289 11.2939L9.29289 6.29387C9.68342 5.90335 10.3166 5.90335 10.7071 6.29387Z' fill='%233C3C49'/%3e%3c/svg%3e\" alt=\"Back Arrow\" /> Back\n </button>\n\n <div class=\"defly-wallet-connect-modal-download-defly-view\">\n <h1 class=\"defly-wallet-connect-modal-download-defly-view__title\">\n Download Defly Wallet\n </h1>\n\n <defly-wallet-download-qr-code></defly-wallet-download-qr-code>\n\n <div class=\"defly-wallet-connect-modal-download-defly-view__footer\">\n <a\n href=\"https://apps.apple.com/us/app/defly/id1602672723\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <img src=\"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='40' height='40' rx='12' fill='black'/%3e%3cpath d='M25.6308 20.3011C25.6416 19.4664 25.8633 18.6481 26.2753 17.9221C26.6873 17.1962 27.2763 16.5863 27.9873 16.1491C27.5356 15.5039 26.9397 14.973 26.2469 14.5984C25.554 14.2239 24.7834 14.016 23.9963 13.9914C22.317 13.8151 20.6891 14.9962 19.8333 14.9962C18.9611 14.9962 17.6436 14.0089 16.2249 14.0381C15.3072 14.0677 14.4128 14.3346 13.6289 14.8126C12.8451 15.2906 12.1984 15.9636 11.7519 16.7659C9.81789 20.1144 11.2605 25.0354 13.1132 27.742C14.0401 29.0674 15.1233 30.5478 16.5408 30.4953C17.9278 30.4378 18.4458 29.6108 20.1202 29.6108C21.779 29.6108 22.265 30.4953 23.7112 30.4619C25.1995 30.4378 26.1372 29.1307 27.0316 27.7928C27.6976 26.8484 28.2101 25.8047 28.55 24.7003C27.6853 24.3345 26.9474 23.7224 26.4283 22.9401C25.9092 22.1578 25.6318 21.2399 25.6308 20.3011ZM22.8993 12.2113C23.7108 11.2371 24.1106 9.98492 24.0138 8.7207C22.7739 8.85092 21.6287 9.44347 20.8062 10.3803C20.404 10.838 20.096 11.3704 19.8998 11.9472C19.7035 12.5239 19.6229 13.1337 19.6625 13.7417C20.2826 13.7481 20.8961 13.6137 21.4568 13.3486C22.0175 13.0835 22.5107 12.6946 22.8993 12.2113Z' fill='white'/%3e%3c/svg%3e\" alt=\"App Store icon\" />\n </a>\n\n <a\n href=\"https://play.google.com/store/apps/details?id=io.blockshake.defly.app\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <img src=\"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='40' height='40' rx='12' fill='black'/%3e%3cpath d='M12.41 9.7719C12.1334 10.0219 11.9683 10.4388 11.9683 10.9922V10.8671V29.1294V29.0091C11.9683 29.5202 12.1099 29.9149 12.3497 30.169L12.4109 30.2277V30.228C12.6051 30.4035 12.854 30.4966 13.1393 30.4963C13.418 30.4963 13.7316 30.4073 14.0626 30.2194L26.0264 23.4107L30.1359 21.0717C30.6578 20.7748 30.9508 20.3917 30.9998 20.0014V19.9998C30.9508 19.6087 30.6578 19.2259 30.1359 18.9289L26.0261 16.5902L14.0627 9.78154C13.731 9.59325 13.4171 9.50391 13.1376 9.50391C12.8527 9.50391 12.6041 9.59677 12.41 9.7719H12.41Z' fill='%2300C1FF'/%3e%3cpath d='M12.411 30.2285L12.3497 30.1698C12.1099 29.9157 11.9683 29.5209 11.9683 29.0098V29.1301V10.8724V10.993C11.9683 10.4396 12.1334 10.0226 12.41 9.77268L22.622 20.0009L12.411 30.2285Z' fill='url(%23paint0_linear_173_14441)'/%3e%3cpath d='M26.0256 23.4102L22.6211 19.9996L26.0253 16.5896L30.1351 18.9283C30.657 19.2253 30.95 19.6081 30.9989 19.9993V20.0008C30.95 20.3911 30.657 20.7742 30.1351 21.0712L26.0256 23.4101' fill='url(%23paint1_linear_173_14441)'/%3e%3cpath d='M13.1374 30.4961C12.8522 30.4964 12.6033 30.4032 12.4092 30.2277V30.2275L22.6202 19.9999L26.0246 23.4104L14.0608 30.2191C13.7298 30.4071 13.4162 30.4961 13.1374 30.4961Z' fill='url(%23paint2_linear_173_14441)'/%3e%3cpath d='M22.6212 20.002L12.4092 9.7737C12.6033 9.59858 12.8519 9.50571 13.1368 9.50571C13.4163 9.50571 13.7302 9.59501 14.0618 9.78335L26.0253 16.592L22.6212 20.002' fill='url(%23paint3_linear_173_14441)'/%3e%3cpath d='M13.1394 30.6172C12.8542 30.6172 12.6049 30.524 12.4108 30.3486L12.4105 30.3489C12.4097 30.3481 12.4088 30.3473 12.4079 30.3466L12.3548 30.2947C12.3531 30.2931 12.3516 30.2912 12.3496 30.2893L12.4108 30.2279C12.6049 30.4034 12.8538 30.4966 13.1392 30.4962C13.4179 30.4962 13.7315 30.4073 14.0625 30.2193L26.0263 23.4106L26.1029 23.4874L26.0253 23.5316L14.0625 30.3398C13.7608 30.5111 13.4739 30.6004 13.2147 30.6153C13.1896 30.6165 13.1645 30.6171 13.1394 30.6172' fill='url(%23paint4_linear_173_14441)'/%3e%3cpath d='M12.3497 30.2891C12.1099 30.0349 11.9683 29.6406 11.9683 29.1292V29.0089C11.9683 29.52 12.1099 29.9146 12.3497 30.1688L12.4109 30.2275L12.3497 30.2891Z' fill='url(%23paint5_linear_173_14441)'/%3e%3cpath d='M26.1025 23.4882L26.0259 23.4114L30.1349 21.0727C30.6568 20.7758 30.9498 20.3927 30.9987 20.0025C30.9987 20.1457 30.9668 20.2889 30.9035 20.4282C30.7756 20.7091 30.5194 20.9744 30.135 21.1934L26.1025 23.4883' fill='url(%23paint6_linear_173_14441)'/%3e%3cpath d='M30.9991 20C30.9501 19.6089 30.6571 19.2261 30.1353 18.9291L26.0259 16.5907L26.1025 16.5139H26.1029L30.1353 18.8088C30.7106 19.1365 30.9987 19.5682 30.9991 20Z' fill='url(%23paint7_linear_173_14441)'/%3e%3cpath d='M11.9683 10.9922V10.8661C11.9683 10.8206 11.9695 10.7761 11.9718 10.7329V10.7309C11.9718 10.7303 11.9718 10.7297 11.972 10.729V10.7242C11.9969 10.284 12.1334 9.94066 12.3497 9.71139L12.4099 9.77198C12.1334 10.0219 11.9683 10.4388 11.9683 10.9922Z' fill='url(%23paint8_linear_173_14441)'/%3e%3cpath d='M26.026 16.5898L14.0625 9.78115C13.7308 9.59285 13.417 9.50355 13.1375 9.50355C12.8525 9.50355 12.6039 9.59642 12.4099 9.77154L12.3496 9.71091C12.3684 9.69096 12.388 9.67172 12.4082 9.65322C12.4089 9.65255 12.4099 9.65188 12.4105 9.65125C12.6031 9.47747 12.849 9.3846 13.1314 9.38293H13.1375C13.417 9.38293 13.7308 9.47227 14.0625 9.66064L26.1029 16.5128L26.1026 16.513L26.026 16.5898Z' fill='url(%23paint9_linear_173_14441)'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_173_14441' x1='18.4943' y1='10.6794' x2='9.69389' y2='19.494' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2300A0FF'/%3e%3cstop offset='0.00657' stop-color='%2300A1FF'/%3e%3cstop offset='0.2601' stop-color='%2300BEFF'/%3e%3cstop offset='0.5122' stop-color='%2300D2FF'/%3e%3cstop offset='0.7604' stop-color='%2300DFFF'/%3e%3cstop offset='1' stop-color='%2300E3FF'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear_173_14441' x1='31.6348' y1='19.9407' x2='11.691' y2='19.9407' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFE000'/%3e%3cstop offset='0.4087' stop-color='%23FFBD00'/%3e%3cstop offset='0.7754' stop-color='orange'/%3e%3cstop offset='1' stop-color='%23FF9C00'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear_173_14441' x1='24.2172' y1='23.2425' x2='9.30414' y2='38.0705' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FF3A44'/%3e%3cstop offset='1' stop-color='%23C31162'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear_173_14441' x1='9.77725' y1='8.25731' x2='16.4237' y2='14.876' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2332A071'/%3e%3cstop offset='0.0685' stop-color='%232DA771'/%3e%3cstop offset='0.4762' stop-color='%2315CF74'/%3e%3cstop offset='0.8009' stop-color='%2306E775'/%3e%3cstop offset='1' stop-color='%2300F076'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear_173_14441' x1='24.2114' y1='25.6084' x2='12.2683' y2='37.5709' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23CC2E36'/%3e%3cstop offset='1' stop-color='%239C0E4E'/%3e%3c/linearGradient%3e%3clinearGradient id='paint5_linear_173_14441' x1='13.3285' y1='10.6804' x2='5.57625' y2='18.4453' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23008DE0'/%3e%3cstop offset='0.00657' stop-color='%23008DE0'/%3e%3cstop offset='0.2601' stop-color='%2300A7E0'/%3e%3cstop offset='0.5122' stop-color='%2300B8E0'/%3e%3cstop offset='0.7604' stop-color='%2300C4E0'/%3e%3cstop offset='1' stop-color='%2300C7E0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint6_linear_173_14441' x1='31.6346' y1='20.0018' x2='11.6929' y2='20.0018' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23E0C500'/%3e%3cstop offset='0.4087' stop-color='%23E0A600'/%3e%3cstop offset='0.7754' stop-color='%23E09100'/%3e%3cstop offset='1' stop-color='%23E08900'/%3e%3c/linearGradient%3e%3clinearGradient id='paint7_linear_173_14441' x1='31.6349' y1='20.0008' x2='11.6933' y2='20.0008' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFE840'/%3e%3cstop offset='0.4087' stop-color='%23FFCE40'/%3e%3cstop offset='0.7754' stop-color='%23FFBC40'/%3e%3cstop offset='1' stop-color='%23FFB540'/%3e%3c/linearGradient%3e%3clinearGradient id='paint8_linear_173_14441' x1='13.3201' y1='10.6927' x2='5.8533' y2='17.8475' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2340B8FF'/%3e%3cstop offset='0.00657' stop-color='%2340B9FF'/%3e%3cstop offset='0.2601' stop-color='%2340CEFF'/%3e%3cstop offset='0.5122' stop-color='%2340DDFF'/%3e%3cstop offset='0.7604' stop-color='%2340E7FF'/%3e%3cstop offset='1' stop-color='%2340EAFF'/%3e%3c/linearGradient%3e%3clinearGradient id='paint9_linear_173_14441' x1='9.76302' y1='10.4182' x2='15.0961' y2='15.76' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2365B895'/%3e%3cstop offset='0.0685' stop-color='%2362BD95'/%3e%3cstop offset='0.4762' stop-color='%2350DB97'/%3e%3cstop offset='0.8009' stop-color='%2344ED98'/%3e%3cstop offset='1' stop-color='%2340F498'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\" alt=\"Play Store icon\" />\n </a>\n\n </div>\n </div>\n </div>\n </div>\n ";class A extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}),this.shadowRoot&&(this.shadowRoot.append(b.content.cloneNode(!0),x,S),this.shadowRoot.addEventListener("click",(t=>{this.handleAccordion(t)})))}connectedCallback(){this.handleChangeView()}handleChangeView(){var t,e,n;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-desktop-mode-download-defly-button"),r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("defly-wallet-connect-modal-download-defly-view-back-button"),a=null===(n=this.shadowRoot)||void 0===n?void 0:n.querySelectorAll(".f_copy-button");i&&i.addEventListener("click",(()=>{this.onClickDownload()})),r&&r.addEventListener("click",(()=>{this.onClickBack()})),a&&a.length&&a.forEach((t=>{t.addEventListener("click",(()=>{this.onClickCopy()}))})),this.renderQRCode()}handleAccordion(t){var e,n;if(t.target instanceof Element){if(!t.target.classList.contains("defly-wallet-accordion-toggle__button"))return;if(this.shadowRoot&&(null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)){const e=null===(n=t.target.parentElement)||void 0===n?void 0:n.parentElement;if(!e)return;if(e.classList.contains("defly-wallet-accordion-item--active"))return;const i=this.shadowRoot.querySelectorAll(".defly-wallet-accordion-item.defly-wallet-accordion-item--active");for(let t=0;t<i.length;t++)i[t].classList.remove("defly-wallet-accordion-item--active");e.classList.toggle("defly-wallet-accordion-item--active")}}}renderQRCode(){var t;const e=this.getAttribute("uri");if(e){const n=new r({width:330,height:330,type:"svg",data:e,image:p,dotsOptions:{color:"#000",type:"dots"},imageOptions:{imageSize:.21,crossOrigin:"anonymous"},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}}),i=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-connect-qr-code");i&&n.append(i)}}onClickDownload(){if(this.shadowRoot){const t=this.shadowRoot.getElementById("defly-wallet-connect-modal-desktop-mode");t&&(t.classList.remove("defly-wallet-connect-modal-desktop-mode--default"),t.classList.add("defly-wallet-connect-modal-desktop-mode--download"))}}onClickCopy(){if(this.shadowRoot){const t=this.getAttribute("uri");if(t){const e=document.createElement("textarea");e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.opacity="0",e.value=t,document.body.appendChild(e),e.focus(),e.select(),document.execCommand("copy"),document.body.removeChild(e)}}}onClickBack(){if(this.shadowRoot){const t=this.shadowRoot.getElementById("defly-wallet-connect-modal-desktop-mode");t&&(t.classList.add("defly-wallet-connect-modal-desktop-mode--default"),t.classList.remove("defly-wallet-connect-modal-desktop-mode--download"))}}}function C(t=!0){let e=g;const n=(0,i.d)();return t&&n&&(e=`${e}?browser=${encodeURIComponent(n)}`),e}var k=".defly-wallet-connect-modal-touch-screen-mode {\n display: grid;\n grid-template-columns: 1fr;\n gap: 46px;\n padding: 4px;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode--pending-message-view {\n gap: 56px;\n grid-template-rows: auto 48px;\n height: 100%;\n padding-bottom: 70px;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode__launch-defly-wallet-button,\n.defly-wallet-connect-modal-touch-screen-mode__install-defly-wallet-button {\n display: block;\n padding: 14px;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 15px;\n line-height: 26px;\n letter-spacing: -0.09px;\n font-weight: 500;\n margin: 0 40px;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode__launch-defly-wallet-button {\n margin-bottom: 45px;\n background: linear-gradient(90deg, #3E38B9, #413AAA);\n color: #ffffff;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode__install-defly-wallet-button {\n margin-bottom: 20px;\n background-color: #494949;\n color: #ffffff;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode__new-to-defly-box {\n position: relative;\n margin-bottom: 5px;\n}\n\n.defly-wallet-connect-modal-touch-screen-mode__new-to-defly-box__text {\n color: #999999;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.04px;\n text-align: center;\n}\n.defly-wallet-connect-modal-touch-screen-mode__new-to-defly-box__text a {\n color: inherit;\n}";o(k);const I=document.createElement("template");class E extends HTMLElement{constructor(){var t;if(super(),this.attachShadow({mode:"open"}),I.innerHTML='\n <div class="defly-wallet-connect-modal-touch-screen-mode">\n <defly-wallet-connect-modal-information-section></defly-wallet-connect-modal-information-section>\n\n <div>\n <a\n id="defly-wallet-connect-modal-touch-screen-mode-launch-defly-wallet-button"\n class="defly-wallet-connect-modal-touch-screen-mode__launch-defly-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Launch Defly Wallet\n </a>\n\n <div\n class="defly-wallet-connect-modal-touch-screen-mode__new-to-defly-box">\n <p class="defly-wallet-connect-modal-touch-screen-mode__new-to-defly-box__text">\n New to <a href="https://defly.app/">Defly Wallet</a>?\n </p>\n </div>\n\n <a\n href="https://defly.app/download.html"\n class="defly-wallet-connect-modal-touch-screen-mode__install-defly-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Install Defly Wallet\n </a>\n </div>\n </div>\n',this.shadowRoot){const e=document.createElement("style");e.textContent=k,this.shadowRoot.append(I.content.cloneNode(!0),e);const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-touch-screen-mode-launch-defly-wallet-button"),r=this.getAttribute("uri");n&&r&&(n.setAttribute("href",function(t){let e=C(!1);(0,i.b)()&&!e.includes("-wc")&&(e=e.replace("://","-wc://"));let n=`${e}wc?uri=${encodeURIComponent(t)}`;const r=(0,i.d)();return(0,i.a)()&&(n=t),r&&(n=`${n}&browser=${encodeURIComponent(r)}`),n}(r)),n.addEventListener("click",(()=>{this.onClickLaunch()})))}}onClickLaunch(){if(I.innerHTML=`\n <div class="defly-wallet-connect-modal-touch-screen-mode defly-wallet-connect-modal-touch-screen-mode--pending-message-view">\n <defly-wallet-connect-modal-pending-message-section should-use-sound="${this.getAttribute("should-use-sound")}"></defly-wallet-connect-modal-pending-message-section>\n </div>\n `,this.shadowRoot){const t=document.createElement("style");t.textContent=k,this.shadowRoot.innerHTML="",this.shadowRoot.append(I.content.cloneNode(!0),t)}}}var _='@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;600&display=swap");\n@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;900&display=swap");\n.defly-wallet-modal {\n --defly-wallet-modal-font-family: "Spline Sans", sans-serif;\n --defly-wallet-connect-modal-headline-family: "Hanken Grotesk", sans-serif;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.defly-wallet-modal--select-account .defly-wallet-modal__body {\n width: 480px;\n height: 578px;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 20px;\n width: calc(100% - 40px);\n max-width: unset;\n height: calc(100 * var(--defly-wallet-vh));\n padding: 20px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s DeflyWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body::before {\n background-image: unset;\n}\n.defly-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--defly-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.defly-wallet-modal ul,\n.defly-wallet-modal ol,\n.defly-wallet-modal li {\n list-style-type: none;\n}\n\n.defly-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.defly-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.defly-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 979px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #131313;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 40px;\n animation: 0.3s DeflyWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n\n@media (max-width: 935px) {\n .defly-wallet-modal--desktop .defly-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes DeflyWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes DeflyWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}';o(_);const M=document.createElement("template"),D=(0,i.i)()?`${i.c} ${i.c}--mobile`:`${i.c} ${i.c}--desktop`;class P extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=_,(0,i.i)()?(M.innerHTML=`\n <div class="${D}">\n <div class="defly-wallet-modal__body" part="body">\n <defly-wallet-modal-header modal-id="${i.e}"></defly-wallet-modal-header/>\n \n <defly-wallet-modal-touch-screen-mode uri="${this.getAttribute("uri")}" should-use-sound="${this.getAttribute("should-use-sound")}"></defly-wallet-modal-touch-screen-mode>\n </div>\n </div>\n `,this.shadowRoot.append(M.content.cloneNode(!0),t)):(M.innerHTML=`\n <div class="${D}">\n <div class="defly-wallet-modal__body">\n <defly-wallet-modal-header modal-id="${i.e}"></defly-wallet-modal-header/>\n \n <defly-wallet-modal-desktop-mode id="defly-wallet-modal-desktop-mode" uri="${this.getAttribute("uri")}">\n </defly-wallet-modal-desktop-mode>\n </div>\n </div>\n `,this.shadowRoot.append(M.content.cloneNode(!0),t))}}}var T='@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;600&display=swap");\n@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;900&display=swap");\n.defly-wallet-modal {\n --defly-wallet-modal-font-family: "Spline Sans", sans-serif;\n --defly-wallet-connect-modal-headline-family: "Hanken Grotesk", sans-serif;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.defly-wallet-modal--select-account .defly-wallet-modal__body {\n width: 480px;\n height: 578px;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 20px;\n width: calc(100% - 40px);\n max-width: unset;\n height: calc(100 * var(--defly-wallet-vh));\n padding: 20px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s DeflyWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body::before {\n background-image: unset;\n}\n.defly-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--defly-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.defly-wallet-modal ul,\n.defly-wallet-modal ol,\n.defly-wallet-modal li {\n list-style-type: none;\n}\n\n.defly-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.defly-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.defly-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 979px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #131313;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 40px;\n animation: 0.3s DeflyWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n\n@media (max-width: 935px) {\n .defly-wallet-modal--desktop .defly-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes DeflyWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes DeflyWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.defly-wallet-redirect-modal {\n display: grid;\n grid-template-columns: 1fr;\n gap: 56px;\n grid-template-rows: auto 48px;\n height: 100%;\n padding: 4px;\n padding-bottom: 70px;\n}\n\n.defly-wallet-redirect-modal__content {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.defly-wallet-redirect-modal__content__title {\n margin: 20px 0 8px;\n color: #3c3c49;\n font-size: 18px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: -0.26px;\n}\n\n.defly-wallet-redirect-modal__content__description,\n.defly-wallet-redirect-modal__content__install-defly-text {\n color: #3c3c49;\n max-width: 271px;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.09px;\n text-align: center;\n}\n\n.defly-wallet-redirect-modal__content__description {\n margin-bottom: 24px;\n}\n\n.defly-wallet-redirect-modal__content__install-defly-text__link {\n color: #6b46fe;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.09px;\n text-align: center;\n}\n\n.defly-wallet-redirect-modal__launch-defly-wallet-button {\n display: block;\n padding: 14px;\n color: #ffffff;\n background-color: #6b46fe;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n}';o(T);const L=document.createElement("template");L.innerHTML=`\n <div class="defly-wallet-modal defly-wallet-modal--mobile">\n <div class="defly-wallet-modal__body">\n <defly-wallet-modal-header modal-id="${i.D}"></pera-wallet-modal-header/>\n <div class="defly-wallet-redirect-modal">\n <div class="defly-wallet-redirect-modal__content">\n <img src="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='120' height='38' viewBox='0 0 120 38'%3e %3cdefs%3e %3cclipPath id='a'%3e %3crect width='120' height='38' fill='white'/%3e %3c/clipPath%3e %3c/defs%3e %3cg transform='translate(18090 -8428)'%3e %3cg transform='translate(-18090 8428)' clip-path='url(%23a)'%3e %3crect width='36' height='36' rx='7.768' transform='translate(0 1)' fill='%23222222'/%3e %3cpath d='M112.25%2c37h-11.5A5.976%2c5.976%2c0%2c0%2c1%2c95%2c30.818V9.182A5.976%2c5.976%2c0%2c0%2c1%2c100.75%2c3h11.5A5.976%2c5.976%2c0%2c0%2c1%2c118%2c9.182V30.818A5.976%2c5.976%2c0%2c0%2c1%2c112.25%2c37Z' transform='translate(0 -1)' fill='rgba(107%2c70%2c254%2c0.1)'/%3e %3cpath d='M112.25%2c38.5h-11.5a7.484%2c7.484%2c0%2c0%2c1-7.25-7.682V9.182A7.484%2c7.484%2c0%2c0%2c1%2c100.75%2c1.5h11.5a7.484%2c7.484%2c0%2c0%2c1%2c7.25%2c7.682V30.818A7.484%2c7.484%2c0%2c0%2c1%2c112.25%2c38.5Zm-11.5-34A4.487%2c4.487%2c0%2c0%2c0%2c96.5%2c9.182V30.818a4.487%2c4.487%2c0%2c0%2c0%2c4.25%2c4.682h11.5a4.487%2c4.487%2c0%2c0%2c0%2c4.25-4.682V9.182A4.487%2c4.487%2c0%2c0%2c0%2c112.25%2c4.5Z' transform='translate(0 -1)' fill='white'/%3e %3cpath d='M78.927%2c16.594H52v-3H71.683l-2.534-2.534L71.27%2c8.939Z' fill='white'/%3e %3cpath d='M59.73%2c30.655%2c52.073%2c23H79v3H59.317l2.534%2c2.534Z' fill='white'/%3e %3cpath d='M109.565%2c30.175h-5.826a1.5%2c1.5%2c0%2c1%2c1%2c0-3h5.826a1.5%2c1.5%2c0%2c0%2c1%2c0%2c3Z' fill='white'/%3e %3c/g%3e %3cg transform='translate(-18227.544 8408.866)'%3e %3cpath d='M168.632%2c47.566%2c155.742%2c26l-12.89%2c21.566%2c12.89-7.354Z' transform='translate(0)' fill='white'/%3e %3cpath d='M191.634%2c257.081l-10.639-5.607-10.639%2c5.607%2c10.639-3.464Z' transform='translate(-25.252 -207.321)' fill='white'/%3e %3c/g%3e %3c/g%3e%3c/svg%3e" />\n\n <h1 class="defly-wallet-redirect-modal__content__title">\n Can't Launch Defly\n </h1>\n\n <p class="defly-wallet-redirect-modal__content__description">\n We couldn't redirect you to Defly Wallet automatically. Please try again.\n </p>\n\n <p class="defly-wallet-redirect-modal__content__install-defly-text">\n Don't have Defly Wallet installed yet?\n <br />\n \n <a\n id="defly-wallet-redirect-modal-download-defly-link"\n class="defly-wallet-redirect-modal__content__install-defly-text__link"\n href="https://defly.app/ "\n rel="noopener noreferrer"\n target="_blank">\n Tap here to install.\n </a>\n </p>\n </div>\n\n <a\n id="defly-wallet-redirect-modal-launch-defly-link"\n class="defly-wallet-redirect-modal__launch-defly-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Launch Defly Wallet\n </a>\n </div>\n </div>\n </div>\n`;class B extends HTMLElement{constructor(){var t,e;if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const n=document.createElement("style");n.textContent=T,this.shadowRoot.append(L.content.cloneNode(!0),n);const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-redirect-modal-download-defly-link");null==i||i.addEventListener("click",(()=>{this.onClose()}));const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("defly-wallet-redirect-modal-launch-defly-link");null==r||r.addEventListener("click",(()=>{this.onClose(),window.open(C(),"_blank")}))}}connectedCallback(){const t=window.open(C(),"_blank");t&&!t.closed&&this.onClose()}onClose(){(0,i.r)(i.D)}}var F="data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='101.962' height='90.114' viewBox='0 0 101.962 90.114'%3e %3cg transform='translate(0.004)'%3e %3cpath d='M244.81%2c107.44%2c193.834%2c26l-50.986%2c81.44%2c50.986-27.77Z' transform='translate(-142.852 -26)' fill='white'/%3e %3cpath d='M254.505%2c273.648l-42.072-22.175-42.076%2c22.175%2c42.076-13.7Z' transform='translate(-161.446 -183.534)' fill='white'/%3e %3c/g%3e%3c/svg%3e",R=".defly-wallet-connect-modal-information-section {\n padding: 12px;\n display: flex;\n align-items: center;\n flex-flow: column;\n justify-content: center;\n}\n.defly-wallet-connect-modal-information-section--mobile {\n padding: 0;\n margin-top: 20px;\n}\n.defly-wallet-connect-modal-information-section--mobile .defly-wallet-connect-modal-information-section__defly-icon {\n margin-bottom: 21px;\n max-width: 70px;\n}\n.defly-wallet-connect-modal-information-section--mobile .defly-wallet-connect-modal-information-section__title {\n font-size: 34px;\n line-height: 32px;\n}\n\n.defly-wallet-connect-modal-information-section__defly-icon {\n margin-bottom: 32px;\n}\n\n.defly-wallet-connect-modal-information-section__title {\n margin-top: 0;\n margin-bottom: 0;\n color: #fff;\n font-size: 52px;\n line-height: 48px;\n font-weight: 900;\n white-space: pre-line;\n text-align: center;\n letter-spacing: 0;\n font-family: var(--defly-wallet-connect-modal-headline-family), sans-serif;\n}\n\n.defly-wallet-connect-modal-information-section__download-defly-button {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 20px auto 0;\n padding: 0;\n color: #999999;\n background-color: transparent;\n outline: none;\n border: none;\n font-weight: 600;\n font-size: 13px;\n line-height: 20px;\n letter-spacing: 0.01px;\n cursor: pointer;\n}\n.defly-wallet-connect-modal-information-section__download-defly-button:hover {\n opacity: 0.8;\n}\n\n@media (max-width: 935px) {\n .defly-wallet-connect-modal-information-section--desktop {\n padding: 0;\n }\n .defly-wallet-connect-modal-information-section--desktop .defly-wallet-connect-modal-information-section__defly-icon {\n max-width: 70px;\n margin-bottom: 21px;\n }\n .defly-wallet-connect-modal-information-section--desktop .defly-wallet-connect-modal-information-section__title {\n font-size: 34px;\n line-height: 32px;\n }\n .defly-wallet-connect-modal-information-section__download-defly-button {\n display: none;\n }\n}";o(R);const N=document.createElement("template"),V=(0,i.i)()?"defly-wallet-connect-modal-information-section defly-wallet-connect-modal-information-section--mobile":"defly-wallet-connect-modal-information-section defly-wallet-connect-modal-information-section--desktop";N.innerHTML=`\n <section class="${V}">\n <img src="${F}" class="defly-wallet-connect-modal-information-section__defly-icon" alt="Defly Wallet" />\n <h1 class="defly-wallet-connect-modal-information-section__title">Secure \n wallet & \n trading</h1>\n \n <button\n id="defly-wallet-connect-modal-information-section-download-defly-button"\n class="defly-wallet-connect-modal-information-section__download-defly-button">\n <img src="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='2' y='2' width='4.66667' height='4.66667' rx='1.2' stroke='%23999999' stroke-width='1.5'/%3e%3crect x='2' y='9.33203' width='4.66667' height='4.66667' rx='1.2' stroke='%23999999' stroke-width='1.5'/%3e%3crect x='9.33325' y='2' width='4.66667' height='4.66667' rx='1.2' stroke='%23999999' stroke-width='1.5'/%3e%3cpath d='M8.70581 9.5293H10.9411' stroke='%23999999' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M13.1765 12.668L14.6667 12.668' stroke='%23999999' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M13.1765 14L14.6667 14' stroke='%23999999' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M11.686 14L13.1762 14' stroke='%23999999' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M12.4314 9.5293H14.6667' stroke='%23999999' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M8.70581 10.2754H12.4313' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 11.7656H11.6862' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 12.5117H11.6862' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M8.70581 13.2539H10.196' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M8.70581 14H10.196' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 11.0195H12.4313' stroke='%23999999' stroke-width='1.25' stroke-linejoin='round'/%3e%3c/svg%3e" alt="QR Icon" />\n Download\n </button>\n </section>\n`;class z extends HTMLElement{constructor(){var t;if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const e=document.createElement("style");e.textContent=R,this.shadowRoot.append(N.content.cloneNode(!0),e);const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-information-section-download-defly-button");n&&n.addEventListener("click",(()=>{this.onClickDownload()}))}}onClickDownload(){if(this.shadowRoot){const t=this.shadowRoot.host.parentElement;t&&(t.classList.remove("defly-wallet-connect-modal-desktop-mode--default"),t.classList.add("defly-wallet-connect-modal-desktop-mode--download"))}}}var G='@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;600&display=swap");\n@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;900&display=swap");\n.defly-wallet-modal {\n --defly-wallet-modal-font-family: "Spline Sans", sans-serif;\n --defly-wallet-connect-modal-headline-family: "Hanken Grotesk", sans-serif;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.defly-wallet-modal--select-account .defly-wallet-modal__body {\n width: 480px;\n height: 578px;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 20px;\n width: calc(100% - 40px);\n max-width: unset;\n height: calc(100 * var(--defly-wallet-vh));\n padding: 20px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s DeflyWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body::before {\n background-image: unset;\n}\n.defly-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--defly-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.defly-wallet-modal ul,\n.defly-wallet-modal ol,\n.defly-wallet-modal li {\n list-style-type: none;\n}\n\n.defly-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.defly-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.defly-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 979px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #131313;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 40px;\n animation: 0.3s DeflyWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n\n@media (max-width: 935px) {\n .defly-wallet-modal--desktop .defly-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes DeflyWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes DeflyWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.defly-wallet-connect-modal-pending-message-section {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto 48px;\n gap: 56px;\n height: 100%;\n padding: 4px;\n padding-bottom: 70px;\n}\n\n.defly-wallet-connect-modal-pending-message {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view {\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n height: 100%;\n margin-top: 10px;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__image {\n margin: 0 auto;\n display: block;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__title {\n margin: 16px 0 12px;\n color: #ffffff;\n text-align: center;\n font-size: 18px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.26px;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__description {\n color: #999999;\n font-size: 14px;\n text-align: center;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.01px;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__button {\n display: block;\n width: 100%;\n padding: 14px;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n color: #ffffff;\n background-color: #6b46fe;\n border: none;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor {\n display: flex;\n gap: 12px;\n margin-bottom: 20px;\n padding: 16px;\n background: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border-radius: 12px;\n text-decoration: none;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__image {\n width: 24px;\n height: 24px;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.1px;\n color: #3c3c49;\n}\n.defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__description {\n /* stylelint-disable value-no-vendor-prefix */\n /* stylelint-disable property-no-vendor-prefix */\n display: -webkit-box;\n max-width: 100%;\n -webkit-line-clamp: 2;\n /* autoprefixer: ignore next */\n -webkit-box-orient: vertical;\n overflow: hidden;\n /* stylelint-enable value-no-vendor-prefix */\n /* stylelint-enable property-no-vendor-prefix */\n margin: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n letter-spacing: 0.01px;\n color: #9d9dae;\n}\n\n.defly-wallet-connect-modal-pending-message__animation-wrapper {\n width: 56px;\n height: 56px;\n background-color: #6b46fe;\n border-radius: 50%;\n}\n\n.defly-wallet-connect-modal-pending-message__text {\n max-width: 271px;\n margin-top: 20px;\n color: #ffffff;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n letter-spacing: -0.26px;\n}\n\n.defly-wallet-connect-modal-pending-message__cancel-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 14px;\n color: #6a6a81;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n border: none;\n}';o(G);const W=document.createElement("template");W.innerHTML=`\n <div class="defly-wallet-connect-modal-pending-message-section">\n <div class="defly-wallet-connect-modal-pending-message">\n <img src="${F}" alt="Defly Wallet Logo" />\n\n <div class="defly-wallet-connect-modal-pending-message__text">\n Please wait while we connect you to Defly Wallet...\n </div>\n </div>\n\n <button\n id="defly-wallet-connect-modal-pending-message-cancel-button"\n class="defly-wallet-button defly-wallet-connect-modal-pending-message__cancel-button">\n Cancel\n </button>\n </div>\n\n <div id="defly-wallet-connect-modal-pending-message-audio-wrapper"></div>\n`;const O=`\n <div class="defly-wallet-connect-modal-pending-message--try-again-view">\n <div>\n <img class="defly-wallet-connect-modal-pending-message--try-again-view__image" src="${F}" alt="Defly Wallet" />\n\n <h1 class="defly-wallet-connect-modal-pending-message--try-again-view__title">\n Couldn’t establish connection\n </h1>\n\n <p class="defly-wallet-connect-modal-pending-message--try-again-view__description">\n Having issues? Before trying again, make sure to read the support article below and apply the possible solutions.\n </p>\n </div>\n\n <div>\n <a\n href=" https://docs.defly.app/app/dapp-browser"\n target="_blank"\n rel="noopener noreferrer"\n class="defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor">\n <img\n class="defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__image"\n src="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 22.3199C7.72 22.3199 7.42998 22.2499 7.16998 22.1099C6.59998 21.8099 6.25 21.2099 6.25 20.5699V19.15C3.23 18.84 1.25 16.6199 1.25 13.4399V7.43994C1.25 3.99994 3.56 1.68994 7 1.68994H17C20.44 1.68994 22.75 3.99994 22.75 7.43994V13.4399C22.75 16.8799 20.44 19.1899 17 19.1899H13.23L8.96997 22.03C8.67997 22.22 8.34 22.3199 8 22.3199ZM7 3.17993C4.42 3.17993 2.75 4.84993 2.75 7.42993V13.43C2.75 16.01 4.42 17.68 7 17.68C7.41 17.68 7.75 18.02 7.75 18.43V20.56C7.75 20.69 7.83 20.75 7.88 20.78C7.93001 20.81 8.03001 20.84 8.14001 20.77L12.59 17.81C12.71 17.73 12.86 17.68 13.01 17.68H17.01C19.59 17.68 21.26 16.01 21.26 13.43V7.42993C21.26 4.84993 19.59 3.17993 17.01 3.17993H7ZM11.9998 12.11C11.5898 12.11 11.2498 11.77 11.2498 11.36V11.15C11.2498 10.0038 12.0798 9.4336 12.4082 9.20798L12.4198 9.20001C12.7898 8.95001 12.9098 8.78002 12.9098 8.52002C12.9098 8.02002 12.4998 7.60999 11.9998 7.60999C11.4998 7.60999 11.0898 8.02002 11.0898 8.52002C11.0898 8.93002 10.7498 9.27002 10.3398 9.27002C9.92984 9.27002 9.58984 8.93002 9.58984 8.52002C9.58984 7.19002 10.6698 6.10999 11.9998 6.10999C13.3298 6.10999 14.4098 7.19002 14.4098 8.52002C14.4098 9.66002 13.5698 10.23 13.2598 10.44C12.8698 10.7 12.7498 10.87 12.7498 11.15V11.36C12.7498 11.78 12.4098 12.11 11.9998 12.11ZM11.25 13.85C11.25 14.26 11.58 14.6 12 14.6C12.42 14.6 12.75 14.26 12.75 13.85C12.75 13.44 12.41 13.1 12 13.1C11.59 13.1 11.25 13.44 11.25 13.85Z' fill='%236B46FE'/%3e%3c/svg%3e"\n alt="Help Icon"\n />\n\n <div>\n <div\n class="defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title-wrapper">\n <h1\n class="defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title">\n Resolving WalletConnect issues\n </h1>\n\n <img src="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.3287 10.0983C10.9574 10.0983 10.6564 9.79734 10.6564 9.42604L10.6564 6.29525L5.14866 11.803C4.88611 12.0655 4.46044 12.0655 4.19789 11.803C3.93534 11.5404 3.93534 11.1147 4.19789 10.8522L9.70561 5.34447L6.57482 5.34447C6.20352 5.34447 5.90252 5.04347 5.90252 4.67218C5.90252 4.30088 6.20352 3.99988 6.57482 3.99988L11.3287 3.99988C11.507 3.99988 11.678 4.07071 11.8041 4.19679C11.9301 4.32287 12.001 4.49387 12.001 4.67218L12.001 9.42604C12.001 9.79734 11.7 10.0983 11.3287 10.0983Z' fill='%239D9DAE'/%3e%3c/svg%3e" alt="Send Icon"/>\n </div>\n\n <p\n class="defly-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__description">\n Unfortunately there are several known issues related to WalletConnect that our team is working on. Some of these issues are related to the WalletConnect JavaScript implementation on the dApp ...\n </p>\n </div>\n </a>\n\n <button id="defly-wallet-connect-modal-pending-message-try-again-button" class="defly-wallet-connect-button defly-wallet-connect-modal-pending-message--try-again-view__button">\n Close & Try Again\n </button>\n </div>\n </div>\n `;class Z extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=G,this.shadowRoot.append(W.content.cloneNode(!0),t)}}connectedCallback(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-pending-message-cancel-button");null==e||e.addEventListener("click",(()=>{this.onClose()})),this.addAudioForConnection(),setTimeout((()=>{var t;if(W.innerHTML=O,this.shadowRoot){const e=document.createElement("style");e.textContent=G,this.shadowRoot.innerHTML="",this.shadowRoot.append(W.content.cloneNode(!0),e);const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-pending-message-try-again-button");null==n||n.addEventListener("click",(()=>{this.onClose()}))}}),3e4)}onClose(){(0,i.r)(i.e)}addAudioForConnection(){var t;if("true"===this.getAttribute("should-use-sound")&&(0,i.b)()){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-connect-modal-pending-message-audio-wrapper"),n=document.createElement("audio");n.src="https://defly-walletconnect.s3.eu-central-1.amazonaws.com/audio.mp3",n.autoplay=!0,n.loop=!0,null==e||e.appendChild(n)}}}var Y={v:"5.7.1",fr:25,ip:0,op:100,w:1e3,h:1e3,nm:"Animation",ddd:0,assets:[],layers:[{ddd:0,ind:1,ty:1,nm:"Circle",sr:1,ks:{o:{a:0,k:73,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:18,s:[724,614,0],to:[-35,2.333,0],ti:[35,-2.333,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:25,s:[514,628,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:53,s:[514,628,0],to:[35,-2.333,0],ti:[-35,2.333,0]},{t:62,s:[724,614,0]}],ix:2},a:{a:0,k:[608.861,710.127,0],ix:1},s:{a:0,k:[79,79,100],ix:6}},ao:0,hasMask:!0,masksProperties:[{inv:!1,mode:"a",pt:{a:0,k:{i:[[27.614,0],[0,-27.614],[-27.614,0],[0,27.614]],o:[[-27.614,0],[0,27.614],[27.614,0],[0,-27.614]],v:[[608,662],[558,712],[608,762],[658,712]],c:!0},ix:1},o:{a:0,k:100,ix:3},x:{a:0,k:0,ix:4},nm:"Mask 1"}],ef:[{ty:21,nm:"Fill",np:9,mn:"ADBE Fill",ix:1,en:1,ef:[{ty:10,nm:"Fill Mask",mn:"ADBE Fill-0001",ix:1,v:{a:0,k:0,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Fill-0007",ix:2,v:{a:0,k:0,ix:2}},{ty:2,nm:"Color",mn:"ADBE Fill-0002",ix:3,v:{a:0,k:[.748628020287,.656362950802,.86274510622,1],ix:3}},{ty:7,nm:"Invert",mn:"ADBE Fill-0006",ix:4,v:{a:0,k:0,ix:4}},{ty:0,nm:"Horizontal Feather",mn:"ADBE Fill-0003",ix:5,v:{a:0,k:0,ix:5}},{ty:0,nm:"Vertical Feather",mn:"ADBE Fill-0004",ix:6,v:{a:0,k:0,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Fill-0005",ix:7,v:{a:0,k:1,ix:7}}]}],sw:1e3,sh:1e3,sc:"#ffffff",ip:0,op:754,st:0,bm:0},{ddd:0,ind:2,ty:4,nm:"Layer 1 Outlines 2",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[511.524,444,0],ix:2},a:{a:0,k:[157.775,147.25,0],ix:1},s:{a:0,k:[46,46,100],ix:6}},ao:0,ef:[{ty:21,nm:"Fill",np:9,mn:"ADBE Fill",ix:1,en:1,ef:[{ty:10,nm:"Fill Mask",mn:"ADBE Fill-0001",ix:1,v:{a:0,k:0,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Fill-0007",ix:2,v:{a:0,k:0,ix:2}},{ty:2,nm:"Color",mn:"ADBE Fill-0002",ix:3,v:{a:0,k:[.054901964962,.050980396569,.06274510175,1],ix:3}},{ty:7,nm:"Invert",mn:"ADBE Fill-0006",ix:4,v:{a:0,k:0,ix:4}},{ty:0,nm:"Horizontal Feather",mn:"ADBE Fill-0003",ix:5,v:{a:0,k:0,ix:5}},{ty:0,nm:"Vertical Feather",mn:"ADBE Fill-0004",ix:6,v:{a:0,k:0,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Fill-0005",ix:7,v:{a:0,k:1,ix:7}}]}],shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[157.525,133.595],[0,-133.596],[-157.525,133.595],[0,42.488]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[157.775,133.846],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 2",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:754,st:0,bm:0},{ddd:0,ind:3,ty:4,nm:"Layer 1 Outlines",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[511.524,444,0],ix:2},a:{a:0,k:[157.775,147.25,0],ix:1},s:{a:0,k:[46,46,100],ix:6}},ao:0,ef:[{ty:21,nm:"Fill",np:9,mn:"ADBE Fill",ix:1,en:1,ef:[{ty:10,nm:"Fill Mask",mn:"ADBE Fill-0001",ix:1,v:{a:0,k:0,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Fill-0007",ix:2,v:{a:0,k:0,ix:2}},{ty:2,nm:"Color",mn:"ADBE Fill-0002",ix:3,v:{a:0,k:[.058823533356,.054901964962,.06274510175,1],ix:3}},{ty:7,nm:"Invert",mn:"ADBE Fill-0006",ix:4,v:{a:0,k:0,ix:4}},{ty:0,nm:"Horizontal Feather",mn:"ADBE Fill-0003",ix:5,v:{a:0,k:0,ix:5}},{ty:0,nm:"Vertical Feather",mn:"ADBE Fill-0004",ix:6,v:{a:0,k:0,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Fill-0005",ix:7,v:{a:0,k:1,ix:7}}]}],shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[130.021,34.263],[0,-34.264],[-130.021,34.263],[0,-8.067]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[157.775,259.986],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:754,st:0,bm:0},{ddd:0,ind:4,ty:1,nm:"White Solid 2",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[512,508,0],ix:2},a:{a:0,k:[500,500,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,hasMask:!0,masksProperties:[{inv:!1,mode:"a",pt:{a:0,k:{i:[[11.046,0],[0,0],[0,-11.046],[0,0],[-11.046,0],[0,0],[0,11.046],[0,0]],o:[[0,0],[-11.046,0],[0,0],[0,11.046],[0,0],[11.046,0],[0,0],[0,-11.046]],v:[[648,314],[344,314],[324,334],[324,546],[344,566],[648,566],[668,546],[668,334]],c:!0},ix:1},o:{a:0,k:100,ix:3},x:{a:0,k:0,ix:4},nm:"Mask 1"}],ef:[{ty:22,nm:"Stroke",np:13,mn:"ADBE Stroke",ix:1,en:1,ef:[{ty:10,nm:"Path",mn:"ADBE Stroke-0001",ix:1,v:{a:0,k:1,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Stroke-0010",ix:2,v:{a:0,k:0,ix:2}},{ty:7,nm:"Stroke Sequentially",mn:"ADBE Stroke-0011",ix:3,v:{a:0,k:1,ix:3}},{ty:2,nm:"Color",mn:"ADBE Stroke-0002",ix:4,v:{a:0,k:[.525490224361,.231372565031,.972549080849,1],ix:4}},{ty:0,nm:"Brush Size",mn:"ADBE Stroke-0003",ix:5,v:{a:0,k:2,ix:5}},{ty:0,nm:"Brush Hardness",mn:"ADBE Stroke-0004",ix:6,v:{a:0,k:.75,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Stroke-0005",ix:7,v:{a:0,k:1,ix:7}},{ty:0,nm:"Start",mn:"ADBE Stroke-0008",ix:8,v:{a:0,k:0,ix:8}},{ty:0,nm:"End",mn:"ADBE Stroke-0009",ix:9,v:{a:0,k:100,ix:9}},{ty:7,nm:"Spacing",mn:"ADBE Stroke-0006",ix:10,v:{a:0,k:15,ix:10}},{ty:7,nm:"Paint Style",mn:"ADBE Stroke-0007",ix:11,v:{a:0,k:1,ix:11}}]}],sw:1e3,sh:1e3,sc:"#ffffff",ip:0,op:754,st:0,bm:0},{ddd:0,ind:5,ty:1,nm:"White Solid 2",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[512,388,0],ix:2},a:{a:0,k:[500,500,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,hasMask:!0,masksProperties:[{inv:!1,mode:"a",pt:{a:0,k:{i:[[11.046,0],[0,0],[0,-11.046],[0,0],[-11.046,0],[0,0],[0,11.046],[0,0]],o:[[0,0],[-11.046,0],[0,0],[0,11.046],[0,0],[11.046,0],[0,0],[0,-11.046]],v:[[648,314],[344,314],[324,334],[324,386],[344,406],[648,406],[668,386],[668,334]],c:!0},ix:1},o:{a:0,k:100,ix:3},x:{a:0,k:0,ix:4},nm:"Mask 1"}],ef:[{ty:22,nm:"Stroke",np:13,mn:"ADBE Stroke",ix:1,en:1,ef:[{ty:10,nm:"Path",mn:"ADBE Stroke-0001",ix:1,v:{a:0,k:1,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Stroke-0010",ix:2,v:{a:0,k:0,ix:2}},{ty:7,nm:"Stroke Sequentially",mn:"ADBE Stroke-0011",ix:3,v:{a:0,k:1,ix:3}},{ty:2,nm:"Color",mn:"ADBE Stroke-0002",ix:4,v:{a:0,k:[.525490224361,.231372565031,.972549080849,1],ix:4}},{ty:0,nm:"Brush Size",mn:"ADBE Stroke-0003",ix:5,v:{a:0,k:2,ix:5}},{ty:0,nm:"Brush Hardness",mn:"ADBE Stroke-0004",ix:6,v:{a:0,k:.75,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Stroke-0005",ix:7,v:{a:0,k:1,ix:7}},{ty:0,nm:"Start",mn:"ADBE Stroke-0008",ix:8,v:{a:0,k:0,ix:8}},{ty:0,nm:"End",mn:"ADBE Stroke-0009",ix:9,v:{a:0,k:100,ix:9}},{ty:7,nm:"Spacing",mn:"ADBE Stroke-0006",ix:10,v:{a:0,k:15,ix:10}},{ty:7,nm:"Paint Style",mn:"ADBE Stroke-0007",ix:11,v:{a:0,k:1,ix:11}}]}],sw:1e3,sh:1e3,sc:"#ffffff",ip:0,op:754,st:0,bm:0},{ddd:0,ind:7,ty:1,nm:"Button",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[510,736,0],ix:2},a:{a:0,k:[497.468,353.165,0],ix:1},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:32,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:35,s:[79,79,100]},{t:43,s:[100,100,100]}],ix:6}},ao:0,hasMask:!0,masksProperties:[{inv:!1,mode:"a",pt:{a:0,k:{i:[[11.046,0],[0,0],[0,-11.046],[0,0],[-11.046,0],[0,0],[0,11.046],[0,0]],o:[[0,0],[-11.046,0],[0,0],[0,11.046],[0,0],[11.046,0],[0,0],[0,-11.046]],v:[[648,314],[344,314],[324,334],[324,386],[344,406],[648,406],[668,386],[668,334]],c:!0},ix:1},o:{a:0,k:100,ix:3},x:{a:0,k:0,ix:4},nm:"Mask 1"}],ef:[{ty:21,nm:"Fill",np:9,mn:"ADBE Fill",ix:1,en:1,ef:[{ty:10,nm:"Fill Mask",mn:"ADBE Fill-0001",ix:1,v:{a:0,k:0,ix:1}},{ty:7,nm:"All Masks",mn:"ADBE Fill-0007",ix:2,v:{a:0,k:0,ix:2}},{ty:2,nm:"Color",mn:"ADBE Fill-0002",ix:3,v:{a:0,k:[.686274528503,.290196090937,.937254965305,1],ix:3}},{ty:7,nm:"Invert",mn:"ADBE Fill-0006",ix:4,v:{a:0,k:0,ix:4}},{ty:0,nm:"Horizontal Feather",mn:"ADBE Fill-0003",ix:5,v:{a:0,k:0,ix:5}},{ty:0,nm:"Vertical Feather",mn:"ADBE Fill-0004",ix:6,v:{a:0,k:0,ix:6}},{ty:0,nm:"Opacity",mn:"ADBE Fill-0005",ix:7,v:{a:0,k:1,ix:7}}]}],sw:1e3,sh:1e3,sc:"#ffffff",ip:0,op:754,st:0,bm:0},{ddd:0,ind:8,ty:4,nm:"Shape Layer 1",parent:9,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[500,493.102,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,ef:[{ty:25,nm:"Drop Shadow",np:8,mn:"ADBE Drop Shadow",ix:1,en:1,ef:[{ty:2,nm:"Shadow Color",mn:"ADBE Drop Shadow-0001",ix:1,v:{a:0,k:[0,0,0,1],ix:1}},{ty:0,nm:"Opacity",mn:"ADBE Drop Shadow-0002",ix:2,v:{a:0,k:87.5,ix:2}},{ty:0,nm:"Direction",mn:"ADBE Drop Shadow-0003",ix:3,v:{a:0,k:173,ix:3}},{ty:0,nm:"Distance",mn:"ADBE Drop Shadow-0004",ix:4,v:{a:0,k:8,ix:4}},{ty:0,nm:"Softness",mn:"ADBE Drop Shadow-0005",ix:5,v:{a:0,k:125,ix:5}},{ty:7,nm:"Shadow Only",mn:"ADBE Drop Shadow-0006",ix:6,v:{a:0,k:0,ix:6}}]}],shapes:[{ty:"gr",it:[{ty:"rc",d:1,s:{a:0,k:[452,730],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:20,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:0,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[1,1,1,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[6,-7],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Rectangle 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:754,st:0,bm:0},{ddd:0,ind:9,ty:1,nm:"White Solid 1",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.667,y:1},o:{x:.333,y:0},t:1,s:[500,562,0],to:[0,-23.333,0],ti:[0,23.333,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:13,s:[500,422,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.667,y:1},o:{x:.333,y:0},t:65,s:[500,422,0],to:[0,23.333,0],ti:[0,-23.333,0]},{t:79,s:[500,562,0]}],ix:2},a:{a:0,k:[500,500,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,hasMask:!0,masksProperties:[{inv:!1,mode:"a",pt:{a:0,k:{i:[[11.046,0],[0,0],[0,-11.046],[0,0],[-11.046,0],[0,0],[0,11.046],[0,0]],o:[[0,0],[-11.046,0],[0,0],[0,11.046],[0,0],[11.046,0],[0,0],[0,-11.046]],v:[[712,122],[302,122],[282,142],[282,830],[302,850],[712,850],[732,830],[732,142]],c:!0},ix:1},o:{a:0,k:100,ix:3},x:{a:0,k:0,ix:4},nm:"Mask 1"}],ef:[{ty:25,nm:"Drop Shadow",np:8,mn:"ADBE Drop Shadow",ix:1,en:1,ef:[{ty:2,nm:"Shadow Color",mn:"ADBE Drop Shadow-0001",ix:1,v:{a:0,k:[0,0,0,1],ix:1}},{ty:0,nm:"Opacity",mn:"ADBE Drop Shadow-0002",ix:2,v:{a:0,k:87.5,ix:2}},{ty:0,nm:"Direction",mn:"ADBE Drop Shadow-0003",ix:3,v:{a:0,k:173,ix:3}},{ty:0,nm:"Distance",mn:"ADBE Drop Shadow-0004",ix:4,v:{a:0,k:8,ix:4}},{ty:0,nm:"Softness",mn:"ADBE Drop Shadow-0005",ix:5,v:{a:0,k:125,ix:5}},{ty:7,nm:"Shadow Only",mn:"ADBE Drop Shadow-0006",ix:6,v:{a:0,k:0,ix:6}}]}],sw:1e3,sh:1e3,sc:"#ffffff",ip:0,op:754,st:0,bm:0}],markers:[]},H='.defly-wallet-sign-txn-toast {\n --defly-wallet-sign-txn-toast-width: 422px;\n --defly-wallet-sign-txn-toast-height: 134px;\n --defly-wallet-sign-txn-toast-font-family: "Inter", sans-serif;\n position: fixed;\n bottom: 28px;\n right: 35px;\n z-index: 11;\n overflow: hidden;\n width: var(--defly-wallet-sign-txn-toast-width);\n height: var(--defly-wallet-sign-txn-toast-height);\n background: #edeffb;\n border-radius: 8px;\n animation: 0.2s DeflyWalletSignTxnToastSlideIn ease-out;\n}\n.defly-wallet-sign-txn-toast * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--defly-wallet-sign-txn-toast-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.defly-wallet-sign-txn-toast ul,\n.defly-wallet-sign-txn-toast ol,\n.defly-wallet-sign-txn-toast li {\n list-style-type: none;\n}\n\n.defly-wallet-sign-txn-toast__header__close-button {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 20px;\n height: 20px;\n margin: 0;\n padding: 0;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n\n.defly-wallet-sign-txn-toast__content__lottie-animation {\n position: absolute;\n top: -75px;\n left: -100px;\n width: 368px;\n height: 368px;\n}\n\n.defly-wallet-sign-txn-toast__content__description {\n position: absolute;\n top: 40px;\n right: 48px;\n max-width: 197px;\n color: #3c3c49;\n font-size: 14px;\n line-height: 22px;\n letter-spacing: -0.1px;\n}\n\n@media (max-width: 935px) {\n .defly-wallet-sign-txn-toast {\n display: none;\n }\n}\n@keyframes DeflyWalletSignTxnToastSlideIn {\n 0% {\n bottom: 12px;\n opacity: 0;\n }\n 100% {\n bottom: 26px;\n opacity: 1;\n }\n}';o(H);const j=document.createElement("template");j.innerHTML='\n <div class="defly-wallet-sign-txn-toast">\n <div class="defly-wallet-sign-txn-toast__header">\n <button\n id="defly-wallet-sign-txn-toast-close-button"\n class="defly-wallet-sign-txn-toast__header__close-button">\n <img src="data:image/svg+xml,%3csvg width=\'20\' height=\'20\' viewBox=\'0 0 20 20\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M14.4107 4.41074L9.41074 9.41074L10.5893 10.5893L15.5893 5.58926L14.4107 4.41074ZM9.41074 9.41074L4.41074 14.4107L5.58926 15.5893L10.5893 10.5893L9.41074 9.41074ZM15.5893 14.4107L10.5893 9.41074L9.41074 10.5893L14.4107 15.5893L15.5893 14.4107ZM10.5893 9.41074L5.58926 4.41074L4.41074 5.58926L9.41074 10.5893L10.5893 9.41074Z\' fill=\'%239099BD\'/%3e%3c/svg%3e" />\n </button>\n </div>\n <div class="defly-wallet-sign-txn-toast__content">\n <div id="defly-wallet-sign-txn-toast-lottie-animation" style="width:368;height:368" class="defly-wallet-sign-txn-toast__content__lottie-animation"></div>\n <p class="defly-wallet-sign-txn-toast__content__description">\n Please launch <b>Defly Wallet</b> on your iOS or Android device to sign this transaction.\n </p>\n </div>\n </div>\n';class X extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=H,this.shadowRoot.append(j.content.cloneNode(!0),t);const e=this.shadowRoot.getElementById("defly-wallet-sign-txn-toast-close-button");null==e||e.addEventListener("click",(()=>{(0,i.r)(i.f)})),this.renderLottieAnimation()}}renderLottieAnimation(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("defly-wallet-sign-txn-toast-lottie-animation");e&&a.loadAnimation({container:e,renderer:"svg",loop:!0,autoplay:!0,animationData:Y})}}var U='@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@400;500;600&display=swap");\n@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@100;900&display=swap");\n.defly-wallet-modal {\n --defly-wallet-modal-font-family: "Spline Sans", sans-serif;\n --defly-wallet-connect-modal-headline-family: "Hanken Grotesk", sans-serif;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.defly-wallet-modal--select-account .defly-wallet-modal__body {\n width: 480px;\n height: 578px;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 20px;\n width: calc(100% - 40px);\n max-width: unset;\n height: calc(100 * var(--defly-wallet-vh));\n padding: 20px;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s DeflyWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.defly-wallet-modal--mobile .defly-wallet-modal__body::before {\n background-image: unset;\n}\n.defly-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--defly-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.defly-wallet-modal ul,\n.defly-wallet-modal ol,\n.defly-wallet-modal li {\n list-style-type: none;\n}\n\n.defly-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--defly-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.defly-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.defly-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 979px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #131313;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 40px;\n animation: 0.3s DeflyWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n\n@media (max-width: 935px) {\n .defly-wallet-modal--desktop .defly-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes DeflyWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes DeflyWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.defly-wallet-sign-txn-modal.defly-wallet-modal .defly-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-image: unset;\n padding: 0;\n}\n.defly-wallet-sign-txn-modal.defly-wallet-modal .defly-wallet-modal__body .defly-wallet-sign-txn-modal__body__content {\n width: 100%;\n height: 100%;\n}\n.defly-wallet-sign-txn-modal.defly-wallet-modal .defly-wallet-modal__body #defly-wallet-iframe {\n width: 100%;\n height: 100%;\n border-radius: 16px;\n margin: 0 auto;\n border: none;\n}';o(U);const K=document.createElement("template");K.innerHTML=`\n <div class="${i.c} defly-wallet-sign-txn-modal">\n <div class="defly-wallet-modal__body">\n <defly-wallet-modal-header modal-id="${i.g}"></defly-wallet-modal-header/>\n\n <div class="defly-wallet-sign-txn-modal__body__content" />\n </div>\n </div>\n`;class J extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=U,this.shadowRoot.append(K.content.cloneNode(!0),t)}}}window.addEventListener("DOMContentLoaded",(()=>{c()})),window.addEventListener("resize",(()=>{c()})),window.customElements.define("defly-wallet-connect-modal",P),window.customElements.define("defly-wallet-modal-desktop-mode",A),window.customElements.define("defly-wallet-modal-header",u),window.customElements.define("defly-wallet-modal-touch-screen-mode",E),window.customElements.define("defly-wallet-redirect-modal",B),window.customElements.define("defly-wallet-connect-modal-information-section",z),window.customElements.define("defly-wallet-connect-modal-pending-message-section",Z),window.customElements.define("defly-wallet-sign-txn-toast",X),window.customElements.define("defly-wallet-sign-txn-modal",J),window.customElements.define("defly-wallet-download-qr-code",y)},6314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,r,a){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(i)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);i&&o[h[0]]||(void 0!==a&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=a),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),r&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=r):h[4]="".concat(r)),e.push(h))}},e}},6663:(t,e,n)=>{"use strict";const i=n(4280),r=n(454),a=n(528);function o(t){if("string"!=typeof t||1!==t.length)throw new TypeError("arrayFormatSeparator must be single character string")}function s(t,e){return e.encode?e.strict?i(t):encodeURIComponent(t):t}function l(t,e){return e.decode?r(t):t}function c(t){return Array.isArray(t)?t.sort():"object"==typeof t?c(Object.keys(t)).sort(((t,e)=>Number(t)-Number(e))).map((e=>t[e])):t}function h(t){const e=t.indexOf("#");return-1!==e&&(t=t.slice(0,e)),t}function d(t){const e=(t=h(t)).indexOf("?");return-1===e?"":t.slice(e+1)}function u(t,e){return e.parseNumbers&&!Number.isNaN(Number(t))&&"string"==typeof t&&""!==t.trim()?t=Number(t):!e.parseBooleans||null===t||"true"!==t.toLowerCase()&&"false"!==t.toLowerCase()||(t="true"===t.toLowerCase()),t}function p(t,e){o((e=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},e)).arrayFormatSeparator);const n=function(t){let e;switch(t.arrayFormat){case"index":return(t,n,i)=>{e=/\[(\d*)\]$/.exec(t),t=t.replace(/\[\d*\]$/,""),e?(void 0===i[t]&&(i[t]={}),i[t][e[1]]=n):i[t]=n};case"bracket":return(t,n,i)=>{e=/(\[\])$/.exec(t),t=t.replace(/\[\]$/,""),e?void 0!==i[t]?i[t]=[].concat(i[t],n):i[t]=[n]:i[t]=n};case"comma":case"separator":return(e,n,i)=>{const r="string"==typeof n&&n.split("").indexOf(t.arrayFormatSeparator)>-1?n.split(t.arrayFormatSeparator).map((e=>l(e,t))):null===n?n:l(n,t);i[e]=r};default:return(t,e,n)=>{void 0!==n[t]?n[t]=[].concat(n[t],e):n[t]=e}}}(e),i=Object.create(null);if("string"!=typeof t)return i;if(!(t=t.trim().replace(/^[?#&]/,"")))return i;for(const r of t.split("&")){let[t,o]=a(e.decode?r.replace(/\+/g," "):r,"=");o=void 0===o?null:["comma","separator"].includes(e.arrayFormat)?o:l(o,e),n(l(t,e),o,i)}for(const t of Object.keys(i)){const n=i[t];if("object"==typeof n&&null!==n)for(const t of Object.keys(n))n[t]=u(n[t],e);else i[t]=u(n,e)}return!1===e.sort?i:(!0===e.sort?Object.keys(i).sort():Object.keys(i).sort(e.sort)).reduce(((t,e)=>{const n=i[e];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?t[e]=c(n):t[e]=n,t}),Object.create(null))}e.extract=d,e.parse=p,e.stringify=(t,e)=>{if(!t)return"";o((e=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},e)).arrayFormatSeparator);const n=n=>e.skipNull&&null==t[n]||e.skipEmptyString&&""===t[n],i=function(t){switch(t.arrayFormat){case"index":return e=>(n,i)=>{const r=n.length;return void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?n:null===i?[...n,[s(e,t),"[",r,"]"].join("")]:[...n,[s(e,t),"[",s(r,t),"]=",s(i,t)].join("")]};case"bracket":return e=>(n,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?n:null===i?[...n,[s(e,t),"[]"].join("")]:[...n,[s(e,t),"[]=",s(i,t)].join("")];case"comma":case"separator":return e=>(n,i)=>null==i||0===i.length?n:0===n.length?[[s(e,t),"=",s(i,t)].join("")]:[[n,s(i,t)].join(t.arrayFormatSeparator)];default:return e=>(n,i)=>void 0===i||t.skipNull&&null===i||t.skipEmptyString&&""===i?n:null===i?[...n,s(e,t)]:[...n,[s(e,t),"=",s(i,t)].join("")]}}(e),r={};for(const e of Object.keys(t))n(e)||(r[e]=t[e]);const a=Object.keys(r);return!1!==e.sort&&a.sort(e.sort),a.map((n=>{const r=t[n];return void 0===r?"":null===r?s(n,e):Array.isArray(r)?r.reduce(i(n),[]).join("&"):s(n,e)+"="+s(r,e)})).filter((t=>t.length>0)).join("&")},e.parseUrl=(t,e)=>{e=Object.assign({decode:!0},e);const[n,i]=a(t,"#");return Object.assign({url:n.split("?")[0]||"",query:p(d(t),e)},e&&e.parseFragmentIdentifier&&i?{fragmentIdentifier:l(i,e)}:{})},e.stringifyUrl=(t,n)=>{n=Object.assign({encode:!0,strict:!0},n);const i=h(t.url).split("?")[0]||"",r=e.extract(t.url),a=e.parse(r,{sort:!1}),o=Object.assign(a,t.query);let l=e.stringify(o,n);l&&(l=`?${l}`);let c=function(t){let e="";const n=t.indexOf("#");return-1!==n&&(e=t.slice(n)),e}(t.url);return t.fragmentIdentifier&&(c=`#${s(t.fragmentIdentifier,n)}`),`${i}${l}${c}`}},6880:function(t){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=90)}({17:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i=n(18),r=function(){function t(){}return t.getFirstMatch=function(t,e){var n=e.match(t);return n&&n.length>0&&n[1]||""},t.getSecondMatch=function(t,e){var n=e.match(t);return n&&n.length>1&&n[2]||""},t.matchAndReturnConst=function(t,e,n){if(t.test(e))return n},t.getWindowsVersionName=function(t){switch(t){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},t.getMacOSVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),10===e[0])switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},t.getAndroidVersionName=function(t){var e=t.split(".").splice(0,2).map((function(t){return parseInt(t,10)||0}));if(e.push(0),!(1===e[0]&&e[1]<5))return 1===e[0]&&e[1]<6?"Cupcake":1===e[0]&&e[1]>=6?"Donut":2===e[0]&&e[1]<2?"Eclair":2===e[0]&&2===e[1]?"Froyo":2===e[0]&&e[1]>2?"Gingerbread":3===e[0]?"Honeycomb":4===e[0]&&e[1]<1?"Ice Cream Sandwich":4===e[0]&&e[1]<4?"Jelly Bean":4===e[0]&&e[1]>=4?"KitKat":5===e[0]?"Lollipop":6===e[0]?"Marshmallow":7===e[0]?"Nougat":8===e[0]?"Oreo":9===e[0]?"Pie":void 0},t.getVersionPrecision=function(t){return t.split(".").length},t.compareVersions=function(e,n,i){void 0===i&&(i=!1);var r=t.getVersionPrecision(e),a=t.getVersionPrecision(n),o=Math.max(r,a),s=0,l=t.map([e,n],(function(e){var n=o-t.getVersionPrecision(e),i=e+new Array(n+1).join(".0");return t.map(i.split("."),(function(t){return new Array(20-t.length).join("0")+t})).reverse()}));for(i&&(s=o-Math.min(r,a)),o-=1;o>=s;){if(l[0][o]>l[1][o])return 1;if(l[0][o]===l[1][o]){if(o===s)return 0;o-=1}else if(l[0][o]<l[1][o])return-1}},t.map=function(t,e){var n,i=[];if(Array.prototype.map)return Array.prototype.map.call(t,e);for(n=0;n<t.length;n+=1)i.push(e(t[n]));return i},t.find=function(t,e){var n,i;if(Array.prototype.find)return Array.prototype.find.call(t,e);for(n=0,i=t.length;n<i;n+=1){var r=t[n];if(e(r,n))return r}},t.assign=function(t){for(var e,n,i=t,r=arguments.length,a=new Array(r>1?r-1:0),o=1;o<r;o++)a[o-1]=arguments[o];if(Object.assign)return Object.assign.apply(Object,[t].concat(a));var s=function(){var t=a[e];"object"==typeof t&&null!==t&&Object.keys(t).forEach((function(e){i[e]=t[e]}))};for(e=0,n=a.length;e<n;e+=1)s();return t},t.getBrowserAlias=function(t){return i.BROWSER_ALIASES_MAP[t]},t.getBrowserTypeByAlias=function(t){return i.BROWSER_MAP[t]||""},t}();e.default=r,t.exports=e.default},18:function(t,e,n){"use strict";e.__esModule=!0,e.ENGINE_MAP=e.OS_MAP=e.PLATFORMS_MAP=e.BROWSER_MAP=e.BROWSER_ALIASES_MAP=void 0,e.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},e.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},e.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},e.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},e.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(91))&&i.__esModule?i:{default:i},a=n(18);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var s=function(){function t(){}var e,n;return t.getParser=function(t,e){if(void 0===e&&(e=!1),"string"!=typeof t)throw new Error("UserAgent should be a string");return new r.default(t,e)},t.parse=function(t){return new r.default(t).getResult()},e=t,n=[{key:"BROWSER_MAP",get:function(){return a.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return a.ENGINE_MAP}},{key:"OS_MAP",get:function(){return a.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return a.PLATFORMS_MAP}}],null&&o(e.prototype,null),n&&o(e,n),t}();e.default=s,t.exports=e.default},91:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i=l(n(92)),r=l(n(93)),a=l(n(94)),o=l(n(95)),s=l(n(17));function l(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(t,e){if(void 0===e&&(e=!1),null==t||""===t)throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==e&&this.parse()}var e=t.prototype;return e.getUA=function(){return this._ua},e.test=function(t){return t.test(this._ua)},e.parseBrowser=function(){var t=this;this.parsedResult.browser={};var e=s.default.find(i.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser},e.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},e.getBrowserName=function(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},e.getBrowserVersion=function(){return this.getBrowser().version},e.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},e.parseOS=function(){var t=this;this.parsedResult.os={};var e=s.default.find(r.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os},e.getOSName=function(t){var e=this.getOS().name;return t?String(e).toLowerCase()||"":e||""},e.getOSVersion=function(){return this.getOS().version},e.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},e.getPlatformType=function(t){void 0===t&&(t=!1);var e=this.getPlatform().type;return t?String(e).toLowerCase()||"":e||""},e.parsePlatform=function(){var t=this;this.parsedResult.platform={};var e=s.default.find(a.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform},e.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},e.getEngineName=function(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},e.parseEngine=function(){var t=this;this.parsedResult.engine={};var e=s.default.find(o.default,(function(e){if("function"==typeof e.test)return e.test(t);if(e.test instanceof Array)return e.test.some((function(e){return t.test(e)}));throw new Error("Browser's test function is not valid")}));return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine},e.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},e.getResult=function(){return s.default.assign({},this.parsedResult)},e.satisfies=function(t){var e=this,n={},i=0,r={},a=0;if(Object.keys(t).forEach((function(e){var o=t[e];"string"==typeof o?(r[e]=o,a+=1):"object"==typeof o&&(n[e]=o,i+=1)})),i>0){var o=Object.keys(n),l=s.default.find(o,(function(t){return e.isOS(t)}));if(l){var c=this.satisfies(n[l]);if(void 0!==c)return c}var h=s.default.find(o,(function(t){return e.isPlatform(t)}));if(h){var d=this.satisfies(n[h]);if(void 0!==d)return d}}if(a>0){var u=Object.keys(r),p=s.default.find(u,(function(t){return e.isBrowser(t,!0)}));if(void 0!==p)return this.compareVersion(r[p])}},e.isBrowser=function(t,e){void 0===e&&(e=!1);var n=this.getBrowserName().toLowerCase(),i=t.toLowerCase(),r=s.default.getBrowserTypeByAlias(i);return e&&r&&(i=r.toLowerCase()),i===n},e.compareVersion=function(t){var e=[0],n=t,i=!1,r=this.getBrowserVersion();if("string"==typeof r)return">"===t[0]||"<"===t[0]?(n=t.substr(1),"="===t[1]?(i=!0,n=t.substr(2)):e=[],">"===t[0]?e.push(1):e.push(-1)):"="===t[0]?n=t.substr(1):"~"===t[0]&&(i=!0,n=t.substr(1)),e.indexOf(s.default.compareVersions(r,n,i))>-1},e.isOS=function(t){return this.getOSName(!0)===String(t).toLowerCase()},e.isPlatform=function(t){return this.getPlatformType(!0)===String(t).toLowerCase()},e.isEngine=function(t){return this.getEngineName(!0)===String(t).toLowerCase()},e.is=function(t,e){return void 0===e&&(e=!1),this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)},e.some=function(t){var e=this;return void 0===t&&(t=[]),t.some((function(t){return e.is(t)}))},t}();e.default=c,t.exports=e.default},92:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},a=/version\/(\d+(\.?_?\d+)+)/i,o=[{test:[/googlebot/i],describe:function(t){var e={name:"Googlebot"},n=r.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/opera/i],describe:function(t){var e={name:"Opera"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe:function(t){var e={name:"Opera"},n=r.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe:function(t){var e={name:"Samsung Internet for Android"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe:function(t){var e={name:"NAVER Whale Browser"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe:function(t){var e={name:"MZ Browser"},n=r.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/focus/i],describe:function(t){var e={name:"Focus"},n=r.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/swing/i],describe:function(t){var e={name:"Swing"},n=r.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/coast/i],describe:function(t){var e={name:"Opera Coast"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(t){var e={name:"Opera Touch"},n=r.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe:function(t){var e={name:"Yandex Browser"},n=r.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe:function(t){var e={name:"UC Browser"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe:function(t){var e={name:"Maxthon"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe:function(t){var e={name:"Epiphany"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe:function(t){var e={name:"Puffin"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe:function(t){var e={name:"Sleipnir"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe:function(t){var e={name:"K-Meleon"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe:function(t){var e={name:"WeChat"},n=r.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe:function(t){var e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=r.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe:function(t){var e={name:"Internet Explorer"},n=r.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe:function(t){var e={name:"Microsoft Edge"},n=r.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe:function(t){var e={name:"Microsoft Edge"},n=r.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe:function(t){var e={name:"Vivaldi"},n=r.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe:function(t){var e={name:"SeaMonkey"},n=r.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe:function(t){var e={name:"Sailfish"},n=r.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe:function(t){var e={name:"Amazon Silk"},n=r.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe:function(t){var e={name:"PhantomJS"},n=r.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe:function(t){var e={name:"SlimerJS"},n=r.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e={name:"BlackBerry"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e={name:"WebOS Browser"},n=r.default.getFirstMatch(a,t)||r.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe:function(t){var e={name:"Bada"},n=r.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe:function(t){var e={name:"Tizen"},n=r.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe:function(t){var e={name:"QupZilla"},n=r.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe:function(t){var e={name:"Firefox"},n=r.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe:function(t){var e={name:"Electron"},n=r.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe:function(t){var e={name:"Miui"},n=r.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe:function(t){var e={name:"Chromium"},n=r.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe:function(t){var e={name:"Chrome"},n=r.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe:function(t){var e={name:"Google Search"},n=r.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e={name:"Android Browser"},n=r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe:function(t){var e={name:"PlayStation 4"},n=r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe:function(t){var e={name:"Safari"},n=r.default.getFirstMatch(a,t);return n&&(e.version=n),e}},{test:[/.*/i],describe:function(t){var e=-1!==t.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:r.default.getFirstMatch(e,t),version:r.default.getSecondMatch(e,t)}}}];e.default=o,t.exports=e.default},93:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},a=n(18),o=[{test:[/Roku\/DVP/],describe:function(t){var e=r.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:a.OS_MAP.Roku,version:e}}},{test:[/windows phone/i],describe:function(t){var e=r.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.WindowsPhone,version:e}}},{test:[/windows /i],describe:function(t){var e=r.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=r.default.getWindowsVersionName(e);return{name:a.OS_MAP.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(t){var e={name:a.OS_MAP.iOS},n=r.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe:function(t){var e=r.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=r.default.getMacOSVersionName(e),i={name:a.OS_MAP.MacOS,version:e};return n&&(i.versionName=n),i}},{test:[/(ipod|iphone|ipad)/i],describe:function(t){var e=r.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:a.OS_MAP.iOS,version:e}}},{test:function(t){var e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe:function(t){var e=r.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=r.default.getAndroidVersionName(e),i={name:a.OS_MAP.Android,version:e};return n&&(i.versionName=n),i}},{test:[/(web|hpw)[o0]s/i],describe:function(t){var e=r.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:a.OS_MAP.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(t){var e=r.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||r.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||r.default.getFirstMatch(/\bbb(\d+)/i,t);return{name:a.OS_MAP.BlackBerry,version:e}}},{test:[/bada/i],describe:function(t){var e=r.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Bada,version:e}}},{test:[/tizen/i],describe:function(t){var e=r.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.Tizen,version:e}}},{test:[/linux/i],describe:function(){return{name:a.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:a.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(t){var e=r.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:a.OS_MAP.PlayStation4,version:e}}}];e.default=o,t.exports=e.default},94:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},a=n(18),o=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(t){var e=r.default.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:a.PLATFORMS_MAP.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){var e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe:function(t){var e=r.default.getFirstMatch(/(ipod|iphone)/i,t);return{type:a.PLATFORMS_MAP.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"blackberry"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(t){return"bada"===t.getBrowserName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"windows phone"===t.getBrowserName()},describe:function(){return{type:a.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(t){var e=Number(String(t.getOSVersion()).split(".")[0]);return"android"===t.getOSName(!0)&&e>=3},describe:function(){return{type:a.PLATFORMS_MAP.tablet}}},{test:function(t){return"android"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.mobile}}},{test:function(t){return"macos"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(t){return"windows"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"linux"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.desktop}}},{test:function(t){return"playstation 4"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}},{test:function(t){return"roku"===t.getOSName(!0)},describe:function(){return{type:a.PLATFORMS_MAP.tv}}}];e.default=o,t.exports=e.default},95:function(t,e,n){"use strict";e.__esModule=!0,e.default=void 0;var i,r=(i=n(17))&&i.__esModule?i:{default:i},a=n(18),o=[{test:function(t){return"microsoft edge"===t.getBrowserName(!0)},describe:function(t){if(/\sedg\//i.test(t))return{name:a.ENGINE_MAP.Blink};var e=r.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:a.ENGINE_MAP.EdgeHTML,version:e}}},{test:[/trident/i],describe:function(t){var e={name:a.ENGINE_MAP.Trident},n=r.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){return t.test(/presto/i)},describe:function(t){var e={name:a.ENGINE_MAP.Presto},n=r.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:function(t){var e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe:function(t){var e={name:a.ENGINE_MAP.Gecko},n=r.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:a.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(t){var e={name:a.ENGINE_MAP.WebKit},n=r.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}];e.default=o,t.exports=e.default}})},7007:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var r=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,i){function r(n){t.removeListener(e,a),i(n)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",r),n([].slice.call(arguments))}g(t,e,a,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,r)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function c(t,e,n,i){var r,a,o,c;if(s(n),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),o=a[e]),void 0===o)o=a[e]=n,++t._eventsCount;else if("function"==typeof o?o=a[e]=i?[n,o]:[o,n]:i?o.unshift(n):o.push(n),(r=l(t))>0&&o.length>r&&!o.warned){o.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=o.length,c=h,console&&console.warn&&console.warn(c)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},r=h.bind(i);return r.listener=n,i.wrapFn=r,r}function u(t,e,n){var i=t._events;if(void 0===i)return[];var r=i[e];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(r):m(r,r.length)}function p(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t[i];return n}function g(t,e,n,i){if("function"==typeof t.on)i.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function r(a){i.once&&t.removeEventListener(e,r),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");o=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||r(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,a=this._events;if(void 0!==a)r=r&&void 0===a.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[t];if(void 0===l)return!1;if("function"==typeof l)i(l,this,e);else{var c=l.length,h=m(l,c);for(n=0;n<c;++n)i(h[n],this,e)}return!0},a.prototype.addListener=function(t,e){return c(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return c(this,t,e,!0)},a.prototype.once=function(t,e){return s(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return s(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,i,r,a,o;if(s(e),void 0===(i=this._events))return this;if(void 0===(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(r=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){o=n[a].listener,r=a;break}if(r<0)return this;0===r?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,r),1===n.length&&(i[t]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",t,o||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var r,a=Object.keys(n);for(i=0;i<a.length;++i)"removeListener"!==(r=a[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this},a.prototype.listeners=function(t){return u(this,t,!0)},a.prototype.rawListeners=function(t){return u(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},7173:(t,e,n)=>{"use strict";function i(){return(null===n.g||void 0===n.g?void 0:n.g.crypto)||(null===n.g||void 0===n.g?void 0:n.g.msCrypto)||{}}function r(){const t=i();return t.subtle||t.webkitSubtle}Object.defineProperty(e,"__esModule",{value:!0}),e.isBrowserCryptoAvailable=e.getSubtleCrypto=e.getBrowerCrypto=void 0,e.getBrowerCrypto=i,e.getSubtleCrypto=r,e.isBrowserCryptoAvailable=function(){return!!i()&&!!r()}},7283:t=>{self,t.exports=(()=>{var t={192:(t,e)=>{var n,i,r=function(){var t=function(t,e){var n=t,i=o[e],r=null,a=0,l=null,f=[],y={},w=function(t,e){r=function(t){for(var e=new Array(t),n=0;n<t;n+=1){e[n]=new Array(t);for(var i=0;i<t;i+=1)e[n][i]=null}return e}(a=4*n+17),b(0,0),b(a-7,0),b(0,a-7),S(),x(),C(t,e),n>=7&&A(t),null==l&&(l=I(n,i,f)),k(l,e)},b=function(t,e){for(var n=-1;n<=7;n+=1)if(!(t+n<=-1||a<=t+n))for(var i=-1;i<=7;i+=1)e+i<=-1||a<=e+i||(r[t+n][e+i]=0<=n&&n<=6&&(0==i||6==i)||0<=i&&i<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=i&&i<=4)},x=function(){for(var t=8;t<a-8;t+=1)null==r[t][6]&&(r[t][6]=t%2==0);for(var e=8;e<a-8;e+=1)null==r[6][e]&&(r[6][e]=e%2==0)},S=function(){for(var t=s.getPatternPosition(n),e=0;e<t.length;e+=1)for(var i=0;i<t.length;i+=1){var a=t[e],o=t[i];if(null==r[a][o])for(var l=-2;l<=2;l+=1)for(var c=-2;c<=2;c+=1)r[a+l][o+c]=-2==l||2==l||-2==c||2==c||0==l&&0==c}},A=function(t){for(var e=s.getBCHTypeNumber(n),i=0;i<18;i+=1){var o=!t&&1==(e>>i&1);r[Math.floor(i/3)][i%3+a-8-3]=o}for(i=0;i<18;i+=1)o=!t&&1==(e>>i&1),r[i%3+a-8-3][Math.floor(i/3)]=o},C=function(t,e){for(var n=i<<3|e,o=s.getBCHTypeInfo(n),l=0;l<15;l+=1){var c=!t&&1==(o>>l&1);l<6?r[l][8]=c:l<8?r[l+1][8]=c:r[a-15+l][8]=c}for(l=0;l<15;l+=1)c=!t&&1==(o>>l&1),l<8?r[8][a-l-1]=c:l<9?r[8][15-l-1+1]=c:r[8][15-l-1]=c;r[a-8][8]=!t},k=function(t,e){for(var n=-1,i=a-1,o=7,l=0,c=s.getMaskFunction(e),h=a-1;h>0;h-=2)for(6==h&&(h-=1);;){for(var d=0;d<2;d+=1)if(null==r[i][h-d]){var u=!1;l<t.length&&(u=1==(t[l]>>>o&1)),c(i,h-d)&&(u=!u),r[i][h-d]=u,-1==(o-=1)&&(l+=1,o=7)}if((i+=n)<0||a<=i){i-=n,n=-n;break}}},I=function(t,e,n){for(var i=h.getRSBlocks(t,e),r=d(),a=0;a<n.length;a+=1){var o=n[a];r.put(o.getMode(),4),r.put(o.getLength(),s.getLengthInBits(o.getMode(),t)),o.write(r)}var l=0;for(a=0;a<i.length;a+=1)l+=i[a].dataCount;if(r.getLengthInBits()>8*l)throw"code length overflow. ("+r.getLengthInBits()+">"+8*l+")";for(r.getLengthInBits()+4<=8*l&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*l||(r.put(236,8),r.getLengthInBits()>=8*l));)r.put(17,8);return function(t,e){for(var n=0,i=0,r=0,a=new Array(e.length),o=new Array(e.length),l=0;l<e.length;l+=1){var h=e[l].dataCount,d=e[l].totalCount-h;i=Math.max(i,h),r=Math.max(r,d),a[l]=new Array(h);for(var u=0;u<a[l].length;u+=1)a[l][u]=255&t.getBuffer()[u+n];n+=h;var p=s.getErrorCorrectPolynomial(d),m=c(a[l],p.getLength()-1).mod(p);for(o[l]=new Array(p.getLength()-1),u=0;u<o[l].length;u+=1){var g=u+m.getLength()-o[l].length;o[l][u]=g>=0?m.getAt(g):0}}var f=0;for(u=0;u<e.length;u+=1)f+=e[u].totalCount;var y=new Array(f),v=0;for(u=0;u<i;u+=1)for(l=0;l<e.length;l+=1)u<a[l].length&&(y[v]=a[l][u],v+=1);for(u=0;u<r;u+=1)for(l=0;l<e.length;l+=1)u<o[l].length&&(y[v]=o[l][u],v+=1);return y}(r,i)};y.addData=function(t,e){var n=null;switch(e=e||"Byte"){case"Numeric":n=u(t);break;case"Alphanumeric":n=p(t);break;case"Byte":n=m(t);break;case"Kanji":n=g(t);break;default:throw"mode:"+e}f.push(n),l=null},y.isDark=function(t,e){if(t<0||a<=t||e<0||a<=e)throw t+","+e;return r[t][e]},y.getModuleCount=function(){return a},y.make=function(){if(n<1){for(var t=1;t<40;t++){for(var e=h.getRSBlocks(t,i),r=d(),a=0;a<f.length;a++){var o=f[a];r.put(o.getMode(),4),r.put(o.getLength(),s.getLengthInBits(o.getMode(),t)),o.write(r)}var l=0;for(a=0;a<e.length;a++)l+=e[a].dataCount;if(r.getLengthInBits()<=8*l)break}n=t}w(!1,function(){for(var t=0,e=0,n=0;n<8;n+=1){w(!0,n);var i=s.getLostPoint(y);(0==n||t>i)&&(t=i,e=n)}return e}())},y.createTableTag=function(t,e){t=t||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(e=void 0===e?4*t:e)+"px;",n+='">',n+="<tbody>";for(var i=0;i<y.getModuleCount();i+=1){n+="<tr>";for(var r=0;r<y.getModuleCount();r+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+t+"px;",n+=" height: "+t+"px;",n+=" background-color: ",n+=y.isDark(i,r)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return(n+="</tbody>")+"</table>"},y.createSvgTag=function(t,e,n,i){var r={};"object"==typeof arguments[0]&&(t=(r=arguments[0]).cellSize,e=r.margin,n=r.alt,i=r.title),t=t||2,e=void 0===e?4*t:e,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(i="string"==typeof i?{text:i}:i||{}).text=i.text||null,i.id=i.text?i.id||"qrcode-title":null;var a,o,s,l,c=y.getModuleCount()*t+2*e,h="";for(l="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",h+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',h+=r.scalable?"":' width="'+c+'px" height="'+c+'px"',h+=' viewBox="0 0 '+c+" "+c+'" ',h+=' preserveAspectRatio="xMinYMin meet"',h+=i.text||n.text?' role="img" aria-labelledby="'+E([i.id,n.id].join(" ").trim())+'"':"",h+=">",h+=i.text?'<title id="'+E(i.id)+'">'+E(i.text)+"</title>":"",h+=n.text?'<description id="'+E(n.id)+'">'+E(n.text)+"</description>":"",h+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',h+='<path d="',o=0;o<y.getModuleCount();o+=1)for(s=o*t+e,a=0;a<y.getModuleCount();a+=1)y.isDark(o,a)&&(h+="M"+(a*t+e)+","+s+l);return(h+='" stroke="transparent" fill="black"/>')+"</svg>"},y.createDataURL=function(t,e){t=t||2,e=void 0===e?4*t:e;var n=y.getModuleCount()*t+2*e,i=e,r=n-e;return v(n,n,(function(e,n){if(i<=e&&e<r&&i<=n&&n<r){var a=Math.floor((e-i)/t),o=Math.floor((n-i)/t);return y.isDark(o,a)?0:1}return 1}))},y.createImgTag=function(t,e,n){t=t||2,e=void 0===e?4*t:e;var i=y.getModuleCount()*t+2*e,r="";return r+="<img",r+=' src="',r+=y.createDataURL(t,e),r+='"',r+=' width="',r+=i,r+='"',r+=' height="',r+=i,r+='"',n&&(r+=' alt="',r+=E(n),r+='"'),r+"/>"};var E=function(t){for(var e="",n=0;n<t.length;n+=1){var i=t.charAt(n);switch(i){case"<":e+="&lt;";break;case">":e+="&gt;";break;case"&":e+="&amp;";break;case'"':e+="&quot;";break;default:e+=i}}return e};return y.createASCII=function(t,e){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var e,n,i,r,a,o=1*y.getModuleCount()+2*t,s=t,l=o-t,c={"██":"█","█ ":"▀"," █":"▄"," ":" "},h={"██":"▀","█ ":"▀"," █":" "," ":" "},d="";for(e=0;e<o;e+=2){for(i=Math.floor((e-s)/1),r=Math.floor((e+1-s)/1),n=0;n<o;n+=1)a="█",s<=n&&n<l&&s<=e&&e<l&&y.isDark(i,Math.floor((n-s)/1))&&(a=" "),s<=n&&n<l&&s<=e+1&&e+1<l&&y.isDark(r,Math.floor((n-s)/1))?a+=" ":a+="█",d+=t<1&&e+1>=l?h[a]:c[a];d+="\n"}return o%2&&t>0?d.substring(0,d.length-o-1)+Array(o+1).join("▀"):d.substring(0,d.length-1)}(e);t-=1,e=void 0===e?2*t:e;var n,i,r,a,o=y.getModuleCount()*t+2*e,s=e,l=o-e,c=Array(t+1).join("██"),h=Array(t+1).join(" "),d="",u="";for(n=0;n<o;n+=1){for(r=Math.floor((n-s)/t),u="",i=0;i<o;i+=1)a=1,s<=i&&i<l&&s<=n&&n<l&&y.isDark(r,Math.floor((i-s)/t))&&(a=0),u+=a?c:h;for(r=0;r<t;r+=1)d+=u+"\n"}return d.substring(0,d.length-1)},y.renderTo2dContext=function(t,e){e=e||2;for(var n=y.getModuleCount(),i=0;i<n;i++)for(var r=0;r<n;r++)t.fillStyle=y.isDark(i,r)?"black":"white",t.fillRect(i*e,r*e,e,e)},y};t.stringToBytes=(t.stringToBytesFuncs={default:function(t){for(var e=[],n=0;n<t.length;n+=1){var i=t.charCodeAt(n);e.push(255&i)}return e}}).default,t.createStringToBytes=function(t,e){var n=function(){for(var n=y(t),i=function(){var t=n.read();if(-1==t)throw"eof";return t},r=0,a={};;){var o=n.read();if(-1==o)break;var s=i(),l=i()<<8|i();a[String.fromCharCode(o<<8|s)]=l,r+=1}if(r!=e)throw r+" != "+e;return a}(),i="?".charCodeAt(0);return function(t){for(var e=[],r=0;r<t.length;r+=1){var a=t.charCodeAt(r);if(a<128)e.push(a);else{var o=n[t.charAt(r)];"number"==typeof o?(255&o)==o?e.push(o):(e.push(o>>>8),e.push(255&o)):e.push(i)}}return e}};var e,n,i,r,a,o={L:1,M:0,Q:3,H:2},s=(e=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,i=7973,a=function(t){for(var e=0;0!=t;)e+=1,t>>>=1;return e},(r={}).getBCHTypeInfo=function(t){for(var e=t<<10;a(e)-a(n)>=0;)e^=n<<a(e)-a(n);return 21522^(t<<10|e)},r.getBCHTypeNumber=function(t){for(var e=t<<12;a(e)-a(i)>=0;)e^=i<<a(e)-a(i);return t<<12|e},r.getPatternPosition=function(t){return e[t-1]},r.getMaskFunction=function(t){switch(t){case 0:return function(t,e){return(t+e)%2==0};case 1:return function(t,e){return t%2==0};case 2:return function(t,e){return e%3==0};case 3:return function(t,e){return(t+e)%3==0};case 4:return function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0};case 5:return function(t,e){return t*e%2+t*e%3==0};case 6:return function(t,e){return(t*e%2+t*e%3)%2==0};case 7:return function(t,e){return(t*e%3+(t+e)%2)%2==0};default:throw"bad maskPattern:"+t}},r.getErrorCorrectPolynomial=function(t){for(var e=c([1],0),n=0;n<t;n+=1)e=e.multiply(c([1,l.gexp(n)],0));return e},r.getLengthInBits=function(t,e){if(1<=e&&e<10)switch(t){case 1:return 10;case 2:return 9;case 4:case 8:return 8;default:throw"mode:"+t}else if(e<27)switch(t){case 1:return 12;case 2:return 11;case 4:return 16;case 8:return 10;default:throw"mode:"+t}else{if(!(e<41))throw"type:"+e;switch(t){case 1:return 14;case 2:return 13;case 4:return 16;case 8:return 12;default:throw"mode:"+t}}},r.getLostPoint=function(t){for(var e=t.getModuleCount(),n=0,i=0;i<e;i+=1)for(var r=0;r<e;r+=1){for(var a=0,o=t.isDark(i,r),s=-1;s<=1;s+=1)if(!(i+s<0||e<=i+s))for(var l=-1;l<=1;l+=1)r+l<0||e<=r+l||0==s&&0==l||o==t.isDark(i+s,r+l)&&(a+=1);a>5&&(n+=3+a-5)}for(i=0;i<e-1;i+=1)for(r=0;r<e-1;r+=1){var c=0;t.isDark(i,r)&&(c+=1),t.isDark(i+1,r)&&(c+=1),t.isDark(i,r+1)&&(c+=1),t.isDark(i+1,r+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(i=0;i<e;i+=1)for(r=0;r<e-6;r+=1)t.isDark(i,r)&&!t.isDark(i,r+1)&&t.isDark(i,r+2)&&t.isDark(i,r+3)&&t.isDark(i,r+4)&&!t.isDark(i,r+5)&&t.isDark(i,r+6)&&(n+=40);for(r=0;r<e;r+=1)for(i=0;i<e-6;i+=1)t.isDark(i,r)&&!t.isDark(i+1,r)&&t.isDark(i+2,r)&&t.isDark(i+3,r)&&t.isDark(i+4,r)&&!t.isDark(i+5,r)&&t.isDark(i+6,r)&&(n+=40);var h=0;for(r=0;r<e;r+=1)for(i=0;i<e;i+=1)t.isDark(i,r)&&(h+=1);return n+Math.abs(100*h/e/e-50)/5*10},r),l=function(){for(var t=new Array(256),e=new Array(256),n=0;n<8;n+=1)t[n]=1<<n;for(n=8;n<256;n+=1)t[n]=t[n-4]^t[n-5]^t[n-6]^t[n-8];for(n=0;n<255;n+=1)e[t[n]]=n;return{glog:function(t){if(t<1)throw"glog("+t+")";return e[t]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t[e]}}}();function c(t,e){if(void 0===t.length)throw t.length+"/"+e;var n=function(){for(var n=0;n<t.length&&0==t[n];)n+=1;for(var i=new Array(t.length-n+e),r=0;r<t.length-n;r+=1)i[r]=t[r+n];return i}(),i={getAt:function(t){return n[t]},getLength:function(){return n.length},multiply:function(t){for(var e=new Array(i.getLength()+t.getLength()-1),n=0;n<i.getLength();n+=1)for(var r=0;r<t.getLength();r+=1)e[n+r]^=l.gexp(l.glog(i.getAt(n))+l.glog(t.getAt(r)));return c(e,0)},mod:function(t){if(i.getLength()-t.getLength()<0)return i;for(var e=l.glog(i.getAt(0))-l.glog(t.getAt(0)),n=new Array(i.getLength()),r=0;r<i.getLength();r+=1)n[r]=i.getAt(r);for(r=0;r<t.getLength();r+=1)n[r]^=l.gexp(l.glog(t.getAt(r))+e);return c(n,0).mod(t)}};return i}var h=function(){var t=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],e=function(t,e){var n={};return n.totalCount=t,n.dataCount=e,n},n={getRSBlocks:function(n,i){var r=function(e,n){switch(n){case o.L:return t[4*(e-1)+0];case o.M:return t[4*(e-1)+1];case o.Q:return t[4*(e-1)+2];case o.H:return t[4*(e-1)+3];default:return}}(n,i);if(void 0===r)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+i;for(var a=r.length/3,s=[],l=0;l<a;l+=1)for(var c=r[3*l+0],h=r[3*l+1],d=r[3*l+2],u=0;u<c;u+=1)s.push(e(h,d));return s}};return n}(),d=function(){var t=[],e=0,n={getBuffer:function(){return t},getAt:function(e){var n=Math.floor(e/8);return 1==(t[n]>>>7-e%8&1)},put:function(t,e){for(var i=0;i<e;i+=1)n.putBit(1==(t>>>e-i-1&1))},getLengthInBits:function(){return e},putBit:function(n){var i=Math.floor(e/8);t.length<=i&&t.push(0),n&&(t[i]|=128>>>e%8),e+=1}};return n},u=function(t){var e=t,n={getMode:function(){return 1},getLength:function(t){return e.length},write:function(t){for(var n=e,r=0;r+2<n.length;)t.put(i(n.substring(r,r+3)),10),r+=3;r<n.length&&(n.length-r==1?t.put(i(n.substring(r,r+1)),4):n.length-r==2&&t.put(i(n.substring(r,r+2)),7))}},i=function(t){for(var e=0,n=0;n<t.length;n+=1)e=10*e+r(t.charAt(n));return e},r=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+t};return n},p=function(t){var e=t,n={getMode:function(){return 2},getLength:function(t){return e.length},write:function(t){for(var n=e,r=0;r+1<n.length;)t.put(45*i(n.charAt(r))+i(n.charAt(r+1)),11),r+=2;r<n.length&&t.put(i(n.charAt(r)),6)}},i=function(t){if("0"<=t&&t<="9")return t.charCodeAt(0)-"0".charCodeAt(0);if("A"<=t&&t<="Z")return t.charCodeAt(0)-"A".charCodeAt(0)+10;switch(t){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+t}};return n},m=function(e){var n=t.stringToBytes(e);return{getMode:function(){return 4},getLength:function(t){return n.length},write:function(t){for(var e=0;e<n.length;e+=1)t.put(n[e],8)}}},g=function(e){var n=t.stringToBytesFuncs.SJIS;if(!n)throw"sjis not supported.";!function(){var t=n("友");if(2!=t.length||38726!=(t[0]<<8|t[1]))throw"sjis not supported."}();var i=n(e);return{getMode:function(){return 8},getLength:function(t){return~~(i.length/2)},write:function(t){for(var e=i,n=0;n+1<e.length;){var r=(255&e[n])<<8|255&e[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),t.put(r,13),n+=2}if(n<e.length)throw"illegal char at "+(n+1)}}},f=function(){var t=[],e={writeByte:function(e){t.push(255&e)},writeShort:function(t){e.writeByte(t),e.writeByte(t>>>8)},writeBytes:function(t,n,i){n=n||0,i=i||t.length;for(var r=0;r<i;r+=1)e.writeByte(t[r+n])},writeString:function(t){for(var n=0;n<t.length;n+=1)e.writeByte(t.charCodeAt(n))},toByteArray:function(){return t},toString:function(){var e="";e+="[";for(var n=0;n<t.length;n+=1)n>0&&(e+=","),e+=t[n];return e+"]"}};return e},y=function(t){var e=t,n=0,i=0,r=0,a={read:function(){for(;r<8;){if(n>=e.length){if(0==r)return-1;throw"unexpected end of file./"+r}var t=e.charAt(n);if(n+=1,"="==t)return r=0,-1;t.match(/^\s$/)||(i=i<<6|o(t.charCodeAt(0)),r+=6)}var a=i>>>r-8&255;return r-=8,a}},o=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return a},v=function(t,e,n){for(var i=function(t,e){var n=t,i=e,r=new Array(t*e),a={setPixel:function(t,e,i){r[e*n+t]=i},write:function(t){t.writeString("GIF87a"),t.writeShort(n),t.writeShort(i),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(n),t.writeShort(i),t.writeByte(0);var e=o(2);t.writeByte(2);for(var r=0;e.length-r>255;)t.writeByte(255),t.writeBytes(e,r,255),r+=255;t.writeByte(e.length-r),t.writeBytes(e,r,e.length-r),t.writeByte(0),t.writeString(";")}},o=function(t){for(var e=1<<t,n=1+(1<<t),i=t+1,a=s(),o=0;o<e;o+=1)a.add(String.fromCharCode(o));a.add(String.fromCharCode(e)),a.add(String.fromCharCode(n));var l,c,h,d=f(),u=(l=d,c=0,h=0,{write:function(t,e){if(t>>>e!=0)throw"length over";for(;c+e>=8;)l.writeByte(255&(t<<c|h)),e-=8-c,t>>>=8-c,h=0,c=0;h|=t<<c,c+=e},flush:function(){c>0&&l.writeByte(h)}});u.write(e,i);var p=0,m=String.fromCharCode(r[p]);for(p+=1;p<r.length;){var g=String.fromCharCode(r[p]);p+=1,a.contains(m+g)?m+=g:(u.write(a.indexOf(m),i),a.size()<4095&&(a.size()==1<<i&&(i+=1),a.add(m+g)),m=g)}return u.write(a.indexOf(m),i),u.write(n,i),u.flush(),d.toByteArray()},s=function(){var t={},e=0,n={add:function(i){if(n.contains(i))throw"dup key:"+i;t[i]=e,e+=1},size:function(){return e},indexOf:function(e){return t[e]},contains:function(e){return void 0!==t[e]}};return n};return a}(t,e),r=0;r<e;r+=1)for(var a=0;a<t;a+=1)i.setPixel(a,r,n(a,r));var o=f();i.write(o);for(var s=function(){var t=0,e=0,n=0,i="",r={},a=function(t){i+=String.fromCharCode(o(63&t))},o=function(t){if(t<0);else{if(t<26)return 65+t;if(t<52)return t-26+97;if(t<62)return t-52+48;if(62==t)return 43;if(63==t)return 47}throw"n:"+t};return r.writeByte=function(i){for(t=t<<8|255&i,e+=8,n+=1;e>=6;)a(t>>>e-6),e-=6},r.flush=function(){if(e>0&&(a(t<<6-e),t=0,e=0),n%3!=0)for(var r=3-n%3,o=0;o<r;o+=1)i+="="},r.toString=function(){return i},r}(),l=o.toByteArray(),c=0;c<l.length;c+=1)s.writeByte(l[c]);return s.flush(),"data:image/gif;base64,"+s};return t}();r.stringToBytesFuncs["UTF-8"]=function(t){return function(t){for(var e=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);i<128?e.push(i):i<2048?e.push(192|i>>6,128|63&i):i<55296||i>=57344?e.push(224|i>>12,128|i>>6&63,128|63&i):(n++,i=65536+((1023&i)<<10|1023&t.charCodeAt(n)),e.push(240|i>>18,128|i>>12&63,128|i>>6&63,128|63&i))}return e}(t)},void 0===(i="function"==typeof(n=function(){return r})?n.apply(e,[]):n)||(t.exports=i)},676:(t,e,n)=>{"use strict";n.d(e,{default:()=>T});var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r=function(t){return!!t&&"object"==typeof t&&!Array.isArray(t)};function a(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!e.length)return t;var o=e.shift();return void 0!==o&&r(t)&&r(o)?(t=i({},t),Object.keys(o).forEach((function(e){var n=t[e],i=o[e];Array.isArray(n)&&Array.isArray(i)?t[e]=i:r(n)&&r(i)?t[e]=a(Object.assign({},n),i):t[e]=i})),a.apply(void 0,function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}([t],e))):t}function o(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function s(t){return e=this,i=function(){return function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}(this,(function(e){return[2,new Promise((function(e){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}))]}))},new((n=void 0)||(n=Promise))((function(t,r){function a(t){try{s(i.next(t))}catch(t){r(t)}}function o(t){try{s(i.throw(t))}catch(t){r(t)}}function s(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(t){t(i)}))).then(a,o)}s((i=i.apply(e,[])).next())}));var e,n,i}const l={L:.07,M:.15,Q:.25,H:.3};var c=function(){return(c=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};const h=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){var r;switch(this._type){case"dots":r=this._drawDot;break;case"classy":r=this._drawClassy;break;case"classy-rounded":r=this._drawClassyRounded;break;case"rounded":r=this._drawRounded;break;case"extra-rounded":r=this._drawExtraRounded;break;default:r=this._drawSquare}r.call(this,{x:t,y:e,size:n,getNeighbor:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(i+n/2)),e._element.setAttribute("cy",String(r+n/2)),e._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(i)),e._element.setAttribute("y",String(r)),e._element.setAttribute("width",String(n)),e._element.setAttribute("height",String(n))}}))},t.prototype._basicSideRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, 0 "+-n)}}))},t.prototype._basicCornerRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._basicCornerExtraRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"a "+n+" "+n+", 0, 0, 0, "+-n+" "+-n)}}))},t.prototype._basicCornersRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(c(c({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("d","M "+i+" "+r+"v "+n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+n/2+" "+n/2+"h "+n/2+"v "+-n/2+"a "+n/2+" "+n/2+", 0, 0, 0, "+-n/2+" "+-n/2)}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size;this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size;this._basicSquare({x:e,y:n,size:i,rotation:0})},t.prototype._drawRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0,c=a+o+s+l;if(0!==c)if(c>2||a&&o||s&&l)this._basicSquare({x:e,y:n,size:i,rotation:0});else{if(2===c){var h=0;return a&&s?h=Math.PI/2:s&&o?h=Math.PI:o&&l&&(h=-Math.PI/2),void this._basicCornerRounded({x:e,y:n,size:i,rotation:h})}if(1===c)return h=0,s?h=Math.PI/2:o?h=Math.PI:l&&(h=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:i,rotation:h})}else this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0,c=a+o+s+l;if(0!==c)if(c>2||a&&o||s&&l)this._basicSquare({x:e,y:n,size:i,rotation:0});else{if(2===c){var h=0;return a&&s?h=Math.PI/2:s&&o?h=Math.PI:o&&l&&(h=-Math.PI/2),void this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:h})}if(1===c)return h=0,s?h=Math.PI/2:o?h=Math.PI:l&&(h=-Math.PI/2),void this._basicSideRounded({x:e,y:n,size:i,rotation:h})}else this._basicDot({x:e,y:n,size:i,rotation:0})},t.prototype._drawClassy=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0;0!==a+o+s+l?a||s?o||l?this._basicSquare({x:e,y:n,size:i,rotation:0}):this._basicCornerRounded({x:e,y:n,size:i,rotation:Math.PI/2}):this._basicCornerRounded({x:e,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:i,rotation:Math.PI/2})},t.prototype._drawClassyRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.getNeighbor,a=r?+r(-1,0):0,o=r?+r(1,0):0,s=r?+r(0,-1):0,l=r?+r(0,1):0;0!==a+o+s+l?a||s?o||l?this._basicSquare({x:e,y:n,size:i,rotation:0}):this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:e,y:n,size:i,rotation:-Math.PI/2}):this._basicCornersRounded({x:e,y:n,size:i,rotation:Math.PI/2})},t}();var d=function(){return(d=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};const u=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){var r;switch(this._type){case"square":r=this._drawSquare;break;case"extra-rounded":r=this._drawExtraRounded;break;default:r=this._drawDot}r.call(this,{x:t,y:e,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+(i+n/2)+" "+r+"a "+n/2+" "+n/2+" 0 1 0 0.1 0zm 0 "+a+"a "+(n/2-a)+" "+(n/2-a)+" 0 1 1 -0.1 0Z")}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+i+" "+r+"v "+n+"h "+n+"v "+-n+"zM "+(i+a)+" "+(r+a)+"h "+(n-2*a)+"v "+(n-2*a)+"h "+(2*a-n)+"z")}}))},t.prototype._basicExtraRounded=function(t){var e=this,n=t.size,i=t.x,r=t.y,a=n/7;this._rotateFigure(d(d({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","path"),e._element.setAttribute("clip-rule","evenodd"),e._element.setAttribute("d","M "+i+" "+(r+2.5*a)+"v "+2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*a+" "+2.5*a+"h "+2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*a+" "+2.5*-a+"v "+-2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*-a+" "+2.5*-a+"h "+-2*a+"a "+2.5*a+" "+2.5*a+", 0, 0, 0, "+2.5*-a+" "+2.5*a+"M "+(i+2.5*a)+" "+(r+a)+"h "+2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*a+" "+1.5*a+"v "+2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*-a+" "+1.5*a+"h "+-2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*-a+" "+1.5*-a+"v "+-2*a+"a "+1.5*a+" "+1.5*a+", 0, 0, 1, "+1.5*a+" "+1.5*-a)}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicDot({x:e,y:n,size:i,rotation:r})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicSquare({x:e,y:n,size:i,rotation:r})},t.prototype._drawExtraRounded=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicExtraRounded({x:e,y:n,size:i,rotation:r})},t}();var p=function(){return(p=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};const m=function(){function t(t){var e=t.svg,n=t.type;this._svg=e,this._type=n}return t.prototype.draw=function(t,e,n,i){("square"===this._type?this._drawSquare:this._drawDot).call(this,{x:t,y:e,size:n,rotation:i})},t.prototype._rotateFigure=function(t){var e,n=t.x,i=t.y,r=t.size,a=t.rotation,o=void 0===a?0:a,s=n+r/2,l=i+r/2;(0,t.draw)(),null===(e=this._element)||void 0===e||e.setAttribute("transform","rotate("+180*o/Math.PI+","+s+","+l+")")},t.prototype._basicDot=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","circle"),e._element.setAttribute("cx",String(i+n/2)),e._element.setAttribute("cy",String(r+n/2)),e._element.setAttribute("r",String(n/2))}}))},t.prototype._basicSquare=function(t){var e=this,n=t.size,i=t.x,r=t.y;this._rotateFigure(p(p({},t),{draw:function(){e._element=document.createElementNS("http://www.w3.org/2000/svg","rect"),e._element.setAttribute("x",String(i)),e._element.setAttribute("y",String(r)),e._element.setAttribute("width",String(n)),e._element.setAttribute("height",String(n))}}))},t.prototype._drawDot=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicDot({x:e,y:n,size:i,rotation:r})},t.prototype._drawSquare=function(t){var e=t.x,n=t.y,i=t.size,r=t.rotation;this._basicSquare({x:e,y:n,size:i,rotation:r})},t}(),g="circle";var f=function(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))},y=function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},v=[[1,1,1,1,1,1,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,0,0,0,0,0,1],[1,1,1,1,1,1,1]],w=[[0,0,0,0,0,0,0],[0,0,0,0,0,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,1,1,1,0,0],[0,0,0,0,0,0,0],[0,0,0,0,0,0,0]];const b=function(){function t(t){this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("width",String(t.width)),this._element.setAttribute("height",String(t.height)),this._defs=document.createElementNS("http://www.w3.org/2000/svg","defs"),this._element.appendChild(this._defs),this._options=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this._options.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._options.height},enumerable:!1,configurable:!0}),t.prototype.getElement=function(){return this._element},t.prototype.drawQR=function(t){return f(this,void 0,void 0,(function(){var e,n,i,r,a,o,s,c,h,d,u=this;return y(this,(function(p){switch(p.label){case 0:return e=t.getModuleCount(),n=Math.min(this._options.width,this._options.height)-2*this._options.margin,i=this._options.shape===g?n/Math.sqrt(2):n,r=Math.floor(i/e),a={hideXDots:0,hideYDots:0,width:0,height:0},this._qr=t,this._options.image?[4,this.loadImage()]:[3,2];case 1:if(p.sent(),!this._image)return[2];o=this._options,s=o.imageOptions,c=o.qrOptions,h=s.imageSize*l[c.errorCorrectionLevel],d=Math.floor(h*e*e),a=function(t){var e=t.originalHeight,n=t.originalWidth,i=t.maxHiddenDots,r=t.maxHiddenAxisDots,a=t.dotSize,o={x:0,y:0},s={x:0,y:0};if(e<=0||n<=0||i<=0||a<=0)return{height:0,width:0,hideYDots:0,hideXDots:0};var l=e/n;return o.x=Math.floor(Math.sqrt(i/l)),o.x<=0&&(o.x=1),r&&r<o.x&&(o.x=r),o.x%2==0&&o.x--,s.x=o.x*a,o.y=1+2*Math.ceil((o.x*l-1)/2),s.y=Math.round(s.x*l),(o.y*o.x>i||r&&r<o.y)&&(r&&r<o.y?(o.y=r,o.y%2==0&&o.x--):o.y-=2,s.y=o.y*a,o.x=1+2*Math.ceil((o.y/l-1)/2),s.x=Math.round(s.y/l)),{height:s.y,width:s.x,hideYDots:o.y,hideXDots:o.x}}({originalWidth:this._image.width,originalHeight:this._image.height,maxHiddenDots:d,maxHiddenAxisDots:e-14,dotSize:r}),p.label=2;case 2:return this.drawBackground(),this.drawDots((function(t,n){var i,r,o,s,l,c;return!(u._options.imageOptions.hideBackgroundDots&&t>=(e-a.hideXDots)/2&&t<(e+a.hideXDots)/2&&n>=(e-a.hideYDots)/2&&n<(e+a.hideYDots)/2||(null===(i=v[t])||void 0===i?void 0:i[n])||(null===(r=v[t-e+7])||void 0===r?void 0:r[n])||(null===(o=v[t])||void 0===o?void 0:o[n-e+7])||(null===(s=w[t])||void 0===s?void 0:s[n])||(null===(l=w[t-e+7])||void 0===l?void 0:l[n])||(null===(c=w[t])||void 0===c?void 0:c[n-e+7]))})),this.drawCorners(),this._options.image?[4,this.drawImage({width:a.width,height:a.height,count:e,dotSize:r})]:[3,4];case 3:p.sent(),p.label=4;case 4:return[2]}}))}))},t.prototype.drawBackground=function(){var t,e,n,i=this._element,r=this._options;if(i){var a=null===(t=r.backgroundOptions)||void 0===t?void 0:t.gradient,o=null===(e=r.backgroundOptions)||void 0===e?void 0:e.color;if((a||o)&&this._createColor({options:a,color:o,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"background-color"}),null===(n=r.backgroundOptions)||void 0===n?void 0:n.round){var s=Math.min(r.width,r.height),l=document.createElementNS("http://www.w3.org/2000/svg","rect");this._backgroundClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._backgroundClipPath.setAttribute("id","clip-path-background-color"),this._defs.appendChild(this._backgroundClipPath),l.setAttribute("x",String((r.width-s)/2)),l.setAttribute("y",String((r.height-s)/2)),l.setAttribute("width",String(s)),l.setAttribute("height",String(s)),l.setAttribute("rx",String(s/2*r.backgroundOptions.round)),this._backgroundClipPath.appendChild(l)}}},t.prototype.drawDots=function(t){var e,n,i=this;if(!this._qr)throw"QR code is not defined";var r=this._options,a=this._qr.getModuleCount();if(a>r.width||a>r.height)throw"The canvas is too small.";var o=Math.min(r.width,r.height)-2*r.margin,s=r.shape===g?o/Math.sqrt(2):o,l=Math.floor(s/a),c=Math.floor((r.width-a*l)/2),d=Math.floor((r.height-a*l)/2),u=new h({svg:this._element,type:r.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(e=r.dotsOptions)||void 0===e?void 0:e.gradient,color:r.dotsOptions.color,additionalRotation:0,x:0,y:0,height:r.height,width:r.width,name:"dot-color"});for(var p=function(e){for(var r=function(r){return t&&!t(e,r)?"continue":(null===(n=m._qr)||void 0===n?void 0:n.isDark(e,r))?(u.draw(c+e*l,d+r*l,l,(function(n,o){return!(e+n<0||r+o<0||e+n>=a||r+o>=a)&&!(t&&!t(e+n,r+o))&&!!i._qr&&i._qr.isDark(e+n,r+o)})),void(u._element&&m._dotsClipPath&&m._dotsClipPath.appendChild(u._element))):"continue"},o=0;o<a;o++)r(o)},m=this,f=0;f<a;f++)p(f);if(r.shape===g){var y=Math.floor((o/l-a)/2),v=a+2*y,w=c-y*l,b=d-y*l,x=[],S=Math.floor(v/2);for(f=0;f<v;f++){x[f]=[];for(var A=0;A<v;A++)f>=y-1&&f<=v-y&&A>=y-1&&A<=v-y||Math.sqrt((f-S)*(f-S)+(A-S)*(A-S))>S?x[f][A]=0:x[f][A]=this._qr.isDark(A-2*y<0?A:A>=a?A-2*y:A-y,f-2*y<0?f:f>=a?f-2*y:f-y)?1:0}var C=function(t){for(var e=function(e){if(!x[t][e])return"continue";u.draw(w+t*l,b+e*l,l,(function(n,i){var r;return!!(null===(r=x[t+n])||void 0===r?void 0:r[e+i])})),u._element&&k._dotsClipPath&&k._dotsClipPath.appendChild(u._element)},n=0;n<v;n++)e(n)},k=this;for(f=0;f<v;f++)C(f)}},t.prototype.drawCorners=function(){var t=this;if(!this._qr)throw"QR code is not defined";var e=this._element,n=this._options;if(!e)throw"Element code is not defined";var i=this._qr.getModuleCount(),r=Math.min(n.width,n.height)-2*n.margin,a=n.shape===g?r/Math.sqrt(2):r,o=Math.floor(a/i),s=7*o,l=3*o,c=Math.floor((n.width-i*o)/2),d=Math.floor((n.height-i*o)/2);[[0,0,0],[1,0,Math.PI/2],[0,1,-Math.PI/2]].forEach((function(e){var r,a,p,g,f,y,b,x,S,A,C,k,I=e[0],E=e[1],_=e[2],M=c+I*o*(i-7),D=d+E*o*(i-7),P=t._dotsClipPath,T=t._dotsClipPath;if(((null===(r=n.cornersSquareOptions)||void 0===r?void 0:r.gradient)||(null===(a=n.cornersSquareOptions)||void 0===a?void 0:a.color))&&((P=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-square-color-"+I+"-"+E),t._defs.appendChild(P),t._cornersSquareClipPath=t._cornersDotClipPath=T=P,t._createColor({options:null===(p=n.cornersSquareOptions)||void 0===p?void 0:p.gradient,color:null===(g=n.cornersSquareOptions)||void 0===g?void 0:g.color,additionalRotation:_,x:M,y:D,height:s,width:s,name:"corners-square-color-"+I+"-"+E})),null===(f=n.cornersSquareOptions)||void 0===f?void 0:f.type){var L=new u({svg:t._element,type:n.cornersSquareOptions.type});L.draw(M,D,s,_),L._element&&P&&P.appendChild(L._element)}else for(var B=new h({svg:t._element,type:n.dotsOptions.type}),F=function(t){for(var e=function(e){if(!(null===(y=v[t])||void 0===y?void 0:y[e]))return"continue";B.draw(M+t*o,D+e*o,o,(function(n,i){var r;return!!(null===(r=v[t+n])||void 0===r?void 0:r[e+i])})),B._element&&P&&P.appendChild(B._element)},n=0;n<v[t].length;n++)e(n)},R=0;R<v.length;R++)F(R);if(((null===(b=n.cornersDotOptions)||void 0===b?void 0:b.gradient)||(null===(x=n.cornersDotOptions)||void 0===x?void 0:x.color))&&((T=document.createElementNS("http://www.w3.org/2000/svg","clipPath")).setAttribute("id","clip-path-corners-dot-color-"+I+"-"+E),t._defs.appendChild(T),t._cornersDotClipPath=T,t._createColor({options:null===(S=n.cornersDotOptions)||void 0===S?void 0:S.gradient,color:null===(A=n.cornersDotOptions)||void 0===A?void 0:A.color,additionalRotation:_,x:M+2*o,y:D+2*o,height:l,width:l,name:"corners-dot-color-"+I+"-"+E})),null===(C=n.cornersDotOptions)||void 0===C?void 0:C.type){var N=new m({svg:t._element,type:n.cornersDotOptions.type});N.draw(M+2*o,D+2*o,l,_),N._element&&T&&T.appendChild(N._element)}else{B=new h({svg:t._element,type:n.dotsOptions.type});var V=function(t){for(var e=function(e){if(!(null===(k=w[t])||void 0===k?void 0:k[e]))return"continue";B.draw(M+t*o,D+e*o,o,(function(n,i){var r;return!!(null===(r=w[t+n])||void 0===r?void 0:r[e+i])})),B._element&&T&&T.appendChild(B._element)},n=0;n<w[t].length;n++)e(n)};for(R=0;R<w.length;R++)V(R)}}))},t.prototype.loadImage=function(){var t=this;return new Promise((function(e,n){var i=t._options,r=new Image;if(!i.image)return n("Image is not defined");"string"==typeof i.imageOptions.crossOrigin&&(r.crossOrigin=i.imageOptions.crossOrigin),t._image=r,r.onload=function(){e()},r.src=i.image}))},t.prototype.drawImage=function(t){var e=t.width,n=t.height,i=t.count,r=t.dotSize;return f(this,void 0,void 0,(function(){var t,a,o,l,c,h,d,u,p;return y(this,(function(m){switch(m.label){case 0:return t=this._options,a=Math.floor((t.width-i*r)/2),o=Math.floor((t.height-i*r)/2),l=a+t.imageOptions.margin+(i*r-e)/2,c=o+t.imageOptions.margin+(i*r-n)/2,h=e-2*t.imageOptions.margin,d=n-2*t.imageOptions.margin,(u=document.createElementNS("http://www.w3.org/2000/svg","image")).setAttribute("x",String(l)),u.setAttribute("y",String(c)),u.setAttribute("width",h+"px"),u.setAttribute("height",d+"px"),[4,s(t.image||"")];case 1:return p=m.sent(),u.setAttribute("href",p||""),this._element.appendChild(u),[2]}}))}))},t.prototype._createColor=function(t){var e=t.options,n=t.color,i=t.additionalRotation,r=t.x,a=t.y,o=t.height,s=t.width,l=t.name,c=s>o?s:o,h=document.createElementNS("http://www.w3.org/2000/svg","rect");if(h.setAttribute("x",String(r)),h.setAttribute("y",String(a)),h.setAttribute("height",String(o)),h.setAttribute("width",String(s)),h.setAttribute("clip-path","url('#clip-path-"+l+"')"),e){var d;if("radial"===e.type)(d=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",l),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("fx",String(r+s/2)),d.setAttribute("fy",String(a+o/2)),d.setAttribute("cx",String(r+s/2)),d.setAttribute("cy",String(a+o/2)),d.setAttribute("r",String(c/2));else{var u=((e.rotation||0)+i)%(2*Math.PI),p=(u+2*Math.PI)%(2*Math.PI),m=r+s/2,g=a+o/2,f=r+s/2,y=a+o/2;p>=0&&p<=.25*Math.PI||p>1.75*Math.PI&&p<=2*Math.PI?(m-=s/2,g-=o/2*Math.tan(u),f+=s/2,y+=o/2*Math.tan(u)):p>.25*Math.PI&&p<=.75*Math.PI?(g-=o/2,m-=s/2/Math.tan(u),y+=o/2,f+=s/2/Math.tan(u)):p>.75*Math.PI&&p<=1.25*Math.PI?(m+=s/2,g+=o/2*Math.tan(u),f-=s/2,y-=o/2*Math.tan(u)):p>1.25*Math.PI&&p<=1.75*Math.PI&&(g+=o/2,m+=s/2/Math.tan(u),y-=o/2,f-=s/2/Math.tan(u)),(d=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",l),d.setAttribute("gradientUnits","userSpaceOnUse"),d.setAttribute("x1",String(Math.round(m))),d.setAttribute("y1",String(Math.round(g))),d.setAttribute("x2",String(Math.round(f))),d.setAttribute("y2",String(Math.round(y)))}e.colorStops.forEach((function(t){var e=t.offset,n=t.color,i=document.createElementNS("http://www.w3.org/2000/svg","stop");i.setAttribute("offset",100*e+"%"),i.setAttribute("stop-color",n),d.appendChild(i)})),h.setAttribute("fill","url('#"+l+"')"),this._defs.appendChild(d)}else n&&h.setAttribute("fill",n);this._element.appendChild(h)},t}(),x="canvas";for(var S={},A=0;A<=40;A++)S[A]=A;const C={type:x,shape:"square",width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:S[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{round:0,color:"#fff"}};var k=function(){return(k=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function I(t){var e=k({},t);if(!e.colorStops||!e.colorStops.length)throw"Field 'colorStops' is required in gradient";return e.rotation?e.rotation=Number(e.rotation):e.rotation=0,e.colorStops=e.colorStops.map((function(t){return k(k({},t),{offset:Number(t.offset)})})),e}function E(t){var e=k({},t);return e.width=Number(e.width),e.height=Number(e.height),e.margin=Number(e.margin),e.imageOptions=k(k({},e.imageOptions),{hideBackgroundDots:Boolean(e.imageOptions.hideBackgroundDots),imageSize:Number(e.imageOptions.imageSize),margin:Number(e.imageOptions.margin)}),e.margin>Math.min(e.width,e.height)&&(e.margin=Math.min(e.width,e.height)),e.dotsOptions=k({},e.dotsOptions),e.dotsOptions.gradient&&(e.dotsOptions.gradient=I(e.dotsOptions.gradient)),e.cornersSquareOptions&&(e.cornersSquareOptions=k({},e.cornersSquareOptions),e.cornersSquareOptions.gradient&&(e.cornersSquareOptions.gradient=I(e.cornersSquareOptions.gradient))),e.cornersDotOptions&&(e.cornersDotOptions=k({},e.cornersDotOptions),e.cornersDotOptions.gradient&&(e.cornersDotOptions.gradient=I(e.cornersDotOptions.gradient))),e.backgroundOptions&&(e.backgroundOptions=k({},e.backgroundOptions),e.backgroundOptions.gradient&&(e.backgroundOptions.gradient=I(e.backgroundOptions.gradient))),e}var _=n(192),M=n.n(_),D=function(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))},P=function(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}};const T=function(){function t(t){this._options=t?E(a(C,t)):C,this.update()}return t._clearContainer=function(t){t&&(t.innerHTML="")},t.prototype._setupSvg=function(){var t=this;if(this._qr){var e=new b(this._options);this._svg=e.getElement(),this._svgDrawingPromise=e.drawQR(this._qr).then((function(){var n;t._svg&&(null===(n=t._extension)||void 0===n||n.call(t,e.getElement(),t._options))}))}},t.prototype._setupCanvas=function(){var t,e=this;this._qr&&(this._canvas=document.createElement("canvas"),this._canvas.width=this._options.width,this._canvas.height=this._options.height,this._setupSvg(),this._canvasDrawingPromise=null===(t=this._svgDrawingPromise)||void 0===t?void 0:t.then((function(){if(e._svg){var t=e._svg,n=(new XMLSerializer).serializeToString(t),i="data:image/svg+xml;base64,"+btoa(n),r=new Image;return new Promise((function(t){r.onload=function(){var n,i;null===(i=null===(n=e._canvas)||void 0===n?void 0:n.getContext("2d"))||void 0===i||i.drawImage(r,0,0),t()},r.src=i}))}})))},t.prototype._getElement=function(t){return void 0===t&&(t="png"),D(this,void 0,void 0,(function(){return P(this,(function(e){switch(e.label){case 0:if(!this._qr)throw"QR code is empty";return"svg"!==t.toLowerCase()?[3,2]:(this._svg&&this._svgDrawingPromise||this._setupSvg(),[4,this._svgDrawingPromise]);case 1:return e.sent(),[2,this._svg];case 2:return this._canvas&&this._canvasDrawingPromise||this._setupCanvas(),[4,this._canvasDrawingPromise];case 3:return e.sent(),[2,this._canvas]}}))}))},t.prototype.update=function(e){t._clearContainer(this._container),this._options=e?E(a(this._options,e)):this._options,this._options.data&&(this._qr=M()(this._options.qrOptions.typeNumber,this._options.qrOptions.errorCorrectionLevel),this._qr.addData(this._options.data,this._options.qrOptions.mode||function(t){switch(!0){case/^[0-9]*$/.test(t):return"Numeric";case/^[0-9A-Z $%*+\-./:]*$/.test(t):return"Alphanumeric";default:return"Byte"}}(this._options.data)),this._qr.make(),this._options.type===x?this._setupCanvas():this._setupSvg(),this.append(this._container))},t.prototype.append=function(t){if(t){if("function"!=typeof t.appendChild)throw"Container should be a single DOM node";this._options.type===x?this._canvas&&t.appendChild(this._canvas):this._svg&&t.appendChild(this._svg),this._container=t}},t.prototype.applyExtension=function(t){if(!t)throw"Extension function should be defined.";this._extension=t,this.update()},t.prototype.deleteExtension=function(){this._extension=void 0,this.update()},t.prototype.getRawData=function(t){return void 0===t&&(t="png"),D(this,void 0,void 0,(function(){var e,n,i;return P(this,(function(r){switch(r.label){case 0:if(!this._qr)throw"QR code is empty";return[4,this._getElement(t)];case 1:return(e=r.sent())?"svg"===t.toLowerCase()?(n=new XMLSerializer,i=n.serializeToString(e),[2,new Blob(['<?xml version="1.0" standalone="no"?>\r\n'+i],{type:"image/svg+xml"})]):[2,new Promise((function(n){return e.toBlob(n,"image/"+t,1)}))]:[2,null]}}))}))},t.prototype.download=function(t){return D(this,void 0,void 0,(function(){var e,n,i,r,a;return P(this,(function(s){switch(s.label){case 0:if(!this._qr)throw"QR code is empty";return e="png",n="qr","string"==typeof t?(e=t,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof t&&null!==t&&(t.name&&(n=t.name),t.extension&&(e=t.extension)),[4,this._getElement(e)];case 1:return(i=s.sent())?("svg"===e.toLowerCase()?(r=new XMLSerializer,a='<?xml version="1.0" standalone="no"?>\r\n'+(a=r.serializeToString(i)),o("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(a),n+".svg")):o(i.toDataURL("image/"+e),n+"."+e),[2]):[2]}}))}))},t}()}},e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{}};return t[i](r,r.exports,n),r.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(676)})().default},7372:(t,e,n)=>{var i=n(1594),r=t.exports;!function(){"use strict";var t,e,n,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function s(t){return a.lastIndex=0,a.test(t)?'"'+t.replace(a,(function(t){var e=o[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function l(r,a){var o,c,h,d,u,p=t,m=a[r],g=null!=m&&(m instanceof i||i.isBigNumber(m));switch(m&&"object"==typeof m&&"function"==typeof m.toJSON&&(m=m.toJSON(r)),"function"==typeof n&&(m=n.call(a,r,m)),typeof m){case"string":return g?m:s(m);case"number":return isFinite(m)?String(m):"null";case"boolean":case"null":case"bigint":return String(m);case"object":if(!m)return"null";if(t+=e,u=[],"[object Array]"===Object.prototype.toString.apply(m)){for(d=m.length,o=0;o<d;o+=1)u[o]=l(o,m)||"null";return h=0===u.length?"[]":t?"[\n"+t+u.join(",\n"+t)+"\n"+p+"]":"["+u.join(",")+"]",t=p,h}if(n&&"object"==typeof n)for(d=n.length,o=0;o<d;o+=1)"string"==typeof n[o]&&(h=l(c=n[o],m))&&u.push(s(c)+(t?": ":":")+h);else Object.keys(m).forEach((function(e){var n=l(e,m);n&&u.push(s(e)+(t?": ":":")+n)}));return h=0===u.length?"{}":t?"{\n"+t+u.join(",\n"+t)+"\n"+p+"}":"{"+u.join(",")+"}",t=p,h}}"function"!=typeof r.stringify&&(r.stringify=function(i,r,a){var o;if(t="",e="","number"==typeof a)for(o=0;o<a;o+=1)e+=" ";else"string"==typeof a&&(e=a);if(n=r,r&&"function"!=typeof r&&("object"!=typeof r||"number"!=typeof r.length))throw new Error("JSON.stringify");return l("",{"":i})})}()},7425:(t,e,n)=>{"use strict";n.d(e,{D:()=>h,a:()=>C,b:()=>k,c:()=>p,d:()=>E,e:()=>c,f:()=>d,g:()=>u,h:()=>M,i:()=>I,j:()=>g,r:()=>f});var i=n(8287),r=n(1704),a=n(3899),o=n(6880);function s(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))}class l extends Error{constructor(t,e,...n){super(...n),Error.captureStackTrace&&Error.captureStackTrace(this,l),this.name="DeflyWalletConnectError",this.data=t,this.message=e}}const c="defly-wallet-connect-modal-wrapper",h="defly-wallet-redirect-modal-wrapper",d="defly-wallet-sign-txn-toast-wrapper",u="defly-wallet-sign-txn-modal-wrapper",p="defly-wallet-modal";function m(t){const e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e}function g(){f(d)}function f(t){const e=document.getElementById(t);e&&e.remove()}const y="DeflyWallet.Wallet",v="walletconnect";function w(){return"undefined"==typeof localStorage?void 0:localStorage}function b(t){const e=t.slice();for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1));[e[t],e[n]]=[e[n],e[t]]}return e}function x(){return s(this,void 0,void 0,(function*(){let t={bridgeURL:"",shouldUseSound:!0,silent:!1};try{const e=yield function(t,e={}){return fetch("https://static.defly.app/wc-bridge-servers.json",e).then((t=>t.json())).then((t=>t))}(0,{cache:"no-store"});void 0!==e.use_sound&&(t.shouldUseSound=e.use_sound),void 0!==e.silent&&(t.silent=e.silent),t=Object.assign(Object.assign({},t),{bridgeURL:b(e.servers||[])[0]||""})}catch(t){console.log(t)}return t}))}function S(t){return Uint8Array.from(window.atob(t),(t=>t.charCodeAt(0)))}function A(){return"undefined"!=typeof navigator}function C(){return A()&&/Android/i.test(navigator.userAgent)}function k(){return A()&&/iPhone|iPad|iPod/i.test(navigator.userAgent)}function I(){return A()&&/iPhone|iPod|iPad|Android/i.test(navigator.userAgent)}function E(){if(!A())return null;const{userAgent:t}=navigator;let e;return e=t.match(/DuckDuckGo/i)?"DuckDuckGo":t.match(/OPX/i)?"Opera GX":navigator.brave?"Brave":o.getParser(navigator.userAgent).getBrowserName(),e}function _({shouldUseSound:t}){return{open:(e={shouldUseSound:t},t=>{if(!document.getElementById(c)){const n=m(c),i=`${t}&algorand=true`,{shouldUseSound:r}=e;n.innerHTML=`<defly-wallet-connect-modal uri="${i}" should-use-sound="${r}"></defly-wallet-connect-modal>`}}),close:()=>f(c)};var e}class M{constructor(t){this.bridge=(null==t?void 0:t.bridge)||"",this.connector=null,this.shouldShowSignTxnToast=void 0===(null==t?void 0:t.shouldShowSignTxnToast)||t.shouldShowSignTxnToast,this.chainId=null==t?void 0:t.chainId}get platform(){return function(){const t=function(){var t;const e=null===(t=w())||void 0===t?void 0:t.getItem(y);return e?JSON.parse(e):null}();let e=null;return"defly-wallet"===(null==t?void 0:t.type)&&(e="mobile"),e}()}get isConnected(){return"mobile"===this.platform&&!!this.connector}connect(){return new Promise(((t,e)=>s(this,void 0,void 0,(function*(){var n;try{if(null===(n=this.connector)||void 0===n?void 0:n.connected)try{yield this.connector.killSession()}catch(t){}const{bridgeURL:i,shouldUseSound:a}=yield x();this.connector=new r.A({bridge:this.bridge||i||"https://bridge.walletconnect.org",qrcodeModal:_({shouldUseSound:a})}),yield this.connector.createSession({chainId:this.chainId||4160}),function(t){var e,n,i,r;const a=document.getElementById(c),o=null===(n=null===(e=null==a?void 0:a.querySelector("defly-wallet-connect-modal"))||void 0===e?void 0:e.shadowRoot)||void 0===n?void 0:n.querySelector(`.${p}`),s=null===(r=null===(i=null==o?void 0:o.querySelector("defly-wallet-modal-header"))||void 0===i?void 0:i.shadowRoot)||void 0===r?void 0:r.getElementById("defly-wallet-modal-header-close-button");null==s||s.addEventListener("click",(()=>{t(),f(c)}))}((()=>e(new l({type:"CONNECT_MODAL_CLOSED"},"Connect modal is closed by user")))),this.connector.on("connect",((n,i)=>{var r,a;n&&e(n),t((null===(r=this.connector)||void 0===r?void 0:r.accounts)||[]),function(t){var e;null===(e=w())||void 0===e||e.setItem(y,JSON.stringify({type:"defly-wallet",accounts:t,selectedAccount:t[0]}))}((null===(a=this.connector)||void 0===a?void 0:a.accounts)||[])}))}catch(t){e(new l({type:"SESSION_CONNECT",detail:t},t.message||"There was an error while connecting to Defly Wallet"))}}))))}reconnectSession(){return new Promise(((t,e)=>s(this,void 0,void 0,(function*(){var n,i;try{this.connector&&t(this.connector.accounts||[]),this.bridge=(null===(n=function(){var t;const e=null===(t=w())||void 0===t?void 0:t.getItem(v);return e?JSON.parse(e):null}())||void 0===n?void 0:n.bridge)||"",this.bridge&&(this.connector=new r.A({bridge:this.bridge}),t((null===(i=this.connector)||void 0===i?void 0:i.accounts)||[])),this.isConnected||t([])}catch(t){yield this.disconnect(),e(new l({type:"SESSION_RECONNECT",detail:t},t.message||"There was an error while reconnecting to Defly Wallet"))}}))))}disconnect(){var t;return s(this,void 0,void 0,(function*(){let e;this.isConnected&&"mobile"===this.platform&&(e=null===(t=this.connector)||void 0===t?void 0:t.killSession(),null==e||e.then((()=>{this.connector=null}))),yield new Promise(((t,e)=>{var n,i;try{null===(n=w())||void 0===n||n.removeItem(v),null===(i=w())||void 0===i||i.removeItem(y),t(void 0)}catch(t){e(t)}}))}))}signTransactionWithMobile(t){return s(this,void 0,void 0,(function*(){const e=(n=[t],{id:Date.now()*Math.pow(10,3)+Math.floor(Math.random()*Math.pow(10,3)),jsonrpc:"2.0",method:"algo_signTxn",params:n});var n;try{try{const{silent:t}=yield x(),n=(yield this.connector.sendCustomRequest(e,{forcePushNotification:!t})).filter(Boolean);return"string"==typeof n[0]?n.map(S):n.map((t=>Uint8Array.from(t)))}catch(t){return yield Promise.reject(new l({type:"SIGN_TRANSACTIONS",detail:t},t.message||"Failed to sign transaction"))}}finally{f(h),f(d)}}))}signTransaction(t,e){return s(this,void 0,void 0,(function*(){if("mobile"===this.platform&&(I()?m(h).innerHTML="<defly-wallet-redirect-modal></defly-wallet-redirect-modal>":!I()&&this.shouldShowSignTxnToast&&(m(d).innerHTML="<defly-wallet-sign-txn-toast></defly-wallet-sign-txn-toast>"),!this.connector))throw new Error("DeflyWalletConnect was not initialized correctly.");const n=t.flatMap((t=>t.map((t=>function(t,e){let n;e&&!(t.signers||[]).includes(e)&&(n=[]);const i={txn:(r=t.txn,Buffer.from(a.Ay$.encodeUnsignedTransaction(r)).toString("base64"))};var r;return Array.isArray(n)&&(i.signers=n),t.authAddr&&(i.authAddr=t.authAddr),t.message&&(i.message=t.message),t.msig&&(i.msig=t.msig),i}(t,e)))));return this.signTransactionWithMobile(n)}))}}"undefined"!=typeof window&&(window.global=window,window.Buffer=window.Buffer||i.hp,Promise.resolve().then(n.bind(n,5975)))},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=s(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){var e,n,a=s(t),o=a[0],l=a[1],c=new r(function(t,e,n){return 3*(e+n)/4-n}(0,o,l)),h=0,d=l>0?o-4:o;for(n=0;n<d;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],c[h++]=e>>16&255,c[h++]=e>>8&255,c[h++]=255&e;return 2===l&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,c[h++]=255&e),1===l&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,c[h++]=e>>8&255,c[h++]=255&e),c},e.fromByteArray=function(t){for(var e,i=t.length,r=i%3,a=[],o=16383,s=0,c=i-r;s<c;s+=o)a.push(l(t,s,s+o>c?c:s+o));return 1===r?(e=t[i-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===r&&(e=(t[i-2]<<8)+t[i-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),a.join("")};for(var n=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=a[o],i[a.charCodeAt(o)]=o;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,i){for(var r,a,o=[],s=e;s<i;s+=3)r=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(n[(a=r)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},7659:t=>{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},7790:()=>{},7825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,r&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},8146:(t,e,n)=>{var i=null;const r=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,a=/(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;t.exports=function(t){"use strict";var e={strict:!1,storeAsString:!1,alwaysParseAsBig:!1,useNativeBigInt:!1,protoAction:"error",constructorAction:"error"};if(null!=t){if(!0===t.strict&&(e.strict=!0),!0===t.storeAsString&&(e.storeAsString=!0),e.alwaysParseAsBig=!0===t.alwaysParseAsBig&&t.alwaysParseAsBig,e.useNativeBigInt=!0===t.useNativeBigInt&&t.useNativeBigInt,void 0!==t.constructorAction){if("error"!==t.constructorAction&&"ignore"!==t.constructorAction&&"preserve"!==t.constructorAction)throw new Error(`Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${t.constructorAction}`);e.constructorAction=t.constructorAction}if(void 0!==t.protoAction){if("error"!==t.protoAction&&"ignore"!==t.protoAction&&"preserve"!==t.protoAction)throw new Error(`Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${t.protoAction}`);e.protoAction=t.protoAction}}var o,s,l,c,h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},d=function(t){throw{name:"SyntaxError",message:t,at:o,text:l}},u=function(t){return t&&t!==s&&d("Expected '"+t+"' instead of '"+s+"'"),s=l.charAt(o),o+=1,s},p=function(){var t,r="";for("-"===s&&(r="-",u("-"));s>="0"&&s<="9";)r+=s,u();if("."===s)for(r+=".";u()&&s>="0"&&s<="9";)r+=s;if("e"===s||"E"===s)for(r+=s,u(),"-"!==s&&"+"!==s||(r+=s,u());s>="0"&&s<="9";)r+=s,u();if(t=+r,isFinite(t))return null==i&&(i=n(1594)),r.length>15?e.storeAsString?r:e.useNativeBigInt?BigInt(r):new i(r):e.alwaysParseAsBig?e.useNativeBigInt?BigInt(t):new i(t):t;d("Bad number")},m=function(){var t,e,n,i="";if('"'===s)for(var r=o;u();){if('"'===s)return o-1>r&&(i+=l.substring(r,o-1)),u(),i;if("\\"===s){if(o-1>r&&(i+=l.substring(r,o-1)),u(),"u"===s){for(n=0,e=0;e<4&&(t=parseInt(u(),16),isFinite(t));e+=1)n=16*n+t;i+=String.fromCharCode(n)}else{if("string"!=typeof h[s])break;i+=h[s]}r=o}}d("Bad string")},g=function(){for(;s&&s<=" ";)u()};return c=function(){switch(g(),s){case"{":return function(){var t,n=Object.create(null);if("{"===s){if(u("{"),g(),"}"===s)return u("}"),n;for(;s;){if(t=m(),g(),u(":"),!0===e.strict&&Object.hasOwnProperty.call(n,t)&&d('Duplicate key "'+t+'"'),!0===r.test(t)?"error"===e.protoAction?d("Object contains forbidden prototype property"):"ignore"===e.protoAction?c():n[t]=c():!0===a.test(t)?"error"===e.constructorAction?d("Object contains forbidden constructor property"):"ignore"===e.constructorAction?c():n[t]=c():n[t]=c(),g(),"}"===s)return u("}"),n;u(","),g()}}d("Bad object")}();case"[":return function(){var t=[];if("["===s){if(u("["),g(),"]"===s)return u("]"),t;for(;s;){if(t.push(c()),g(),"]"===s)return u("]"),t;u(","),g()}}d("Bad array")}();case'"':return m();case"-":return p();default:return s>="0"&&s<="9"?p():function(){switch(s){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}d("Unexpected '"+s+"'")}()}},function(t,e){var n;return l=t+"",o=0,s=" ",n=c(),g(),s&&d("Syntax error"),"function"==typeof e?function t(n,i){var r,a=n[i];return a&&"object"==typeof a&&Object.keys(a).forEach((function(e){void 0!==(r=t(a,e))?a[e]=r:delete a[e]})),e.call(n,i,a)}({"":n},""):n}}},8186:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__assign:()=>a,__asyncDelegator:()=>b,__asyncGenerator:()=>w,__asyncValues:()=>x,__await:()=>v,__awaiter:()=>h,__classPrivateFieldGet:()=>k,__classPrivateFieldSet:()=>I,__createBinding:()=>u,__decorate:()=>s,__exportStar:()=>p,__extends:()=>r,__generator:()=>d,__importDefault:()=>C,__importStar:()=>A,__makeTemplateObject:()=>S,__metadata:()=>c,__param:()=>l,__read:()=>g,__rest:()=>o,__spread:()=>f,__spreadArrays:()=>y,__values:()=>m});var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},i(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},a.apply(this,arguments)};function o(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}function s(t,e,n,i){var r,a=arguments.length,o=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,n,o):r(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function l(t,e){return function(n,i){e(n,i,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,n,i){return new(n||(n=Promise))((function(r,a){function o(t){try{l(i.next(t))}catch(t){a(t)}}function s(t){try{l(i.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,s)}l((i=i.apply(t,e||[])).next())}))}function d(t,e){var n,i,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],i=0}finally{n=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function u(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}function p(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||(e[n]=t[n])}function m(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,a=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=a.next()).done;)o.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o}function f(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(g(arguments[e]));return t}function y(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var i=Array(t),r=0;for(e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function w(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=n.apply(t,e||[]),a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(t){r[t]&&(i[t]=function(e){return new Promise((function(n,i){a.push([t,e,n,i])>1||s(t,e)}))})}function s(t,e){try{(n=r[t](e)).value instanceof v?Promise.resolve(n.value.v).then(l,c):h(a[0][2],n)}catch(t){h(a[0][3],t)}var n}function l(t){s("next",t)}function c(t){s("throw",t)}function h(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function b(t){var e,n;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,r){e[i]=t[i]?function(e){return(n=!n)?{value:v(t[i](e)),done:"return"===i}:r?r(e):e}:r}}function x(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=m(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(n){e[n]=t[n]&&function(e){return new Promise((function(i,r){!function(t,e,n,i){Promise.resolve(i).then((function(e){t({value:e,done:n})}),e)}(i,r,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function C(t){return t&&t.__esModule?t:{default:t}}function k(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function I(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},8196:(t,e)=>{"use strict";function n(t){let e;return"undefined"!=typeof window&&void 0!==window[t]&&(e=window[t]),e}function i(t){const e=n(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}Object.defineProperty(e,"__esModule",{value:!0}),e.getLocalStorage=e.getLocalStorageOrThrow=e.getCrypto=e.getCryptoOrThrow=e.getLocation=e.getLocationOrThrow=e.getNavigator=e.getNavigatorOrThrow=e.getDocument=e.getDocumentOrThrow=e.getFromWindowOrThrow=e.getFromWindow=void 0,e.getFromWindow=n,e.getFromWindowOrThrow=i,e.getDocumentOrThrow=function(){return i("document")},e.getDocument=function(){return n("document")},e.getNavigatorOrThrow=function(){return i("navigator")},e.getNavigator=function(){return n("navigator")},e.getLocationOrThrow=function(){return i("location")},e.getLocation=function(){return n("location")},e.getCryptoOrThrow=function(){return i("crypto")},e.getCrypto=function(){return n("crypto")},e.getLocalStorageOrThrow=function(){return i("localStorage")},e.getLocalStorage=function(){return n("localStorage")}},8287:(t,e,n)=>{"use strict";const i=n(7526),r=n(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;const o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return d(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|g(t,e);let i=s(n);const r=i.write(t,e);return r!==n&&(i=i.slice(0,r)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return u(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return l.from(i,e,n);const r=function(t){if(l.isBuffer(t)){const e=0|m(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?s(0):u(t):"Buffer"===t.type&&Array.isArray(t.data)?u(t.data):void 0}(t);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function d(t){return h(t),s(t<0?0:0|m(t))}function u(t){const e=t.length<0?0:0|m(t.length),n=s(e);for(let i=0;i<e;i+=1)n[i]=255&t[i];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let i;return i=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(i,l.prototype),i}function m(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function g(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;let r=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(t).length;default:if(r)return i?-1:j(t).length;e=(""+e).toLowerCase(),r=!0}}function f(t,e,n){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return I(this,e,n);case"ascii":return _(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function y(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function v(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:w(t,e,n,i,r);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):w(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function w(t,e,n,i,r){let a,o=1,s=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){let i=-1;for(a=n;a<s;a++)if(c(t,a)===c(e,-1===i?0:a-i)){if(-1===i&&(i=a),a-i+1===l)return i*o}else-1!==i&&(a-=a-i),i=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){let n=!0;for(let i=0;i<l;i++)if(c(t,a+i)!==c(e,i)){n=!1;break}if(n)return a}return-1}function b(t,e,n,i){n=Number(n)||0;const r=t.length-n;i?(i=Number(i))>r&&(i=r):i=r;const a=e.length;let o;for(i>a/2&&(i=a/2),o=0;o<i;++o){const i=parseInt(e.substr(2*o,2),16);if(J(i))return o;t[n+o]=i}return o}function x(t,e,n,i){return U(j(e,t.length-n),t,n,i)}function S(t,e,n,i){return U(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,i)}function A(t,e,n,i){return U(X(e),t,n,i)}function C(t,e,n,i){return U(function(t,e){let n,i,r;const a=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),i=n>>8,r=n%256,a.push(r),a.push(i);return a}(e,t.length-n),t,n,i)}function k(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function I(t,e,n){n=Math.min(t.length,n);const i=[];let r=e;for(;r<n;){const e=t[r];let a=null,o=e>239?4:e>223?3:e>191?2:1;if(r+o<=n){let n,i,s,l;switch(o){case 1:e<128&&(a=e);break;case 2:n=t[r+1],128==(192&n)&&(l=(31&e)<<6|63&n,l>127&&(a=l));break;case 3:n=t[r+1],i=t[r+2],128==(192&n)&&128==(192&i)&&(l=(15&e)<<12|(63&n)<<6|63&i,l>2047&&(l<55296||l>57343)&&(a=l));break;case 4:n=t[r+1],i=t[r+2],s=t[r+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(l=(15&e)<<18|(63&n)<<12|(63&i)<<6|63&s,l>65535&&l<1114112&&(a=l))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),r+=o}return function(t){const e=t.length;if(e<=E)return String.fromCharCode.apply(String,t);let n="",i=0;for(;i<e;)n+=String.fromCharCode.apply(String,t.slice(i,i+=E));return n}(i)}l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,n){return function(t,e,n){return h(t),t<=0?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}(t,e,n)},l.allocUnsafe=function(t){return d(t)},l.allocUnsafeSlow=function(t){return d(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(K(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,i=e.length;for(let r=0,a=Math.min(n,i);r<a;++r)if(t[r]!==e[r]){n=t[r],i=e[r];break}return n<i?-1:i<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const i=l.allocUnsafe(e);let r=0;for(n=0;n<t.length;++n){let e=t[n];if(K(e,Uint8Array))r+e.length>i.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(i,r)):Uint8Array.prototype.set.call(i,e,r);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(i,r)}r+=e.length}return i},l.byteLength=g,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):f.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let t="";const n=e.IS;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(t,e,n,i,r){if(K(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;let a=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0);const s=Math.min(a,o),c=this.slice(i,r),h=t.slice(e,n);for(let t=0;t<s;++t)if(c[t]!==h[t]){a=c[t],o=h[t];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},l.prototype.write=function(t,e,n,i){if(void 0===e)i="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)i=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}const r=this.length-e;if((void 0===n||n>r)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let a=!1;for(;;)switch(i){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return S(this,t,e,n);case"base64":return A(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function _(t,e,n){let i="";n=Math.min(t.length,n);for(let r=e;r<n;++r)i+=String.fromCharCode(127&t[r]);return i}function M(t,e,n){let i="";n=Math.min(t.length,n);for(let r=e;r<n;++r)i+=String.fromCharCode(t[r]);return i}function D(t,e,n){const i=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>i)&&(n=i);let r="";for(let i=e;i<n;++i)r+=q[t[i]];return r}function P(t,e,n){const i=t.slice(e,n);let r="";for(let t=0;t<i.length-1;t+=2)r+=String.fromCharCode(i[t]+256*i[t+1]);return r}function T(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,i,r,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||e<a)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function B(t,e,n,i,r){O(e,i,r,t,n,7);let a=Number(e&BigInt(4294967295));t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,n}function F(t,e,n,i,r){O(e,i,r,t,n,7);let a=Number(e&BigInt(4294967295));t[n+7]=a,a>>=8,t[n+6]=a,a>>=8,t[n+5]=a,a>>=8,t[n+4]=a;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=o,o>>=8,t[n+2]=o,o>>=8,t[n+1]=o,o>>=8,t[n]=o,n+8}function R(t,e,n,i,r,a){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,a){return e=+e,n>>>=0,a||R(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function V(t,e,n,i,a){return e=+e,n>>>=0,a||R(t,0,n,8),r.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const i=this.subarray(t,e);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);let i=this[t],r=1,a=0;for(;++a<e&&(r*=256);)i+=this[t+a]*r;return i},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);let i=this[t+--e],r=1;for(;e>0&&(r*=256);)i+=this[t+--e]*r;return i},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||T(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=$((function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||Y(t,this.length-8);const i=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,r=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(i)+(BigInt(r)<<BigInt(32))})),l.prototype.readBigUInt64BE=$((function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||Y(t,this.length-8);const i=e*2**24+65536*this[++t]+256*this[++t]+this[++t],r=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(i)<<BigInt(32))+BigInt(r)})),l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);let i=this[t],r=1,a=0;for(;++a<e&&(r*=256);)i+=this[t+a]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||T(t,e,this.length);let i=e,r=1,a=this[t+--i];for(;i>0&&(r*=256);)a+=this[t+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return t>>>=0,e||T(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||T(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||T(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||T(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=$((function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||Y(t,this.length-8);const i=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(i)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=$((function(t){Z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||Y(t,this.length-8);const i=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(i)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||T(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||T(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||T(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||T(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||L(this,t,e,n,Math.pow(2,8*n)-1,0);let r=1,a=0;for(this[e]=255&t;++a<n&&(r*=256);)this[e+a]=t/r&255;return e+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,i){t=+t,e>>>=0,n>>>=0,i||L(this,t,e,n,Math.pow(2,8*n)-1,0);let r=n-1,a=1;for(this[e+r]=255&t;--r>=0&&(a*=256);)this[e+r]=t/a&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=$((function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=$((function(t,e=0){return F(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}let r=0,a=1,o=0;for(this[e]=255&t;++r<n&&(a*=256);)t<0&&0===o&&0!==this[e+r-1]&&(o=1),this[e+r]=(t/a|0)-o&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e>>>=0,!i){const i=Math.pow(2,8*n-1);L(this,t,e,n,i-1,-i)}let r=n-1,a=1,o=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===o&&0!==this[e+r+1]&&(o=1),this[e+r]=(t/a|0)-o&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=$((function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=$((function(t,e=0){return F(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);const r=i-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,i):Uint8Array.prototype.set.call(t,this.subarray(n,i),e),r},l.prototype.fill=function(t,e,n,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){const e=t.charCodeAt(0);("utf8"===i&&e<128||"latin1"===i)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let r;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(r=e;r<n;++r)this[r]=t;else{const a=l.isBuffer(t)?t:l.from(t,i),o=a.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(r=0;r<n-e;++r)this[r+e]=a[r%o]}return this};const z={};function G(t,e,n){z[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function W(t){let e="",n=t.length;const i="-"===t[0]?1:0;for(;n>=i+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function O(t,e,n,i,r,a){if(t>n||t<e){const i="bigint"==typeof e?"n":"";let r;throw r=a>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(a+1)}${i}`:`>= -(2${i} ** ${8*(a+1)-1}${i}) and < 2 ** ${8*(a+1)-1}${i}`:`>= ${e}${i} and <= ${n}${i}`,new z.ERR_OUT_OF_RANGE("value",r,t)}!function(t,e,n){Z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||Y(e,t.length-(n+1))}(i,r,a)}function Z(t,e){if("number"!=typeof t)throw new z.ERR_INVALID_ARG_TYPE(e,"number",t)}function Y(t,e,n){if(Math.floor(t)!==t)throw Z(t,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}G("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),G("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),G("ERR_OUT_OF_RANGE",(function(t,e,n){let i=`The value of "${t}" is out of range.`,r=n;return Number.isInteger(n)&&Math.abs(n)>2**32?r=W(String(n)):"bigint"==typeof n&&(r=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(r=W(r)),r+="n"),i+=` It must be ${e}. Received ${r}`,i}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function j(t,e){let n;e=e||1/0;const i=t.length;let r=null;const a=[];for(let o=0;o<i;++o){if(n=t.charCodeAt(o),n>55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function X(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,n,i){let r;for(r=0;r<i&&!(r+n>=e.length||r>=t.length);++r)e[r+n]=t[r];return r}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const q=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const i=16*n;for(let r=0;r<16;++r)e[i+r]=t[n]+t[r]}return e}();function $(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8331:(t,e,n)=>{"use strict";n.r(e);var i=n(4256),r=n(7283),a=n(494);function o(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}n(1704),n(3899),n(6880);var s=".pera-wallet-modal-header {\n position: absolute;\n top: -44px;\n right: 0px;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.pera-wallet-modal-header--mobile {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n position: static;\n}\n.pera-wallet-modal-header--mobile .pera-wallet-modal-header__close-button {\n width: 24px;\n height: 24px;\n margin: 0;\n padding: 0;\n background: transparent;\n border: unset;\n box-shadow: unset;\n}\n\n.pera-wallet-modal-header__brand {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n font-weight: 600;\n line-height: 24px;\n letter-spacing: -0.1px;\n color: #ffffff;\n}\n\n.pera-wallet-modal-header__brand-text {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.pera-wallet-modal-header__version-number {\n color: #9d9dae;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n letter-spacing: 0.01;\n}\n\n.pera-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.pera-wallet-modal-header__close-button {\n width: 32px;\n height: 32px;\n margin: 0;\n padding: 0;\n background: rgba(44, 53, 89, 0.1);\n border-radius: 8px;\n}\n\n.pera-wallet-modal-header__close-button__close-icon {\n width: 20px;\n height: 20px;\n}";o(s);const l=document.createElement("template"),c=(0,i.i)()?"pera-wallet-modal-header pera-wallet-modal-header--mobile":"pera-wallet-modal-header pera-wallet-modal-header--desktop";l.innerHTML=`\n <div class="${c}">\n ${(0,i.i)()?"":"<div class=\"pera-wallet-modal-header__brand\">\n <img src=\"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='24' height='24' rx='4.8' fill='%23FFEE55'/%3e%3cpath d='M13.0408 5.92462C13.413 7.46693 13.2872 8.8236 12.7597 8.95482C12.2322 9.08605 11.5028 7.94214 11.1306 6.39983C10.7583 4.85752 10.8842 3.50085 11.4117 3.36963C11.9391 3.2384 12.6685 4.38231 13.0408 5.92462Z' fill='black'/%3e%3cpath d='M19.1876 7.25063C18.3632 6.37689 16.7231 6.61371 15.5243 7.77959C14.3254 8.94547 14.0219 10.5989 14.8463 11.4727C15.6707 12.3464 17.3108 12.1096 18.5097 10.9437C19.7085 9.77781 20.012 8.12438 19.1876 7.25063Z' fill='black'/%3e%3cpath d='M12.6308 20.6297C13.1583 20.4985 13.2656 19.0651 12.8705 17.4281C12.4754 15.7911 11.7275 14.5705 11.2 14.7017C10.6725 14.8329 10.5652 16.2663 10.9603 17.9033C11.3554 19.5403 12.1033 20.7609 12.6308 20.6297Z' fill='black'/%3e%3cpath d='M7.25371 8.05056C8.77551 8.49933 9.8875 9.28664 9.73741 9.80906C9.58731 10.3315 8.23197 10.3912 6.71016 9.94242C5.18836 9.49364 4.07637 8.70633 4.22646 8.18391C4.37656 7.66149 5.7319 7.60178 7.25371 8.05056Z' fill='black'/%3e%3cpath d='M17.1309 13.9497C18.7461 14.4261 19.9338 15.2357 19.7837 15.7581C19.6336 16.2806 18.2025 16.3179 16.5873 15.8416C14.9721 15.3653 13.7844 14.5556 13.9345 14.0332C14.0846 13.5108 15.5157 13.4734 17.1309 13.9497Z' fill='black'/%3e%3cpath d='M8.96609 12.8536C8.5887 12.4624 7.35088 13.0318 6.20133 14.1253C5.05177 15.2188 4.42581 16.4225 4.80319 16.8137C5.18058 17.2048 6.4184 16.6355 7.56796 15.542C8.71751 14.4484 9.34347 13.2448 8.96609 12.8536Z' fill='black'/%3e%3c/svg%3e\" />\n\n <div class=\"pera-wallet-modal-header__brand-text\">\n <span>Pera Connect</span>\n\n <span class=\"pera-wallet-modal-header__version-number\">v1.4.2</span>\n </div>\n </div>\n "} \n\n <button\n id="pera-wallet-modal-header-close-button"\n class="pera-wallet-button pera-wallet-modal-header__close-button">\n <img\n class="pera-wallet-modal-header__close-button__close-icon"\n src="${(0,i.i)()?"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18 6L12 12M12 12L6 18M12 12L18 18M12 12L6 6' stroke='%232C3559' stroke-width='2'/%3e%3c/svg%3e":"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18 6L12 12M12 12L6 18M12 12L18 18M12 12L6 6' stroke='white' stroke-width='2'/%3e%3c/svg%3e"}"\n />\n </button>\n </div>\n`;class h extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=s,this.shadowRoot.append(l.content.cloneNode(!0),t),this.onClose()}}onClose(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-modal-header-close-button"),n=this.getAttribute("modal-id");e&&n===i.P&&e.addEventListener("click",(()=>{(0,i.r)(i.P)}))}}var d="data:image/svg+xml,%3csvg fill='none' height='80' width='80' xmlns='http://www.w3.org/2000/svg'%3e%3cpath clip-rule='evenodd' d='M39.9 80V68.99h-9.8V80h-.2V68.99h-3.5a6.503 6.503 0 0 1-6.247-4.7 6.514 6.514 0 0 1-4.445-4.444 6.503 6.503 0 0 1-4.695-6.246v-3.5H0v-.2h11.013v-9.8H0v-.2h11.013v-9.8H0v-.2h11.013v-3.5a6.503 6.503 0 0 1 4.694-6.246 6.513 6.513 0 0 1 4.447-4.447 6.503 6.503 0 0 1 6.246-4.696h3.5V0h.2v11.011h9.8V0h.2v11.011h9.8V0h.2v11.011h3.5a6.503 6.503 0 0 1 6.247 4.697 6.514 6.514 0 0 1 4.443 4.444 6.503 6.503 0 0 1 4.701 6.248v3.5H80v.2H68.991v9.8H80v.2H68.991v9.8H80v.2H68.991v3.5a6.503 6.503 0 0 1-4.701 6.248 6.514 6.514 0 0 1-4.443 4.442 6.503 6.503 0 0 1-6.247 4.7h-3.5V80h-.2V68.99h-9.8V80zm28.89-40.1a28.728 28.728 0 0 0-1.746-9.8h-2.5v9.8h4.247zm-4.246.2h4.247a28.729 28.729 0 0 1-1.747 9.8h-2.5zm-.2-.2v-9.8H60.1v9.8zm-4.244.2h4.244v9.8H60.1zm-.2-.2a19.807 19.807 0 0 0-2.633-9.8H50.1v9.8zm-9.8.2h9.8a19.807 19.807 0 0 1-2.633 9.8H50.1zm-.2-.2v-9.8h-9.8v9.8zm-9.8.2h9.8v9.8h-9.8zm-.2-.2v-9.8h-9.8v9.8zm-9.8.2h9.8v9.8h-9.8zm-.2-.2v-9.8h-7.167a19.807 19.807 0 0 0-2.633 9.8zm-9.8.2h9.8v9.8h-7.167a19.807 19.807 0 0 1-2.633-9.8zm-.2-.2v-9.8h-4.245v9.8zm-4.245.2H19.9v9.8h-4.245zm-.2-.2v-9.8H12.96a28.726 28.726 0 0 0-1.748 9.8h4.242zm-4.242.2h4.242v9.8H12.96a28.726 28.726 0 0 1-1.748-9.8zm0 13.5v-3.5h1.608a28.876 28.876 0 0 0 2.634 5.327v2.617c0 .543.066 1.07.192 1.575a6.303 6.303 0 0 1-4.434-6.019zm4.242 1.449a28.674 28.674 0 0 1-2.42-4.949h2.42zm.2.32V50.1H19.9v9.8h-.702a28.915 28.915 0 0 1-3.543-4.53zM20.1 59.9v-9.8h2.518a20.2 20.2 0 0 0 7.282 7.282V59.9zm0-10h2.403a19.966 19.966 0 0 1-2.403-7.053zm9.8 7.25a20 20 0 0 1-7.05-7.05h7.05zm.2.117V50.1h9.8v9.8a19.807 19.807 0 0 1-9.8-2.633zm10 2.633v-9.8h9.8v7.167a19.807 19.807 0 0 1-9.8 2.633zm10-2.75V50.1h7.05a20 20 0 0 1-7.05 7.05zm0 .232a20.2 20.2 0 0 0 7.282-7.282H59.9v9.8h-9.8zm7.397-7.482H59.9v-7.053a19.966 19.966 0 0 1-2.403 7.053zm2.603 10v-9.8h4.244v5.28a28.91 28.91 0 0 1-3.538 4.52zm4.444-4.841V50.1h2.426a28.67 28.67 0 0 1-2.426 4.959zm0 .378a28.881 28.881 0 0 0 2.64-5.337h1.607v3.5a6.303 6.303 0 0 1-4.44 6.021 6.514 6.514 0 0 0 .193-1.577zm2.713-5.537h1.534v-6.477a28.817 28.817 0 0 1-1.534 6.477zm-56.044 0h1.535a28.807 28.807 0 0 1-1.535-6.477zm57.578-20v-3.5a6.303 6.303 0 0 0-4.44-6.02c.126.504.193 1.031.193 1.575v2.608a28.877 28.877 0 0 1 2.639 5.337zm-1.534.2h1.534v6.477a28.815 28.815 0 0 0-1.534-6.477zm-.288-.2a28.673 28.673 0 0 0-2.425-4.958V29.9zm-2.625 0v-5.279a28.911 28.911 0 0 0-3.538-4.521H60.1v9.8zm-4.444 0v-9.8h-9.8v2.518a20.2 20.2 0 0 1 7.282 7.282zm-2.403.2H59.9v7.053a19.966 19.966 0 0 0-2.403-7.053zm-.347-.2a20 20 0 0 0-7.05-7.05v7.05zm-7.25 0v-7.167a19.807 19.807 0 0 0-9.8-2.633v9.8zm-10 0v-9.8a19.807 19.807 0 0 0-9.8 2.633V29.9zm-10 0v-7.05a20 20 0 0 0-7.05 7.05zm-7.282 0a20.2 20.2 0 0 1 7.282-7.282V20.1h-9.8v9.8zm-2.518.2h2.403a19.966 19.966 0 0 0-2.403 7.053zm-.2-.2v-9.8h-.701a28.915 28.915 0 0 0-3.544 4.53v5.27zm-4.445 0v-4.948a28.665 28.665 0 0 0-2.42 4.948zm-2.634 0a28.874 28.874 0 0 1 2.634-5.327v-2.618c0-.543.066-1.07.191-1.574a6.303 6.303 0 0 0-4.433 6.019v3.5zm-1.608.2h1.535a28.81 28.81 0 0 0-1.535 6.477zM36.58 68.79H30.1v-1.536c2.06.749 4.23 1.27 6.479 1.535zm3.321-.001a28.726 28.726 0 0 1-9.8-1.748v-2.497h9.8zm-10-1.822v-2.423h-4.953a28.678 28.678 0 0 0 4.953 2.423zm10-2.623h-9.8V60.1h9.8zm-10 0V60.1h-9.8v.702a28.915 28.915 0 0 0 4.526 3.542H29.9zm7.254-4.444H30.1v-2.403a19.966 19.966 0 0 0 7.053 2.403zm0-39.8a19.966 19.966 0 0 0-7.054 2.403V20.1h7.053zm2.746-.2h-9.8v-4.245h9.8zm-10 0v-4.245h-5.27a28.907 28.907 0 0 0-4.53 3.544v.701zm10-4.445h-9.8V12.96a28.729 28.729 0 0 1 9.8-1.749zm-10 0v-2.421a28.668 28.668 0 0 0-4.95 2.42h4.95zm6.679-4.244a28.81 28.81 0 0 0-6.479 1.536V11.21h6.479zm-6.679 1.61v-1.61h-3.5a6.303 6.303 0 0 0-6.02 4.436 6.514 6.514 0 0 1 1.575-.192h2.617A28.877 28.877 0 0 1 29.9 12.82zm0 55.968V67.18a28.878 28.878 0 0 1-5.331-2.636h-2.614c-.543 0-1.07-.067-1.575-.192a6.303 6.303 0 0 0 6.02 4.437zm20.2 0h3.5a6.303 6.303 0 0 0 6.02-4.438 6.513 6.513 0 0 1-1.576.193h-2.608a28.879 28.879 0 0 1-5.336 2.638zm-.2-1.534v1.534h-6.475a28.808 28.808 0 0 0 6.475-1.534zm.2-.287a28.671 28.671 0 0 0 4.957-2.424H50.1v2.424zm-.2-2.424v2.499a28.728 28.728 0 0 1-9.8 1.746v-4.245zm.2-.2h5.278a28.914 28.914 0 0 0 4.522-3.538V60.1h-9.8zm-.2-4.244v4.244h-9.8V60.1zm0-2.603V59.9h-7.053a19.966 19.966 0 0 0 7.053-2.403zm0-37.397v2.403a19.966 19.966 0 0 0-7.053-2.403H49.9zm.2-.2h9.8v-.705a28.911 28.911 0 0 0-4.526-3.54H50.1V19.9zm-.2-4.245V19.9h-9.8v-4.245h9.8zm.2-.2h4.954a28.676 28.676 0 0 0-4.954-2.423zm-.2-2.497v2.497h-9.8V11.21a28.75 28.75 0 0 1 9.8 1.747zm.2-.14a28.877 28.877 0 0 1 5.332 2.637h2.612c.543 0 1.071.066 1.576.192a6.303 6.303 0 0 0-6.02-4.436h-3.5zm-.2-1.607v1.534a28.812 28.812 0 0 0-6.475-1.534H49.9zm-34.245 44.53v2.303c0 .567.075 1.117.215 1.64a6.309 6.309 0 0 0 1.643.216h1.41a29.118 29.118 0 0 1-3.268-4.16zm3.458 4.359h-1.6a6.513 6.513 0 0 1-1.578-.193 6.315 6.315 0 0 0 4.157 4.157 6.517 6.517 0 0 1-.192-1.575v-1.602a29.35 29.35 0 0 1-.787-.787zm.787.509a29.029 29.029 0 0 1-.508-.509h.508zm.2.469v1.411c0 .567.075 1.117.215 1.64.523.14 1.073.215 1.64.215h2.3a29.118 29.118 0 0 1-4.155-3.266zm35.649 3.266h2.295c.567 0 1.117-.075 1.64-.216a6.286 6.286 0 0 0 .216-1.639v-1.407a29.116 29.116 0 0 1-4.151 3.262zm4.35-3.454v1.598a6.53 6.53 0 0 1-.192 1.574 6.314 6.314 0 0 0 4.155-4.154 6.509 6.509 0 0 1-1.572.191h-1.6a29.08 29.08 0 0 1-.791.791zm.982-.991h1.41c.565 0 1.114-.075 1.636-.215a6.31 6.31 0 0 0 .216-1.641V55.75a29.113 29.113 0 0 1-3.262 4.15zm3.262-35.65v-2.295c0-.568-.075-1.117-.216-1.64a6.307 6.307 0 0 0-1.637-.215h-1.41a29.112 29.112 0 0 1 3.263 4.15zM60.89 19.9h1.6c.542 0 1.069.066 1.573.192a6.314 6.314 0 0 0-4.156-4.157 6.51 6.51 0 0 1 .192 1.576v1.598c.269.259.532.522.79.791zm-.991-.981V17.51a6.31 6.31 0 0 0-.216-1.64 6.308 6.308 0 0 0-1.64-.216h-2.299a29.108 29.108 0 0 1 4.155 3.264zm-35.641-3.264h-2.304a6.31 6.31 0 0 0-1.639.215 6.306 6.306 0 0 0-.216 1.641v1.412a29.115 29.115 0 0 1 4.159-3.268zM19.9 19.113v-1.602c0-.543.067-1.072.193-1.577a6.315 6.315 0 0 0-4.159 4.16 6.518 6.518 0 0 1 1.58-.194h1.6c.257-.267.519-.53.786-.787zm-.508.787h.508v-.508c-.171.167-.34.337-.508.508zm-.47.2h-1.409a6.31 6.31 0 0 0-1.643.216 6.308 6.308 0 0 0-.215 1.639v2.305a29.107 29.107 0 0 1 3.268-4.16zm41.178-.712c.173.168.344.34.512.512H60.1zm.513 40.712c-.169.173-.34.344-.513.513V60.1z' fill='%2394a3b8' fill-rule='evenodd'/%3e%3crect fill='black' height='80' rx='16' width='80'/%3e%3cpath d='M43.47 19.752c1.24 5.14.821 9.663-.937 10.1-1.758.438-4.19-3.375-5.43-8.517-1.241-5.14-.822-9.663.936-10.1 1.759-.438 4.19 3.376 5.43 8.517zm20.49 4.42c-2.749-2.913-8.216-2.123-12.212 1.763s-5.008 9.398-2.26 12.31 8.215 2.123 12.211-1.763 5.008-9.398 2.26-12.31zM42.102 68.769c1.758-.438 2.116-5.216.8-10.673-1.318-5.456-3.81-9.525-5.57-9.088-1.757.438-2.115 5.216-.798 10.672 1.317 5.457 3.81 9.526 5.568 9.089zM24.18 26.838c5.073 1.496 8.78 4.12 8.28 5.862-.5 1.741-5.019 1.94-10.091.444-5.073-1.496-8.78-4.12-8.28-5.861.501-1.742 5.019-1.941 10.092-.445zm32.924 19.664c5.384 1.588 9.343 4.286 8.843 6.028-.5 1.741-5.27 1.866-10.654.278-5.385-1.588-9.343-4.286-8.843-6.028.5-1.741 5.27-1.866 10.654-.278zm-27.216-3.654c-1.258-1.304-5.384.594-9.215 4.24-3.832 3.644-5.919 7.656-4.66 8.96 1.257 1.304 5.383-.594 9.215-4.239s5.918-7.657 4.66-8.96z' fill='%23fe5'/%3e%3c/svg%3e",u=".pera-wallet-download-qr-code-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n width: fit-content;\n margin: 26px auto 0;\n padding: 10px;\n box-shadow: 0px 20px 60px rgba(26, 35, 91, 0.15), 0px 4px 12px rgba(26, 35, 91, 0.05), 0px 1px 4px rgba(26, 35, 91, 0.06);\n border-radius: 24px;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-download-qr-code-wrapper {\n margin-top: 51px;\n }\n}";o(u);const p=document.createElement("template");p.innerHTML='\n <div id="pera-wallet-download-qr-code-wrapper" class="pera-wallet-download-qr-code-wrapper"></div> \n';class m extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=u,this.shadowRoot.append(p.content.cloneNode(!0),t)}}connectedCallback(){var t;const e=new r({width:205,height:205,type:"svg",data:i.a,image:d,dotsOptions:{color:"#000",type:"extra-rounded"},imageOptions:{crossOrigin:"anonymous",margin:10},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}}),n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-download-qr-code-wrapper");n&&e.append(n)}}var g="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M8.5 19L15.5 12L8.5 5' stroke='%233C3C49' stroke-width='2'/%3e%3c/svg%3e",f=".pera-wallet-connect-modal-desktop-mode {\n display: grid;\n grid-template-columns: 205px auto;\n gap: 70px;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view {\n display: block;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-item--active .pera-wallet-accordion-item__content {\n height: 364px;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable .pera-wallet-accordion-item--web-wallet {\n display: none;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable .pera-wallet-accordion-item .pera-wallet-accordion-toggle {\n padding: 26px 24px 12px;\n border-radius: 24px 24px 0 0;\n transition: all ease-in 0.2s;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable .pera-wallet-accordion-item .pera-wallet-accordion-item__content {\n height: 434px;\n border-radius: 0 0 24px 24px;\n transition: height ease-in 0.2s;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable .pera-wallet-accordion-item .pera-wallet-accordion-icon {\n transform: rotate(90deg);\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable .pera-wallet-connect-modal-desktop-mode__download-pera-description {\n margin-top: 50px;\n}\n.pera-wallet-connect-modal-desktop-mode--default .pera-wallet-connect-modal-desktop-mode__download-view {\n display: none;\n}\n.pera-wallet-connect-modal-desktop-mode--download .pera-wallet-connect-modal-desktop-mode__default-view {\n display: none;\n}\n.pera-wallet-connect-modal-desktop-mode--download .pera-wallet-connect-modal-desktop-mode__download-view {\n display: block;\n}\n.pera-wallet-connect-modal-desktop-mode--download .pera-wallet-connect-modal-desktop-mode__download-view .pera-wallet-connect-modal-download-pera-view__footer a {\n display: flex;\n cursor: pointer;\n}\n.pera-wallet-connect-modal-desktop-mode--compact {\n grid-template-columns: unset;\n gap: unset;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__web-wallet {\n padding: 28px 40px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__web-wallet .pera-wallet-connect-modal-desktop-mode__web-wallet__logo-wrapper {\n box-shadow: unset;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__web-wallet .pera-wallet-connect-modal-desktop-mode__web-wallet__description {\n margin-bottom: 16px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__web-wallet .pera-wallet-connect-modal-desktop-mode__web-wallet__launch-button {\n width: 172px;\n height: 40px;\n margin: 0 auto;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__web-wallet-iframe {\n height: 100%;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view {\n overflow: hidden;\n border-radius: 24px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-item {\n margin-bottom: 0;\n border-radius: 0;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-item:not(:last-child) {\n border-bottom: 1px solid #e6e8ee;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-item #pera-wallet-iframe {\n height: 100%;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-toggle {\n padding: 20px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-toggle__text, .pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-toggle__content-with-label__text {\n color: #626268;\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.09px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-toggle__bold-color {\n font-weight: 600;\n color: #1a1a1a;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-accordion-item--active .pera-wallet-accordion-item__content {\n height: 265px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-modal-desktop-mode__download-pera-container {\n display: flex;\n justify-content: space-between;\n margin-top: 14px;\n padding: 0 20px;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-modal-desktop-mode__download-pera-description,\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-modal-desktop-mode__download-pera-button {\n margin: 0;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-modal-desktop-mode__download-pera-button {\n font-weight: 500;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-qr-code-wrapper {\n margin: 4px auto 0;\n padding: 0;\n box-shadow: unset;\n}\n.pera-wallet-connect-modal-desktop-mode--compact .pera-wallet-connect-modal-desktop-mode__default-view .pera-wallet-connect-qr-code-wrapper svg {\n padding: 8px;\n box-shadow: 0px 20px 60px rgba(26, 35, 91, 0.15), 0px 4px 12px rgba(26, 35, 91, 0.05), 0px 1px 4px rgba(26, 35, 91, 0.06);\n border-radius: 12px;\n}\n.pera-wallet-connect-modal-desktop-mode--select-account {\n width: 100%;\n height: 100%;\n}\n.pera-wallet-connect-modal-desktop-mode--select-account.pera-wallet-connect-modal-desktop-mode--default {\n overflow: hidden;\n}\n.pera-wallet-connect-modal-desktop-mode--select-account .pera-wallet-connect-modal-desktop-mode__web-wallet-iframe {\n position: unset;\n}\n.pera-wallet-connect-modal-desktop-mode--select-account .pera-wallet-accordion {\n overflow: hidden;\n}\n.pera-wallet-connect-modal-desktop-mode--select-account #pera-wallet-iframe {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 3;\n width: 100%;\n height: 100%;\n border-radius: 16px;\n}\n\n.pera-wallet-connect-modal-desktop-mode__accordion__description,\n.pera-wallet-connect-modal-desktop-mode__connect-button-wrapper {\n padding: 0 40px 20px 64px;\n}\n\n.pera-wallet-connect-modal-desktop-mode__web-wallet {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: calc(100% - 88px);\n padding: 48px 52px 40px;\n margin: 0 auto;\n}\n\n.pera-wallet-connect-modal-desktop-mode__web-wallet__logo-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 72px;\n height: 72px;\n margin: 0 auto 16px;\n background: #ffffff;\n border-radius: 50%;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.1), 0px 10px 16px rgba(20, 37, 63, 0.06);\n}\n\n.pera-wallet-connect-modal-desktop-mode__web-wallet__description {\n margin: 0 auto 32px;\n font-size: 14px;\n line-height: 24px;\n letter-spacing: -0.1px;\n text-align: center;\n color: #6a6a81;\n}\n\n.pera-wallet-connect-modal-desktop-mode__web-wallet__launch-button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n width: 100%;\n padding: 14px 0;\n color: #ffffff;\n background-color: #6b46fe;\n border-radius: 12px;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.1;\n border: none;\n outline: none;\n cursor: pointer;\n}\n\n.pera-wallet-connect-modal-desktop-mode__web-wallet-iframe {\n position: relative;\n width: fit-content;\n margin: 0 auto;\n}\n\n.pera-wallet-connect-modal-desktop-mode__connect-button {\n display: block;\n width: 100%;\n height: 48px;\n border: unset;\n border-radius: 6px;\n background-color: #333333;\n color: white;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 13px;\n}\n\n.pera-wallet-connect-qr-code-wrapper {\n width: fit-content;\n margin: 24px auto 0;\n padding: 10px;\n box-shadow: 0px 20px 60px rgba(26, 35, 91, 0.15), 0px 4px 12px rgba(26, 35, 91, 0.05), 0px 1px 4px rgba(26, 35, 91, 0.06);\n border-radius: 24px;\n}\n\n.pera-wallet-connect-modal-desktop-mode__download-pera-description {\n color: #838aa6;\n text-align: center;\n margin: 32px 0 12px;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.04px;\n}\n\n.pera-wallet-connect-modal-desktop-mode__download-pera-button {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0 auto;\n padding: 0;\n color: #6b46fe;\n background-color: transparent;\n outline: none;\n border: none;\n font-weight: 600;\n font-size: 13px;\n line-height: 20px;\n letter-spacing: 0.01px;\n cursor: pointer;\n}\n\n.pera-wallet-connect-modal-download-pera-view__back-button {\n display: flex;\n align-items: center;\n gap: 16px;\n margin-bottom: 14px;\n padding: 12px 24px;\n color: #3c3c49;\n background-color: #ffffff;\n outline: none;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border: unset;\n border-radius: 24px;\n font-size: 14px;\n font-weight: 600;\n line-height: 24px;\n letter-spacing: -0.1px;\n cursor: pointer;\n}\n\n.pera-wallet-connect-modal-download-pera-view {\n padding: 32px 37px 28px;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border-radius: 24px;\n}\n\n.pera-wallet-connect-modal-download-pera-view__title {\n margin-bottom: 8px;\n color: #3c3c49;\n font-weight: 600;\n font-size: 15px;\n line-height: 18px;\n text-align: center;\n letter-spacing: -0.13px;\n}\n\n.pera-wallet-connect-modal-download-pera-view__footer {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 12px;\n margin-top: 53px;\n}\n\n.pera-wallet-connect-modal-download-pera-view__footer__button {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 8px 16px;\n color: #6a6a81;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n text-decoration: none;\n border-radius: 12px;\n font-weight: 500;\n font-size: 13px;\n line-height: 200%;\n letter-spacing: -0.04px;\n cursor: pointer;\n}\n\n#pera-wallet-iframe {\n width: 285px;\n height: 376px;\n margin: 0 auto;\n border: none;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-connect-modal-desktop-mode {\n grid-template-columns: 1fr;\n gap: 24px;\n }\n .pera-wallet-connect-qr-code-wrapper {\n margin-top: 16px;\n }\n .pera-wallet-connect-modal-download-pera-view {\n padding: 24px;\n }\n .pera-wallet-download-qr-code-wrapper {\n margin-top: 32px;\n }\n .pera-wallet-connect-modal-download-pera-view__footer {\n margin-top: 40px;\n }\n}";o(f);var y=".pera-wallet-accordion-item {\n background-color: #ffffff;\n border-radius: 24px;\n box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.02), 0px 4px 12px rgba(0, 0, 0, 0.03);\n}\n.pera-wallet-accordion-item:not(:last-of-type) {\n margin-bottom: 20px;\n}\n.pera-wallet-accordion-item:not(:last-of-type) .pera-wallet-accordion-panel {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.pera-wallet-accordion-item .pera-wallet-accordion-item__content {\n height: 0;\n overflow: hidden;\n color: #69708d;\n background-color: #ffffff;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.04px;\n transition: height ease-in 0.2s;\n}\n.pera-wallet-accordion-item--active .pera-wallet-accordion-toggle {\n padding: 26px 24px 12px;\n border-radius: 24px 24px 0 0;\n transition: all ease-in 0.2s;\n}\n.pera-wallet-accordion-item--active .pera-wallet-accordion-item__content {\n border-radius: 0 0 24px 24px;\n transition: height ease-in 0.2s;\n}\n.pera-wallet-accordion-item--active .pera-wallet-accordion-icon {\n transform: rotate(90deg);\n}\n\n.pera-wallet-accordion-toggle {\n position: relative;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 24px;\n color: #2c3559;\n background-color: #ffffff;\n border: none;\n border-radius: 24px;\n outline: none;\n cursor: pointer;\n font-size: 16px;\n line-height: 18px;\n letter-spacing: -0.1px;\n font-weight: 600;\n transition: all ease-in 0.2s;\n}\n.pera-wallet-accordion-toggle__text, .pera-wallet-accordion-toggle__content-with-label__text {\n color: #626268;\n}\n\n.pera-wallet-accordion-icon {\n transition: all ease-in 0.2s;\n}\n\n.pera-wallet-accordion-toggle__bold-color {\n color: #1A1A1A;\n font-weight: 600;\n}\n\n.pera-wallet-accordion-toggle__content-with-label {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.pera-wallet-accordion-toggle__label {\n padding: 4px 9px;\n color: #1C786C;\n background: #E0FAEE;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n letter-spacing: 0.01px;\n}\n\n.pera-wallet-accordion-toggle__button {\n position: absolute;\n z-index: 2;\n width: 100%;\n height: 100%;\n background: transparent;\n box-shadow: none;\n outline: none;\n border: none;\n cursor: pointer;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-accordion-toggle {\n font-size: 14px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.1px;\n }\n}";o(y);const v=document.createElement("template"),w=document.createElement("style"),b=document.createElement("style");w.textContent=f,b.textContent=y,v.innerHTML="\n <div id=\"pera-wallet-connect-modal-desktop-mode\" class=\"pera-wallet-connect-modal-desktop-mode pera-wallet-connect-modal-desktop-mode--default\">\n <pera-wallet-connect-modal-information-section></pera-wallet-connect-modal-information-section>\n\n <div class=\"pera-wallet-connect-modal-desktop-mode__default-view\"></div>\n \n\n <div class=\"pera-wallet-connect-modal-desktop-mode__download-view\">\n <button\n id=\"pera-wallet-connect-modal-download-pera-view-back-button\"\n class=\"pera-wallet-connect-modal-download-pera-view__back-button\">\n <img\n src=\"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M10.7071 6.29387C11.0976 6.68439 11.0976 7.31756 10.7071 7.70808L7.41421 11.001L19 11.001C19.5523 11.001 20 11.4487 20 12.001C20 12.5533 19.5523 13.001 19 13.001L7.41421 13.001L10.7071 16.2939C11.0976 16.6844 11.0976 17.3176 10.7071 17.7081C10.3166 18.0986 9.68342 18.0986 9.29289 17.7081L4.29289 12.7081C4.10536 12.5205 4 12.2662 4 12.001C4 11.7358 4.10536 11.4814 4.29289 11.2939L9.29289 6.29387C9.68342 5.90335 10.3166 5.90335 10.7071 6.29387Z' fill='%233C3C49'/%3e%3c/svg%3e\"\n alt=\"Back Arrow\"\n />\n\n Back\n </button>\n\n <div class=\"pera-wallet-connect-modal-download-pera-view\">\n <h1 class=\"pera-wallet-connect-modal-download-pera-view__title\">\n Download Pera Wallet\n </h1>\n\n <pera-wallet-download-qr-code></pera-wallet-download-qr-code>\n\n <div class=\"pera-wallet-connect-modal-download-pera-view__footer\">\n <a\n href=\"https://apps.apple.com/us/app/algorand-wallet/id1459898525\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <img src=\"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='40' height='40' rx='12' fill='black'/%3e%3cpath d='M25.6308 20.3011C25.6416 19.4664 25.8633 18.6481 26.2753 17.9221C26.6873 17.1962 27.2763 16.5863 27.9873 16.1491C27.5356 15.5039 26.9397 14.973 26.2469 14.5984C25.554 14.2239 24.7834 14.016 23.9963 13.9914C22.317 13.8151 20.6891 14.9962 19.8333 14.9962C18.9611 14.9962 17.6436 14.0089 16.2249 14.0381C15.3072 14.0677 14.4128 14.3346 13.6289 14.8126C12.8451 15.2906 12.1984 15.9636 11.7519 16.7659C9.81789 20.1144 11.2605 25.0354 13.1132 27.742C14.0401 29.0674 15.1233 30.5478 16.5408 30.4953C17.9278 30.4378 18.4458 29.6108 20.1202 29.6108C21.779 29.6108 22.265 30.4953 23.7112 30.4619C25.1995 30.4378 26.1372 29.1307 27.0316 27.7928C27.6976 26.8484 28.2101 25.8047 28.55 24.7003C27.6853 24.3345 26.9474 23.7224 26.4283 22.9401C25.9092 22.1578 25.6318 21.2399 25.6308 20.3011ZM22.8993 12.2113C23.7108 11.2371 24.1106 9.98492 24.0138 8.7207C22.7739 8.85092 21.6287 9.44347 20.8062 10.3803C20.404 10.838 20.096 11.3704 19.8998 11.9472C19.7035 12.5239 19.6229 13.1337 19.6625 13.7417C20.2826 13.7481 20.8961 13.6137 21.4568 13.3486C22.0175 13.0835 22.5107 12.6946 22.8993 12.2113Z' fill='white'/%3e%3c/svg%3e\" alt=\"App Store icon\" />\n </a>\n\n <a\n href=\"https://play.google.com/store/apps/details?id=com.algorand.android\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <img src=\"data:image/svg+xml,%3csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='40' height='40' rx='12' fill='black'/%3e%3cpath d='M12.41 9.7719C12.1334 10.0219 11.9683 10.4388 11.9683 10.9922V10.8671V29.1294V29.0091C11.9683 29.5202 12.1099 29.9149 12.3497 30.169L12.4109 30.2277V30.228C12.6051 30.4035 12.854 30.4966 13.1393 30.4963C13.418 30.4963 13.7316 30.4073 14.0626 30.2194L26.0264 23.4107L30.1359 21.0717C30.6578 20.7748 30.9508 20.3917 30.9998 20.0014V19.9998C30.9508 19.6087 30.6578 19.2259 30.1359 18.9289L26.0261 16.5902L14.0627 9.78154C13.731 9.59325 13.4171 9.50391 13.1376 9.50391C12.8527 9.50391 12.6041 9.59677 12.41 9.7719H12.41Z' fill='%2300C1FF'/%3e%3cpath d='M12.411 30.2285L12.3497 30.1698C12.1099 29.9157 11.9683 29.5209 11.9683 29.0098V29.1301V10.8724V10.993C11.9683 10.4396 12.1334 10.0226 12.41 9.77268L22.622 20.0009L12.411 30.2285Z' fill='url(%23paint0_linear_173_14441)'/%3e%3cpath d='M26.0256 23.4102L22.6211 19.9996L26.0253 16.5896L30.1351 18.9283C30.657 19.2253 30.95 19.6081 30.9989 19.9993V20.0008C30.95 20.3911 30.657 20.7742 30.1351 21.0712L26.0256 23.4101' fill='url(%23paint1_linear_173_14441)'/%3e%3cpath d='M13.1374 30.4961C12.8522 30.4964 12.6033 30.4032 12.4092 30.2277V30.2275L22.6202 19.9999L26.0246 23.4104L14.0608 30.2191C13.7298 30.4071 13.4162 30.4961 13.1374 30.4961Z' fill='url(%23paint2_linear_173_14441)'/%3e%3cpath d='M22.6212 20.002L12.4092 9.7737C12.6033 9.59858 12.8519 9.50571 13.1368 9.50571C13.4163 9.50571 13.7302 9.59501 14.0618 9.78335L26.0253 16.592L22.6212 20.002' fill='url(%23paint3_linear_173_14441)'/%3e%3cpath d='M13.1394 30.6172C12.8542 30.6172 12.6049 30.524 12.4108 30.3486L12.4105 30.3489C12.4097 30.3481 12.4088 30.3473 12.4079 30.3466L12.3548 30.2947C12.3531 30.2931 12.3516 30.2912 12.3496 30.2893L12.4108 30.2279C12.6049 30.4034 12.8538 30.4966 13.1392 30.4962C13.4179 30.4962 13.7315 30.4073 14.0625 30.2193L26.0263 23.4106L26.1029 23.4874L26.0253 23.5316L14.0625 30.3398C13.7608 30.5111 13.4739 30.6004 13.2147 30.6153C13.1896 30.6165 13.1645 30.6171 13.1394 30.6172' fill='url(%23paint4_linear_173_14441)'/%3e%3cpath d='M12.3497 30.2891C12.1099 30.0349 11.9683 29.6406 11.9683 29.1292V29.0089C11.9683 29.52 12.1099 29.9146 12.3497 30.1688L12.4109 30.2275L12.3497 30.2891Z' fill='url(%23paint5_linear_173_14441)'/%3e%3cpath d='M26.1025 23.4882L26.0259 23.4114L30.1349 21.0727C30.6568 20.7758 30.9498 20.3927 30.9987 20.0025C30.9987 20.1457 30.9668 20.2889 30.9035 20.4282C30.7756 20.7091 30.5194 20.9744 30.135 21.1934L26.1025 23.4883' fill='url(%23paint6_linear_173_14441)'/%3e%3cpath d='M30.9991 20C30.9501 19.6089 30.6571 19.2261 30.1353 18.9291L26.0259 16.5907L26.1025 16.5139H26.1029L30.1353 18.8088C30.7106 19.1365 30.9987 19.5682 30.9991 20Z' fill='url(%23paint7_linear_173_14441)'/%3e%3cpath d='M11.9683 10.9922V10.8661C11.9683 10.8206 11.9695 10.7761 11.9718 10.7329V10.7309C11.9718 10.7303 11.9718 10.7297 11.972 10.729V10.7242C11.9969 10.284 12.1334 9.94066 12.3497 9.71139L12.4099 9.77198C12.1334 10.0219 11.9683 10.4388 11.9683 10.9922Z' fill='url(%23paint8_linear_173_14441)'/%3e%3cpath d='M26.026 16.5898L14.0625 9.78115C13.7308 9.59285 13.417 9.50355 13.1375 9.50355C12.8525 9.50355 12.6039 9.59642 12.4099 9.77154L12.3496 9.71091C12.3684 9.69096 12.388 9.67172 12.4082 9.65322C12.4089 9.65255 12.4099 9.65188 12.4105 9.65125C12.6031 9.47747 12.849 9.3846 13.1314 9.38293H13.1375C13.417 9.38293 13.7308 9.47227 14.0625 9.66064L26.1029 16.5128L26.1026 16.513L26.026 16.5898Z' fill='url(%23paint9_linear_173_14441)'/%3e%3cdefs%3e%3clinearGradient id='paint0_linear_173_14441' x1='18.4943' y1='10.6794' x2='9.69389' y2='19.494' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2300A0FF'/%3e%3cstop offset='0.00657' stop-color='%2300A1FF'/%3e%3cstop offset='0.2601' stop-color='%2300BEFF'/%3e%3cstop offset='0.5122' stop-color='%2300D2FF'/%3e%3cstop offset='0.7604' stop-color='%2300DFFF'/%3e%3cstop offset='1' stop-color='%2300E3FF'/%3e%3c/linearGradient%3e%3clinearGradient id='paint1_linear_173_14441' x1='31.6348' y1='19.9407' x2='11.691' y2='19.9407' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFE000'/%3e%3cstop offset='0.4087' stop-color='%23FFBD00'/%3e%3cstop offset='0.7754' stop-color='orange'/%3e%3cstop offset='1' stop-color='%23FF9C00'/%3e%3c/linearGradient%3e%3clinearGradient id='paint2_linear_173_14441' x1='24.2172' y1='23.2425' x2='9.30414' y2='38.0705' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FF3A44'/%3e%3cstop offset='1' stop-color='%23C31162'/%3e%3c/linearGradient%3e%3clinearGradient id='paint3_linear_173_14441' x1='9.77725' y1='8.25731' x2='16.4237' y2='14.876' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2332A071'/%3e%3cstop offset='0.0685' stop-color='%232DA771'/%3e%3cstop offset='0.4762' stop-color='%2315CF74'/%3e%3cstop offset='0.8009' stop-color='%2306E775'/%3e%3cstop offset='1' stop-color='%2300F076'/%3e%3c/linearGradient%3e%3clinearGradient id='paint4_linear_173_14441' x1='24.2114' y1='25.6084' x2='12.2683' y2='37.5709' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23CC2E36'/%3e%3cstop offset='1' stop-color='%239C0E4E'/%3e%3c/linearGradient%3e%3clinearGradient id='paint5_linear_173_14441' x1='13.3285' y1='10.6804' x2='5.57625' y2='18.4453' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23008DE0'/%3e%3cstop offset='0.00657' stop-color='%23008DE0'/%3e%3cstop offset='0.2601' stop-color='%2300A7E0'/%3e%3cstop offset='0.5122' stop-color='%2300B8E0'/%3e%3cstop offset='0.7604' stop-color='%2300C4E0'/%3e%3cstop offset='1' stop-color='%2300C7E0'/%3e%3c/linearGradient%3e%3clinearGradient id='paint6_linear_173_14441' x1='31.6346' y1='20.0018' x2='11.6929' y2='20.0018' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23E0C500'/%3e%3cstop offset='0.4087' stop-color='%23E0A600'/%3e%3cstop offset='0.7754' stop-color='%23E09100'/%3e%3cstop offset='1' stop-color='%23E08900'/%3e%3c/linearGradient%3e%3clinearGradient id='paint7_linear_173_14441' x1='31.6349' y1='20.0008' x2='11.6933' y2='20.0008' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%23FFE840'/%3e%3cstop offset='0.4087' stop-color='%23FFCE40'/%3e%3cstop offset='0.7754' stop-color='%23FFBC40'/%3e%3cstop offset='1' stop-color='%23FFB540'/%3e%3c/linearGradient%3e%3clinearGradient id='paint8_linear_173_14441' x1='13.3201' y1='10.6927' x2='5.8533' y2='17.8475' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2340B8FF'/%3e%3cstop offset='0.00657' stop-color='%2340B9FF'/%3e%3cstop offset='0.2601' stop-color='%2340CEFF'/%3e%3cstop offset='0.5122' stop-color='%2340DDFF'/%3e%3cstop offset='0.7604' stop-color='%2340E7FF'/%3e%3cstop offset='1' stop-color='%2340EAFF'/%3e%3c/linearGradient%3e%3clinearGradient id='paint9_linear_173_14441' x1='9.76302' y1='10.4182' x2='15.0961' y2='15.76' gradientUnits='userSpaceOnUse'%3e%3cstop stop-color='%2365B895'/%3e%3cstop offset='0.0685' stop-color='%2362BD95'/%3e%3cstop offset='0.4762' stop-color='%2350DB97'/%3e%3cstop offset='0.8009' stop-color='%2344ED98'/%3e%3cstop offset='1' stop-color='%2340F498'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\" alt=\"Play Store icon\" />\n </a>\n\n <a\n class=\"pera-wallet-connect-modal-download-pera-view__footer__button\"\n href=\"https://perawallet.s3-eu-west-3.amazonaws.com/android-releases/app-pera-prod-release-bitrise-signed.apk\"\n target=\"_blank\"\n rel=\"noopener noreferrer\">\n <img src=\"data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3 14V20C3 20.5523 3.44772 21 4 21H20C20.5523 21 21 20.5523 21 20V14' stroke='%232C3559' stroke-width='1.5'/%3e%3cpath d='M11.9998 16V3M11.9998 16L7.47803 11.4783M11.9998 16L16.5215 11.4783' stroke='%232C3559' stroke-width='1.5'/%3e%3c/svg%3e\" alt=\"Download icon\" />\n\n Download APK File\n </a>\n </div>\n </div>\n </div>\n </div>\n ";class x extends HTMLElement{constructor(){var t;if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){if(this.shadowRoot.append(v.content.cloneNode(!0),w,b),this.shadowRoot.addEventListener("click",(t=>{this.handleAccordion(t)})),"true"===this.getAttribute("compact-mode")){const t=this.shadowRoot.getElementById("pera-wallet-connect-modal-desktop-mode");null==t||t.classList.add("pera-wallet-connect-modal-desktop-mode--compact")}const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".pera-wallet-connect-modal-desktop-mode__default-view"),n="true"===this.getAttribute("promote-mobile"),{webWalletOption:i,mobileWalletOption:r}=function(t){const e=`\n <div id="web-wallet-option" class="pera-wallet-accordion-item ${t?"":"pera-wallet-accordion-item--active"} pera-wallet-accordion-item--web-wallet">\n <a class="pera-wallet-accordion-toggle">\n <button class="pera-wallet-accordion-toggle__button"></button>\n \n <img src="${g}" class="pera-wallet-accordion-icon" />\n \n <div class="pera-wallet-accordion-toggle__content-with-label">\n <div class="pera-wallet-accordion-toggle__content-with-label__text">\n Connect With\n \n <span class="pera-wallet-accordion-toggle__bold-color">\n Pera Web\n </span>\n </div>\n \n <span id="pera-web-new-label" class="pera-wallet-accordion-toggle__label">NEW</span>\n </div>\n </a>\n \n <div class="pera-wallet-accordion-item__content">\n <div class="pera-wallet-connect-modal-desktop-mode__web-wallet"><div>\n \n <div\n class="pera-wallet-connect-modal-desktop-mode__web-wallet__logo-wrapper">\n <img src="data:image/svg+xml,%3csvg width='44' height='44' viewBox='0 0 44 44' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='3.5' y='7.5' width='36' height='26' rx='5.5' stroke='%236B46FE' stroke-width='3'/%3e%3cpath d='M22.4973 14.5237C22.8556 16.041 22.7344 17.3757 22.2267 17.5048C21.719 17.6339 21.0169 16.5085 20.6586 14.9912C20.3003 13.4739 20.4214 12.1392 20.9292 12.0101C21.4369 11.881 22.1389 13.0064 22.4973 14.5237Z' fill='%236B46FE'/%3e%3cpath d='M28.4139 15.8282C27.6204 14.9686 26.0417 15.2016 24.8877 16.3486C23.7338 17.4956 23.4417 19.1222 24.2352 19.9818C25.0287 20.8414 26.6074 20.6084 27.7613 19.4614C28.9153 18.3144 29.2074 16.6878 28.4139 15.8282Z' fill='%236B46FE'/%3e%3cpath d='M22.1027 28.9905C22.6104 28.8614 22.7137 27.4512 22.3334 25.8407C21.9531 24.2303 21.2332 23.0294 20.7254 23.1585C20.2177 23.2876 20.1144 24.6978 20.4947 26.3083C20.875 27.9187 21.5949 29.1196 22.1027 28.9905Z' fill='%236B46FE'/%3e%3cpath d='M16.9269 16.6152C18.3917 17.0567 19.4621 17.8312 19.3176 18.3452C19.1731 18.8591 17.8686 18.9179 16.4037 18.4764C14.9389 18.0349 13.8686 17.2603 14.0131 16.7464C14.1575 16.2324 15.4621 16.1737 16.9269 16.6152Z' fill='%236B46FE'/%3e%3cpath d='M26.4342 22.4188C27.9889 22.8874 29.1322 23.6839 28.9877 24.1979C28.8432 24.7118 27.4657 24.7486 25.911 24.28C24.3563 23.8114 23.213 23.0148 23.3575 22.5009C23.502 21.9869 24.8795 21.9502 26.4342 22.4188Z' fill='%236B46FE'/%3e%3cpath d='M18.5752 21.3404C18.2119 20.9555 17.0205 21.5157 15.914 22.5915C14.8075 23.6673 14.2049 24.8514 14.5682 25.2363C14.9314 25.6211 16.1229 25.061 17.2294 23.9852C18.3359 22.9094 18.9384 21.7253 18.5752 21.3404Z' fill='%236B46FE'/%3e%3cpath d='M16 39C21 39.0001 23.5 39.0001 28 39' stroke='%236B46FE' stroke-width='3' stroke-linecap='round'/%3e%3c/svg%3e" />\n </div>\n \n <p\n class="pera-wallet-connect-modal-desktop-mode__web-wallet__description">\n Connect with Pera Web to continue\n </p>\n </div>\n \n <button\n id="pera-wallet-connect-web-wallet-launch-button"\n class="pera-wallet-connect-modal-desktop-mode__web-wallet__launch-button">\n Launch Pera Web\n \n <img src="data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M13.0892 9.41009C13.4147 9.73553 13.4147 10.2632 13.0892 10.5886L8.08924 15.5886C7.7638 15.914 7.23616 15.914 6.91072 15.5886C6.58529 15.2632 6.58529 14.7355 6.91072 14.4101L11.3215 9.99935L6.91073 5.5886C6.58529 5.26317 6.58529 4.73553 6.91073 4.41009C7.23616 4.08466 7.7638 4.08466 8.08924 4.41009L13.0892 9.41009Z' fill='white'/%3e%3c/svg%3e" />\n </button>\n </div>`,n=`\n <div id="mobile-wallet-option" class="pera-wallet-accordion-item ${t?"pera-wallet-accordion-item--active":""}">\n <a class="pera-wallet-accordion-toggle">\n <button class="pera-wallet-accordion-toggle__button"></button>\n \n <img src="${g}" class="pera-wallet-accordion-icon" />\n \n <div class="pera-wallet-accordion-toggle__text">\n Connect with\n \n <span class="pera-wallet-accordion-toggle__bold-color">\n Pera Mobile\n </span>\n </div>\n </a>\n \n <div class="pera-wallet-accordion-item__content">\n <div id="pera-wallet-connect-modal-connect-qr-code" class="pera-wallet-connect-qr-code-wrapper"></div>\n \n <div class="pera-wallet-connect-modal-desktop-mode__download-pera-container">\n <p\n class="pera-wallet-connect-modal-desktop-mode__download-pera-description">\n Don’t have Pera Wallet app?\n </p>\n \n <button\n id="pera-wallet-connect-modal-desktop-mode-download-pera-button"\n class="pera-wallet-connect-modal-desktop-mode__download-pera-button">\n <img src="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3crect x='2' y='2' width='4.66667' height='4.66667' rx='1.2' stroke='%236B46FE' stroke-width='1.5'/%3e%3crect x='2' y='9.33203' width='4.66667' height='4.66667' rx='1.2' stroke='%236B46FE' stroke-width='1.5'/%3e%3crect x='9.33325' y='2' width='4.66667' height='4.66667' rx='1.2' stroke='%236B46FE' stroke-width='1.5'/%3e%3cpath d='M8.70581 9.5293H10.9411' stroke='%236B46FE' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M13.1765 12.668L14.6667 12.668' stroke='%236B46FE' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M13.1765 14L14.6667 14' stroke='%236B46FE' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M11.686 14L13.1762 14' stroke='%236B46FE' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M12.4314 9.5293H14.6667' stroke='%236B46FE' stroke-width='1.66667' stroke-linejoin='round'/%3e%3cpath d='M8.70581 10.2754H12.4313' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 11.7656H11.6862' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 12.5117H11.6862' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M8.70581 13.2539H10.196' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M8.70581 14H10.196' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3cpath d='M10.196 11.0195H12.4313' stroke='%236B46FE' stroke-width='1.25' stroke-linejoin='round'/%3e%3c/svg%3e" alt="QR Icon" />\n \n Download Pera Wallet\n </button>\n </div>\n </div>\n </div>`;return{mobileWalletOption:document.createRange().createContextualFragment(n),webWalletOption:document.createRange().createContextualFragment(e)}}(n);n?(null==e||e.appendChild(r),null==e||e.appendChild(i)):(null==e||e.appendChild(i),null==e||e.appendChild(r))}}connectedCallback(){var t;const e=this.getAttribute("should-display-new-badge"),n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-web-new-label");"false"===e&&(null==n||n.setAttribute("style","display:none")),this.handleChangeView()}handleChangeView(){var t,e,n;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-desktop-mode-download-pera-button"),r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("pera-wallet-connect-modal-download-pera-view-back-button"),a=null===(n=this.shadowRoot)||void 0===n?void 0:n.getElementById("pera-wallet-connect-web-wallet-launch-button");i&&i.addEventListener("click",(()=>{this.onClickDownload()})),r&&r.addEventListener("click",(()=>{this.onClickBack()})),a&&a.addEventListener("click",(()=>{this.webWalletConnect()})),this.renderQRCode(),this.checkWebWalletAvaliability()}webWalletConnect(){"true"===this.getAttribute("is-web-wallet-avaliable")&&window.onWebWalletConnect()}handleAccordion(t){var e,n;if(t.target instanceof Element){if(!t.target.classList.contains("pera-wallet-accordion-toggle__button"))return;if(this.shadowRoot&&(null===(e=t.target.parentElement)||void 0===e?void 0:e.parentElement)){const e=null===(n=t.target.parentElement)||void 0===n?void 0:n.parentElement;if(!e)return;if(e.classList.contains("pera-wallet-accordion-item--active"))return;const i=this.shadowRoot.querySelectorAll(".pera-wallet-accordion-item.pera-wallet-accordion-item--active");for(let t=0;t<i.length;t++)i[t].classList.remove("pera-wallet-accordion-item--active");e.classList.toggle("pera-wallet-accordion-item--active")}}}renderQRCode(){var t;const e=this.getAttribute("is-web-wallet-avaliable"),n="true"===this.getAttribute("compact-mode"),i="true"===this.getAttribute("single-account");let a=this.getAttribute("uri");i&&(a=`${a}&singleAccount=true`);let o="false"===e?250:205;if(n&&(o=190),a){const e=new r({width:o,height:o,type:"svg",data:a,image:d,dotsOptions:{color:"#000",type:"extra-rounded"},imageOptions:{crossOrigin:"anonymous",margin:8},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"}}),n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-connect-qr-code");n&&e.append(n)}}onClickDownload(){if(this.shadowRoot){const t=this.shadowRoot.getElementById("pera-wallet-connect-modal-desktop-mode");t&&(t.classList.remove("pera-wallet-connect-modal-desktop-mode--default"),t.classList.add("pera-wallet-connect-modal-desktop-mode--download"))}}onClickBack(){if(this.shadowRoot){const t=this.shadowRoot.getElementById("pera-wallet-connect-modal-desktop-mode");t&&(t.classList.add("pera-wallet-connect-modal-desktop-mode--default"),t.classList.remove("pera-wallet-connect-modal-desktop-mode--download"))}}checkWebWalletAvaliability(){var t;if("false"===this.getAttribute("is-web-wallet-avaliable")){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".pera-wallet-connect-modal-desktop-mode__default-view");null==e||e.classList.add("pera-wallet-connect-modal-desktop-mode__default-view--web-wallet-not-avaliable")}}}function S(t=!0){let e=i.e;const n=(0,i.d)();return t&&n&&(e=`${e}?browser=${encodeURIComponent(n)}`),e}var A=".pera-wallet-connect-modal-touch-screen-mode {\n display: grid;\n grid-template-columns: 1fr;\n gap: 46px;\n padding: 4px;\n}\n\n.pera-wallet-connect-modal-touch-screen-mode--pending-message-view {\n gap: 56px;\n grid-template-rows: auto 48px;\n height: 100%;\n padding-bottom: 70px;\n}\n\n.pera-wallet-connect-modal-touch-screen-mode__launch-pera-wallet-button,\n.pera-wallet-connect-modal-touch-screen-mode__install-pera-wallet-button {\n display: block;\n padding: 14px;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n}\n\n.pera-wallet-connect-modal-touch-screen-mode__launch-pera-wallet-button {\n margin-bottom: 32px;\n background-color: #6b46fe;\n color: #ffffff;\n}\n\n.pera-wallet-connect-modal-touch-screen-mode__install-pera-wallet-button {\n margin-bottom: 20px;\n color: #6a6a81;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n}\n\n.pera-wallet-connect-modal-touch-screen-mode__new-to-pera-box {\n position: relative;\n margin-bottom: 32px;\n border-top: 1px solid #e6e8ee;\n}\n\n.pera-wallet-connect-modal-touch-screen-mode__new-to-pera-box__text {\n position: absolute;\n top: -25px;\n right: calc(50% - 56px);\n width: 116px;\n color: #69708d;\n background-color: #ffffff;\n font-size: 13px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.04px;\n text-align: center;\n}";o(A);const C=document.createElement("template");class k extends HTMLElement{constructor(){var t;if(super(),this.attachShadow({mode:"open"}),C.innerHTML='\n <div class="pera-wallet-connect-modal-touch-screen-mode">\n <pera-wallet-connect-modal-information-section></pera-wallet-connect-modal-information-section>\n\n <div>\n <a\n id="pera-wallet-connect-modal-touch-screen-mode-launch-pera-wallet-button"\n class="pera-wallet-connect-modal-touch-screen-mode__launch-pera-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Launch Pera Wallet\n </a>\n\n <div\n class="pera-wallet-connect-modal-touch-screen-mode__new-to-pera-box">\n <p\n class="pera-wallet-connect-modal-touch-screen-mode__new-to-pera-box__text"\n >\n New to Pera?\n </p>\n </div>\n\n <a\n href="https://perawallet.app/download/"\n class="pera-wallet-connect-modal-touch-screen-mode__install-pera-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Install Pera Wallet\n </a>\n </div>\n </div>\n',this.shadowRoot){const e=document.createElement("style");e.textContent=A,this.shadowRoot.append(C.content.cloneNode(!0),e);const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-touch-screen-mode-launch-pera-wallet-button"),r=this.getAttribute("uri"),a="true"===this.getAttribute("single-account"),o=this.getAttribute("selected-account")||void 0;n&&r&&(n.setAttribute("href",function(t,e){let n=S(!1);(0,i.b)()&&!n.includes("-wc")&&(n=n.replace("://","-wc://"));let r=`${n}wc?uri=${encodeURIComponent(t)}`;const a=(0,i.d)();return(0,i.c)()&&(r=t),a&&(r=`${r}&browser=${encodeURIComponent(a)}`),(null==e?void 0:e.singleAccount)&&(r=`${r}&singleAccount=true`),(null==e?void 0:e.selectedAccount)&&(r=`${r}&selectedAccount=${e.selectedAccount}`),r}(r,{singleAccount:a,selectedAccount:o})),n.addEventListener("click",(()=>{this.onClickLaunch()})))}}onClickLaunch(){if(C.innerHTML=`\n <div class="pera-wallet-connect-modal-touch-screen-mode pera-wallet-connect-modal-touch-screen-mode--pending-message-view">\n <pera-wallet-connect-modal-pending-message-section should-use-sound="${this.getAttribute("should-use-sound")}"></pera-wallet-connect-modal-pending-message-section>\n </div>\n `,this.shadowRoot){const t=document.createElement("style");t.textContent=A,this.shadowRoot.innerHTML="",this.shadowRoot.append(C.content.cloneNode(!0),t)}}}var I='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");\n.pera-wallet-modal {\n --pera-wallet-modal-font-family: "Inter", sans-serif;\n --pera-wallet-modal-compact-width: 380px;\n --pera-wallet-modal-compact-height: 396px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.pera-wallet-modal--select-account .pera-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-color: #ffffff;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: unset;\n height: calc(100 * var(--pera-wallet-vh));\n padding: 20px;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s PeraWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body::before {\n background-image: unset;\n}\n.pera-wallet-modal--compact:not(.pera-wallet-modal--mobile) .pera-wallet-modal__body {\n width: var(--pera-wallet-modal-compact-width);\n height: var(--pera-wallet-modal-compact-height);\n padding: 0;\n}\n.pera-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.pera-wallet-modal ul,\n.pera-wallet-modal ol,\n.pera-wallet-modal li {\n list-style-type: none;\n}\n\n.pera-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.pera-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.pera-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 700px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #f3f3f7;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 24px;\n animation: 0.3s PeraWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n.pera-wallet-modal__body::before {\n --background-line: #1e0972 0 1.2px, transparent 0 calc(100% - 1.2px), #1e0972;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n content: "";\n background-image: linear-gradient(var(--background-line)), linear-gradient(90deg, var(--background-line));\n background-size: 116px 116px;\n mix-blend-mode: overlay;\n border-radius: 24px;\n opacity: 0.8;\n pointer-events: none;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-modal--desktop .pera-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes PeraWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes PeraWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}';o(I);const E=document.createElement("template");let _=(0,i.i)()?`${i.f} ${i.f}--mobile`:`${i.f} ${i.f}--desktop`;class M extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=I,"true"===this.getAttribute("compact-mode")&&(_=`${_} ${i.f}--compact`);const e="true"===this.getAttribute("single-account"),n=this.getAttribute("selected-account");(0,i.i)()?(E.innerHTML=`\n <div class="${_}">\n <div class="pera-wallet-modal__body" part="body">\n <pera-wallet-modal-header modal-id="${i.g}"></pera-wallet-modal-header/>\n \n <pera-wallet-modal-touch-screen-mode uri="${this.getAttribute("uri")}" should-use-sound="${this.getAttribute("should-use-sound")}" single-account="${e}" selected-account="${n}"></pera-wallet-modal-touch-screen-mode>\n </div>\n </div>\n `,this.shadowRoot.append(E.content.cloneNode(!0),t)):(E.innerHTML=`\n <div class="${_}">\n <div class="pera-wallet-modal__body">\n <pera-wallet-modal-header modal-id="${i.g}"></pera-wallet-modal-header/>\n \n <pera-wallet-modal-desktop-mode id="pera-wallet-modal-desktop-mode" uri="${this.getAttribute("uri")}" is-web-wallet-avaliable="${this.getAttribute("is-web-wallet-avaliable")}" should-display-new-badge="${this.getAttribute("should-display-new-badge")}" compact-mode="${this.getAttribute("compact-mode")}" promote-mobile="${this.getAttribute("promote-mobile")}" single-account="${e}"\n ></pera-wallet-modal-desktop-mode>\n </div>\n </div>\n `,this.shadowRoot.append(E.content.cloneNode(!0),t))}}}var D='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");\n.pera-wallet-modal {\n --pera-wallet-modal-font-family: "Inter", sans-serif;\n --pera-wallet-modal-compact-width: 380px;\n --pera-wallet-modal-compact-height: 396px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.pera-wallet-modal--select-account .pera-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-color: #ffffff;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: unset;\n height: calc(100 * var(--pera-wallet-vh));\n padding: 20px;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s PeraWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body::before {\n background-image: unset;\n}\n.pera-wallet-modal--compact:not(.pera-wallet-modal--mobile) .pera-wallet-modal__body {\n width: var(--pera-wallet-modal-compact-width);\n height: var(--pera-wallet-modal-compact-height);\n padding: 0;\n}\n.pera-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.pera-wallet-modal ul,\n.pera-wallet-modal ol,\n.pera-wallet-modal li {\n list-style-type: none;\n}\n\n.pera-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.pera-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.pera-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 700px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #f3f3f7;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 24px;\n animation: 0.3s PeraWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n.pera-wallet-modal__body::before {\n --background-line: #1e0972 0 1.2px, transparent 0 calc(100% - 1.2px), #1e0972;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n content: "";\n background-image: linear-gradient(var(--background-line)), linear-gradient(90deg, var(--background-line));\n background-size: 116px 116px;\n mix-blend-mode: overlay;\n border-radius: 24px;\n opacity: 0.8;\n pointer-events: none;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-modal--desktop .pera-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes PeraWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes PeraWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.pera-wallet-redirect-modal {\n display: grid;\n grid-template-columns: 1fr;\n gap: 56px;\n grid-template-rows: auto 48px;\n height: 100%;\n padding: 4px;\n padding-bottom: 70px;\n}\n\n.pera-wallet-redirect-modal__content {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n}\n\n.pera-wallet-redirect-modal__content__title {\n margin: 20px 0 8px;\n color: #3c3c49;\n font-size: 18px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: -0.26px;\n}\n\n.pera-wallet-redirect-modal__content__description,\n.pera-wallet-redirect-modal__content__install-pera-text {\n color: #3c3c49;\n max-width: 271px;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.09px;\n text-align: center;\n}\n\n.pera-wallet-redirect-modal__content__description {\n margin-bottom: 24px;\n}\n\n.pera-wallet-redirect-modal__content__install-pera-text__link {\n color: #6b46fe;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.09px;\n text-align: center;\n}\n\n.pera-wallet-redirect-modal__launch-pera-wallet-button {\n display: block;\n padding: 14px;\n color: #ffffff;\n background-color: #6b46fe;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n}';o(D);const P=document.createElement("template");P.innerHTML=`\n <div class="pera-wallet-modal pera-wallet-modal--mobile">\n <div class="pera-wallet-modal__body">\n <pera-wallet-modal-header modal-id="${i.P}"></pera-wallet-modal-header/>\n\n <div class="pera-wallet-redirect-modal">\n <div class="pera-wallet-redirect-modal__content">\n <img src="data:image/svg+xml,%3csvg width='120' height='38' viewBox='0 0 120 38' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cg clip-path='url(%23clip0_38844_290434)'%3e%3cpath d='M103.739 28.6746H109.565' stroke='%236B46FE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3e%3cpath d='M112.25 37H100.75C97.5731 37 95 34.2336 95 30.8182V9.18182C95 5.76636 97.5731 3 100.75 3H112.25C115.427 3 118 5.76636 118 9.18182V30.8182C118 34.2336 115.427 37 112.25 37Z' fill='%236B46FE' fill-opacity='0.1' stroke='%236B46FE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3e%3crect y='1' width='36' height='36' rx='7.76829' fill='%236B46FE' fill-opacity='0.1'/%3e%3cpath d='M19.6057 9.47351C20.1851 11.8819 19.9967 14.0022 19.1848 14.2093C18.373 14.4164 17.2452 12.6319 16.6658 10.2235C16.0864 7.81514 16.2748 5.69486 17.0867 5.48775C17.8985 5.28063 19.0263 7.06512 19.6057 9.47351Z' fill='%236B46FE'/%3e%3cpath d='M29.0775 11.5213C27.8045 10.1593 25.2795 10.5358 23.4378 12.3621C21.5961 14.1885 21.1352 16.7732 22.4083 18.1352C23.6814 19.4972 26.2064 19.1207 28.048 17.2943C29.8897 15.4679 30.3506 12.8832 29.0775 11.5213Z' fill='%236B46FE'/%3e%3cpath d='M19.0324 32.4518C19.8443 32.2446 20.0039 30.0045 19.3889 27.4483C18.774 24.8921 17.6173 22.9877 16.8055 23.1948C15.9937 23.402 15.834 25.6421 16.449 28.1983C17.064 30.7545 18.2206 32.6589 19.0324 32.4518Z' fill='%236B46FE'/%3e%3cpath d='M10.7016 12.818C13.0471 13.5132 14.7627 14.739 14.5336 15.5559C14.3045 16.3728 12.2175 16.4714 9.87199 15.7762C7.52653 15.0809 5.81087 13.8551 6.03996 13.0383C6.26906 12.2214 8.35615 12.1228 10.7016 12.818Z' fill='%236B46FE'/%3e%3cpath d='M25.9365 21.9967C28.4259 22.7346 30.2583 23.995 30.0292 24.8119C29.8001 25.6287 27.5963 25.6927 25.1069 24.9548C22.6174 24.2169 20.7851 22.9565 21.0141 22.1397C21.2432 21.3228 23.447 21.2588 25.9365 21.9967Z' fill='%236B46FE'/%3e%3cpath d='M13.3578 20.316C12.775 19.7063 10.8709 20.6007 9.10487 22.3139C7.33879 24.0271 6.37952 25.9102 6.96226 26.5199C7.54501 27.1297 9.4491 26.2352 11.2152 24.522C12.9813 22.8089 13.9405 20.9258 13.3578 20.316Z' fill='%236B46FE'/%3e%3cpath d='M70.2098 10L75.3049 15.0945L52 15.0945' stroke='%23D0CAE7' stroke-width='3'/%3e%3cpath d='M60.7902 29.5945L55.6951 24.5L79 24.5' stroke='%23D0CAE7' stroke-width='3'/%3e%3c/g%3e%3cdefs%3e%3cclipPath id='clip0_38844_290434'%3e%3crect width='120' height='38' fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e" />\n\n <h1 class="pera-wallet-redirect-modal__content__title">\n Can't Launch Pera\n </h1>\n\n <p class="pera-wallet-redirect-modal__content__description">\n We couldn't redirect you to Pera Wallet automatically. Please try again.\n </p>\n\n <p class="pera-wallet-redirect-modal__content__install-pera-text">\n Don't have Pera Wallet installed yet?\n <br />\n \n <a\n id="pera-wallet-redirect-modal-download-pera-link"\n class="pera-wallet-redirect-modal__content__install-pera-text__link"\n href="https://perawallet.app/download/"\n rel="noopener noreferrer"\n target="_blank">\n Tap here to install.\n </a>\n </p>\n </div>\n\n <a\n id="pera-wallet-redirect-modal-launch-pera-link"\n class="pera-wallet-redirect-modal__launch-pera-wallet-button"\n rel="noopener noreferrer"\n target="_blank">\n Launch Pera Wallet\n </a>\n </div>\n </div>\n </div>\n`;class T extends HTMLElement{constructor(){var t,e;if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const n=document.createElement("style");n.textContent=D,this.shadowRoot.append(P.content.cloneNode(!0),n);const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-redirect-modal-download-pera-link");null==i||i.addEventListener("click",(()=>{this.onClose()}));const r=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("pera-wallet-redirect-modal-launch-pera-link");null==r||r.addEventListener("click",(()=>{this.onClose(),window.open(S(),"_blank")}))}}connectedCallback(){const t=window.open(S(),"_blank");t&&!t.closed&&this.onClose()}onClose(){(0,i.r)(i.P)}}var L="data:image/svg+xml,%3csvg width='32' height='35' viewBox='0 0 32 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18.2837 5.09271C19.0234 8.12325 18.7827 10.7913 17.7463 11.0519C16.7098 11.3126 15.27 9.06712 14.5304 6.03657C13.7908 3.00603 14.0315 0.337996 15.0679 0.0773547C16.1044 -0.183287 17.5441 2.06216 18.2837 5.09271Z' fill='%233C3C49'/%3e%3cpath d='M30.376 7.66915C28.7507 5.95537 25.5271 6.42918 23.1759 8.72745C20.8247 11.0257 20.2361 14.2781 21.8614 15.9919C23.4866 17.7057 26.7102 17.2319 29.0614 14.9336C31.4127 12.6354 32.0012 9.38294 30.376 7.66915Z' fill='%233C3C49'/%3e%3cpath d='M17.5511 34.0071C18.5876 33.7465 18.7914 30.9276 18.0064 27.711C17.2214 24.4945 15.7448 22.0982 14.7084 22.3589C13.6719 22.6195 13.4681 25.4383 14.2531 28.6549C15.0381 31.8715 16.5147 34.2677 17.5511 34.0071Z' fill='%233C3C49'/%3e%3cpath d='M6.91617 9.3015C9.9105 10.1763 12.1008 11.7187 11.8083 12.7466C11.5158 13.7745 8.85126 13.8986 5.85693 13.0239C2.8626 12.1491 0.672334 10.6067 0.964835 9.57881C1.25734 8.5509 3.92184 8.42674 6.91617 9.3015Z' fill='%233C3C49'/%3e%3cpath d='M26.3656 20.8508C29.5437 21.7793 31.883 23.3652 31.5905 24.3932C31.298 25.4211 28.4845 25.5017 25.3063 24.5732C22.1282 23.6448 19.7889 22.0588 20.0814 21.0309C20.3739 20.003 23.1874 19.9224 26.3656 20.8508Z' fill='%233C3C49'/%3e%3cpath d='M10.3069 18.7365C9.56299 17.9692 7.13209 19.0948 4.87736 21.2506C2.62264 23.4064 1.39791 25.776 2.14185 26.5432C2.8858 27.3105 5.3167 26.1849 7.57143 24.0291C9.82615 21.8733 11.0509 19.5037 10.3069 18.7365Z' fill='%233C3C49'/%3e%3c/svg%3e",B=".pera-wallet-connect-modal-information-section {\n padding: 12px;\n padding-right: 0;\n}\n.pera-wallet-connect-modal-information-section--mobile {\n padding: 0;\n}\n.pera-wallet-connect-modal-information-section--mobile .pera-wallet-connect-modal-information-section__pera-icon {\n margin-bottom: 16px;\n}\n.pera-wallet-connect-modal-information-section--mobile .pera-wallet-connect-modal-information-section__connect-pera-title {\n margin-bottom: 8px;\n color: #3c3c49;\n font-size: 18px;\n font-weight: 600;\n line-height: 22px;\n letter-spacing: -0.2px;\n}\n.pera-wallet-connect-modal-information-section--mobile .pera-wallet-connect-modal-information-section__title {\n margin-bottom: 24px;\n color: #3c3c49;\n font-size: 14px;\n line-height: 24px;\n letter-spacing: -0.09px;\n font-weight: 400;\n}\n.pera-wallet-connect-modal-information-section--mobile .pera-wallet-connect-modal-information-section__features-item__icon-wrapper {\n background-color: #f2f3f8;\n}\n.pera-wallet-connect-modal-information-section--mobile .pera-wallet-connect-modal-information-section__features-item__description {\n color: #6a6a81;\n}\n.pera-wallet-connect-modal-information-section * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.pera-wallet-connect-modal-information-section__pera-icon {\n margin-bottom: 32px;\n}\n\n.pera-wallet-connect-modal-information-section__title {\n margin-bottom: 148px;\n color: #3c3c49;\n font-size: 20px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.5px;\n}\n\n.pera-wallet-connect-modal-information-section__secondary-title {\n margin-bottom: 20px;\n color: #9d9dae;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n letter-spacing: 0.06px;\n text-transform: uppercase;\n}\n\n.pera-wallet-connect-modal-information-section__features-item {\n display: grid;\n align-items: center;\n grid-template-columns: 36px auto;\n gap: 16px;\n}\n.pera-wallet-connect-modal-information-section__features-item:not(:last-of-type) {\n margin-bottom: 24px;\n}\n\n.pera-wallet-connect-modal-information-section__features-item__icon-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n background-color: #ffffff;\n border-radius: 50%;\n}\n\n.pera-wallet-connect-modal-information-section__features-item__description {\n color: #6a6a81;\n font-size: 12px;\n font-weight: 500;\n line-height: 18px;\n letter-spacing: 0.01px;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-connect-modal-information-section--desktop {\n padding: 0;\n }\n .pera-wallet-connect-modal-information-section--desktop .pera-wallet-connect-modal-information-section__pera-icon {\n margin-bottom: 12px;\n }\n .pera-wallet-connect-modal-information-section--desktop .pera-wallet-connect-modal-information-section__title {\n margin-bottom: 24px;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.26px;\n }\n .pera-wallet-connect-modal-information-section--desktop .pera-wallet-connect-modal-information-section__features-item {\n display: none;\n }\n .pera-wallet-connect-modal-information-section__secondary-title {\n display: none;\n }\n}";o(B);const F=document.createElement("template"),R=(0,i.i)()?"pera-wallet-connect-modal-information-section pera-wallet-connect-modal-information-section--mobile":"pera-wallet-connect-modal-information-section pera-wallet-connect-modal-information-section--desktop";F.innerHTML=`\n <section class="${R}">\n <img\n id="pera-wallet-connect-modal-information-section-pera-icon"\n src="${L}"\n class="pera-wallet-connect-modal-information-section__pera-icon"\n alt="Pera Wallet Logo"\n />\n\n <h1 id="pera-wallet-connect-modal-information-section-connect-pera-mobile" class="pera-wallet-connect-modal-information-section__connect-pera-title">\n Connect to Pera Wallet\n </h1>\n\n <h1 class="pera-wallet-connect-modal-information-section__title">\n Simply the best Algorand wallet.\n </h1>\n\n <h2 id="pera-wallet-connect-modal-information-section-secondary-title" class="pera-wallet-connect-modal-information-section__secondary-title">\n Features\n </h2>\n\n <ul>\n <li class="pera-wallet-connect-modal-information-section__features-item">\n <div class="pera-wallet-connect-modal-information-section__features-item__icon-wrapper">\n <img src="data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2.5 10.1378C2.5 10.8378 3.025 11.6461 3.66667 11.9294L9.325 14.4461C9.75833 14.6378 10.25 14.6378 10.675 14.4461L16.3333 11.9294C16.975 11.6461 17.5 10.8378 17.5 10.1378M2.5 14.3044C2.5 15.0794 2.95833 15.7794 3.66667 16.0961L9.325 18.6128C9.75833 18.8044 10.25 18.8044 10.675 18.6128L16.3333 16.0961C17.0417 15.7794 17.5 15.0794 17.5 14.3044M10.8417 3.4043L15.7583 5.58763C17.175 6.21263 17.175 7.24596 15.7583 7.87096L10.8417 10.0543C10.2833 10.3043 9.36668 10.3043 8.80835 10.0543L3.89168 7.87096C2.47502 7.24596 2.47502 6.21263 3.89168 5.58763L8.80835 3.4043C9.36668 3.1543 10.2833 3.1543 10.8417 3.4043Z' stroke='%239D9DAE' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e" alt="Layer Icon" />\n </div>\n \n <p\n class="pera-wallet-connect-modal-information-section__features-item__description">\n Connect to any Algorand dApp securely\n </p>\n </li>\n\n <li class="pera-wallet-connect-modal-information-section__features-item">\n <div\n class="pera-wallet-connect-modal-information-section__features-item__icon-wrapper">\n <img src="data:image/svg+xml,%3csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M9.58033 12.3109C9.28744 12.018 8.81257 12.018 8.51967 12.3109C8.22678 12.6038 8.22678 13.0787 8.51967 13.3716L9.58033 12.3109ZM10.66 14.4512L10.1297 14.9816C10.4226 15.2745 10.8974 15.2745 11.1903 14.9816L10.66 14.4512ZM15.4903 10.6816C15.7832 10.3887 15.7832 9.91381 15.4903 9.62092C15.1974 9.32803 14.7226 9.32803 14.4297 9.62092L15.4903 10.6816ZM19.84 8.09125C19.84 8.50546 20.1758 8.84125 20.59 8.84125C21.0042 8.84125 21.34 8.50546 21.34 8.09125H19.84ZM18.5 5.07125L18.2368 5.77355L18.2373 5.77375L18.5 5.07125ZM13.51 3.20125L13.7732 2.49894L13.7724 2.49866L13.51 3.20125ZM10.49 3.20125L10.2276 2.49865L10.2256 2.49941L10.49 3.20125ZM5.5 5.08125L5.76268 5.78375L5.76442 5.78309L5.5 5.08125ZM5.14 18.9612L4.69102 19.562L4.69135 19.5623L5.14 18.9612ZM9.44 22.1713L9.89069 21.5718L9.88866 21.5702L9.44 22.1713ZM14.58 22.1713L14.1313 21.5702L14.1293 21.5718L14.58 22.1713ZM18.88 18.9612L19.3287 19.5623L19.329 19.562L18.88 18.9612ZM21.36 8.09125C21.36 7.67704 21.0242 7.34125 20.61 7.34125C20.1958 7.34125 19.86 7.67704 19.86 8.09125H21.36ZM8.51967 13.3716L10.1297 14.9816L11.1903 13.9209L9.58033 12.3109L8.51967 13.3716ZM11.1903 14.9816L15.4903 10.6816L14.4297 9.62092L10.1297 13.9209L11.1903 14.9816ZM21.34 8.09125C21.34 7.29392 21.0398 6.50041 20.5931 5.85456C20.1463 5.20881 19.5097 4.64807 18.7627 4.36875L18.2373 5.77375C18.6403 5.92443 19.0487 6.25869 19.3595 6.70794C19.6702 7.15709 19.84 7.65858 19.84 8.09125H21.34ZM18.7632 4.36895L13.7732 2.49895L13.2468 3.90355L18.2368 5.77355L18.7632 4.36895ZM13.7724 2.49866C13.2479 2.30277 12.6051 2.21875 12 2.21875C11.3949 2.21875 10.7521 2.30277 10.2276 2.49866L10.7524 3.90384C11.0579 3.78973 11.5101 3.71875 12 3.71875C12.4899 3.71875 12.9421 3.78973 13.2476 3.90384L13.7724 2.49866ZM10.2256 2.49941L5.23558 4.37941L5.76442 5.78309L10.7544 3.90309L10.2256 2.49941ZM5.23733 4.37875C4.49043 4.65803 3.85398 5.2186 3.40741 5.86265C2.96095 6.50656 2.66 7.2978 2.66 8.09125H4.16C4.16 7.6647 4.32906 7.16594 4.64009 6.71735C4.95103 6.2689 5.35957 5.93447 5.76268 5.78375L5.23733 4.37875ZM2.66 8.09125V15.5212H4.16V8.09125H2.66ZM2.66 15.5212C2.66 16.2602 2.8989 17.059 3.24874 17.7545C3.59871 18.4503 4.09802 19.1188 4.69102 19.562L5.58899 18.3605C5.23198 18.0937 4.86629 17.6322 4.58877 17.0805C4.31111 16.5285 4.16 15.9623 4.16 15.5212H2.66ZM4.69135 19.5623L8.99135 22.7723L9.88866 21.5702L5.58866 18.3602L4.69135 19.5623ZM8.98932 22.7707C9.84721 23.4157 10.9462 23.7163 12.01 23.7163C13.0738 23.7163 14.1728 23.4157 15.0307 22.7707L14.1293 21.5718C13.5772 21.9868 12.8112 22.2163 12.01 22.2163C11.2088 22.2163 10.4428 21.9868 9.89068 21.5718L8.98932 22.7707ZM15.0287 22.7723L19.3287 19.5623L18.4313 18.3602L14.1313 21.5702L15.0287 22.7723ZM19.329 19.562C19.922 19.1188 20.4213 18.4503 20.7713 17.7545C21.1211 17.059 21.36 16.2602 21.36 15.5212H19.86C19.86 15.9623 19.7089 16.5285 19.4312 17.0805C19.1537 17.6322 18.788 18.0937 18.431 18.3605L19.329 19.562ZM21.36 15.5212V8.09125H19.86V15.5212H21.36Z' fill='%239D9DAE'/%3e%3c/svg%3e" alt="Tick Icon" />\n </div>\n\n <p\n class="pera-wallet-connect-modal-information-section__features-item__description">\n Your private keys are safely stored locally\n </p>\n </li>\n\n <li class="pera-wallet-connect-modal-information-section__features-item">\n <div\n class="pera-wallet-connect-modal-information-section__features-item__icon-wrapper">\n <img src="data:image/svg+xml,%3csvg width='20' height='21' viewBox='0 0 20 21' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M18.05 9.67014L17.3198 9.49894L18.05 9.67014ZM17.2333 13.1535L16.5031 12.9823L16.5029 12.9835L17.2333 13.1535ZM12.55 17.1285L12.6218 16.3818L12.6098 16.3809L12.55 17.1285ZM11.2 16.9035L11.376 16.1744L11.3737 16.1739L11.2 16.9035ZM9.8 16.5701L9.97372 15.8405L9.97324 15.8404L9.8 16.5701ZM6.06667 10.5451L6.79687 10.7163L6.79696 10.7159L6.06667 10.5451ZM6.88334 7.05347L6.15327 6.88169L6.15304 6.88267L6.88334 7.05347ZM7.5 5.22014L8.17303 5.55114L8.17523 5.54659L7.5 5.22014ZM12.9167 3.32014L12.744 4.05L12.7461 4.05049L12.9167 3.32014ZM14.3083 3.64514L14.4791 2.91485L14.4789 2.91479L14.3083 3.64514ZM10.5917 18.0285L10.359 17.3155L10.3572 17.3161L10.5917 18.0285ZM9.27501 18.4618L9.50516 19.1756L9.50947 19.1742L9.27501 18.4618ZM3.15001 15.3285L2.43654 15.5597L2.43672 15.5603L3.15001 15.3285ZM2.08334 12.0368L1.36953 12.267L1.36987 12.268L2.08334 12.0368ZM5.20834 5.91182L5.43849 6.62565L5.44281 6.62423L5.20834 5.91182ZM6.52501 5.47848L6.29831 4.76352L6.29055 4.76608L6.52501 5.47848ZM10.7177 7.35149C10.3162 7.24967 9.90818 7.49261 9.80635 7.89411C9.70453 8.29561 9.94746 8.70364 10.349 8.80546L10.7177 7.35149ZM14.3906 9.83046C14.7921 9.93229 15.2002 9.68935 15.302 9.28785C15.4038 8.88635 15.1609 8.47832 14.7594 8.37649L14.3906 9.83046ZM9.90211 10.5768C9.50076 10.4743 9.09238 10.7167 8.98996 11.118C8.88755 11.5194 9.12988 11.9278 9.53124 12.0302L9.90211 10.5768ZM11.9479 12.6469C12.3493 12.7493 12.7576 12.5069 12.8601 12.1056C12.9625 11.7042 12.7201 11.2958 12.3188 11.1934L11.9479 12.6469ZM17.3198 9.49894L16.5031 12.9823L17.9635 13.3247L18.7802 9.84133L17.3198 9.49894ZM16.5029 12.9835C16.168 14.4224 15.6979 15.2955 15.1165 15.793C14.5605 16.2688 13.7912 16.4944 12.6218 16.3819L12.4782 17.875C13.9088 18.0126 15.1312 17.7548 16.0918 16.9327C17.0271 16.1323 17.5986 14.8928 17.9638 13.3234L16.5029 12.9835ZM12.6098 16.3809C12.2388 16.3512 11.8281 16.2835 11.376 16.1744L11.024 17.6325C11.5386 17.7567 12.0279 17.8391 12.4902 17.8761L12.6098 16.3809ZM11.3737 16.1739L9.97372 15.8405L9.62629 17.2997L11.0263 17.6331L11.3737 16.1739ZM9.97324 15.8404C8.30732 15.4449 7.40652 14.876 6.96107 14.1588C6.51616 13.4425 6.40566 12.385 6.79687 10.7163L5.33647 10.3739C4.91101 12.1887 4.92968 13.7311 5.68685 14.9502C6.44349 16.1685 7.81769 16.8704 9.62676 17.2999L9.97324 15.8404ZM6.79696 10.7159L7.61363 7.22428L6.15304 6.88267L5.33638 10.3743L6.79696 10.7159ZM7.6134 7.22525C7.77277 6.54795 7.95691 5.99053 8.17301 5.55113L6.82699 4.88915C6.54309 5.46641 6.32724 6.14234 6.15327 6.88169L7.6134 7.22525ZM8.17523 5.54659C8.59604 4.67619 9.11898 4.20234 9.77488 3.97598C10.4657 3.73759 11.4133 3.73525 12.744 4.05L13.0893 2.59028C11.6367 2.2467 10.3635 2.18603 9.28554 2.55805C8.17269 2.94211 7.37896 3.74743 6.82478 4.89369L8.17523 5.54659ZM12.7461 4.05049L14.1378 4.37549L14.4789 2.91479L13.0872 2.58979L12.7461 4.05049ZM14.1375 4.37543C15.8111 4.76687 16.7126 5.33603 17.1575 6.05304C17.6023 6.77006 17.7112 7.82942 17.3198 9.49894L18.7802 9.84133C19.2054 8.02753 19.1893 6.48272 18.4321 5.26224C17.6749 4.04175 16.2972 3.34008 14.4791 2.91485L14.1375 4.37543ZM12.1294 16.5075C11.6911 16.8045 11.1123 17.0697 10.359 17.3155L10.8243 18.7415C11.6544 18.4706 12.3756 18.1525 12.9706 17.7494L12.1294 16.5075ZM10.3572 17.3161L9.04055 17.7494L9.50947 19.1742L10.8261 18.7409L10.3572 17.3161ZM9.04486 17.748C7.46037 18.2589 6.43607 18.2362 5.71663 17.8681C4.99693 17.4999 4.37829 16.6816 3.8633 15.0967L2.43672 15.5603C2.99673 17.2837 3.78642 18.5654 5.03339 19.2035C6.28062 19.8416 7.78131 19.7314 9.50516 19.1756L9.04486 17.748ZM3.86348 15.0973L2.79682 11.8056L1.36987 12.268L2.43654 15.5597L3.86348 15.0973ZM2.79716 11.8067C2.28607 10.2215 2.3068 9.19457 2.67362 8.4739C3.03983 7.75443 3.85506 7.13616 5.43849 6.62563L4.9782 5.198C3.25329 5.75414 1.97269 6.54421 1.33682 7.79348C0.701551 9.04157 0.813948 10.5438 1.36953 12.267L2.79716 11.8067ZM5.44281 6.62423L6.75947 6.19089L6.29055 4.76608L4.97388 5.19941L5.44281 6.62423ZM6.75169 6.19341C7.08205 6.08866 7.37424 6.00724 7.63942 5.95707L7.36058 4.48321C7.00909 4.54971 6.6513 4.65164 6.29833 4.76356L6.75169 6.19341ZM10.349 8.80546L14.3906 9.83046L14.7594 8.37649L10.7177 7.35149L10.349 8.80546ZM9.53124 12.0302L11.9479 12.6469L12.3188 11.1934L9.90211 10.5768L9.53124 12.0302Z' fill='%239D9DAE'/%3e%3c/svg%3e" alt="Note Icon" />\n </div>\n\n <p\n class="pera-wallet-connect-modal-information-section__features-item__description">\n View NFTs, buy and swap crypto and more\n </p>\n </li>\n </ul>\n </section>\n`;class N extends HTMLElement{constructor(){var t,e,n,r;super(),this.attachShadow({mode:"open"});const a="true"===(null===(t=document.querySelector("pera-wallet-connect-modal"))||void 0===t?void 0:t.getAttribute("compact-mode"));if(this.shadowRoot&&(!a&&!(0,i.i)()||(0,i.i)())){const t=document.createElement("style");t.textContent=B,this.shadowRoot.append(F.content.cloneNode(!0),t),(0,i.i)()?null===(e=this.shadowRoot.getElementById("pera-wallet-connect-modal-information-section-title"))||void 0===e||e.setAttribute("style","display: none;"):(null===(n=this.shadowRoot.getElementById("pera-wallet-connect-modal-information-section-pera-icon"))||void 0===n||n.setAttribute("src","data:image/svg+xml,%3csvg width='84' height='38' viewBox='0 0 84 38' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M19.806 8.62773C20.4416 11.2609 20.2268 13.5772 19.3262 13.8012C18.4256 14.0253 17.1803 12.0723 16.5448 9.43906C15.9092 6.80585 16.1241 4.48959 17.0246 4.26555C17.9252 4.04151 19.1705 5.99452 19.806 8.62773Z' fill='%233C3C49'/%3e%3cpath d='M30.3007 10.8917C28.8932 9.3999 26.0929 9.80424 24.0461 11.7948C21.9994 13.7853 21.4812 16.6082 22.8887 18.1C24.2962 19.5917 27.0964 19.1874 29.1432 17.1969C31.1899 15.2064 31.7082 12.3834 30.3007 10.8917Z' fill='%233C3C49'/%3e%3cpath d='M19.1061 33.734C20.0067 33.5099 20.1899 31.0627 19.5153 28.2678C18.8408 25.473 17.5639 23.3889 16.6633 23.613C15.7627 23.837 15.5795 26.2843 16.2541 29.0791C16.9286 31.874 18.2056 33.958 19.1061 33.734Z' fill='%233C3C49'/%3e%3cpath d='M9.92571 12.2574C12.5239 13.0236 14.4224 14.3678 14.1662 15.2597C13.9099 16.1517 11.5959 16.2536 8.99771 15.4874C6.3995 14.7212 4.50098 13.377 4.75724 12.4851C5.0135 11.5931 7.3275 11.4912 9.92571 12.2574Z' fill='%233C3C49'/%3e%3cpath d='M26.7892 22.3292C29.5469 23.1424 31.5747 24.5247 31.3184 25.4167C31.0621 26.3086 28.6189 26.3724 25.8612 25.5592C23.1035 24.7459 21.0757 23.3636 21.3319 22.4717C21.5882 21.5797 24.0315 21.5159 26.7892 22.3292Z' fill='%233C3C49'/%3e%3cpath d='M12.8493 20.4577C12.205 19.7898 10.0916 20.7619 8.12896 22.6289C6.16631 24.4959 5.09759 26.5509 5.7419 27.2188C6.38622 27.8867 8.49958 26.9146 10.4622 25.0476C12.4249 23.1806 13.4936 21.1256 12.8493 20.4577Z' fill='%233C3C49'/%3e%3cpath d='M41.691 12.5347V11.9635H39.3366V27.1957H41.691V23.0915C41.691 22.6472 41.691 22.2876 41.6482 21.801H41.691C42.5471 23.1973 44.0026 23.9377 45.7148 23.9377C48.6043 23.9377 51.1299 21.7587 51.1299 17.7179C51.1299 13.7617 48.6043 11.625 45.7148 11.625C44.0668 11.625 42.6113 12.3443 41.691 13.7617H41.6482C41.691 13.2963 41.691 12.9578 41.691 12.5347ZM45.1155 21.9279C42.9324 21.9068 41.6696 20.0662 41.6696 17.6967C41.6696 15.4542 42.9324 13.656 45.1155 13.6348C47.2559 13.6137 48.6685 15.2638 48.6685 17.7179C48.6685 20.2354 47.2559 21.9491 45.1155 21.9279Z' fill='%233C3C49'/%3e%3cpath d='M63.4932 16.7236C63.4932 13.8041 61.1388 11.625 57.9283 11.625C54.5037 11.625 52.1279 13.931 52.1279 17.7814C52.1279 21.4836 54.4609 23.9377 57.9283 23.9377C60.7749 23.9377 62.8939 22.2876 63.3862 20.0239H60.8177C60.4111 21.1663 59.2981 21.9279 57.9283 21.9279C56.1732 21.9279 54.889 20.6797 54.6107 18.6064H63.4932V16.7236ZM57.9283 13.6348C59.662 13.6348 60.8606 14.8195 61.1174 16.5332H54.6321C54.9318 14.883 56.1518 13.6348 57.9283 13.6348Z' fill='%233C3C49'/%3e%3cpath d='M65.224 23.5992H67.5784V17.0409C67.5784 14.7984 68.8198 13.6348 70.7462 13.6348H72.009V11.625H71.003C69.2693 11.625 68.1991 12.7674 67.5784 13.7617H67.5356V11.9635H65.224V23.5992Z' fill='%233C3C49'/%3e%3cpath d='M83.0154 21.5683C82.6944 21.5683 82.5445 21.3779 82.5445 20.9971V15.8773C82.5445 13.4233 81.3459 11.625 77.8144 11.625C74.3898 11.625 72.8273 13.3175 72.6561 15.7292H75.0105C75.1603 14.4176 76.2091 13.6348 77.8144 13.6348C79.1842 13.6348 80.1259 14.2272 80.1259 15.158C80.1259 15.9196 79.5909 16.3851 77.8358 16.3851H76.894C74.0901 16.3851 72.2066 17.5063 72.2066 20.0662C72.2066 22.753 74.1972 23.98 76.5301 23.98C78.2638 23.98 79.7407 23.2184 80.3186 21.5894C80.3828 22.7742 81.1747 23.5992 82.673 23.5992H84V21.5683H83.0154ZM80.1902 18.1833C80.1902 20.8067 78.7561 21.9491 76.9154 21.9491C75.3101 21.9491 74.668 21.0182 74.668 20.0662C74.668 19.1565 75.2245 18.416 76.9368 18.416H77.2793C78.9273 18.416 79.9547 17.8448 80.1688 16.8505H80.1902V18.1833Z' fill='%233C3C49'/%3e%3c/svg%3e"),null===(r=this.shadowRoot.getElementById("pera-wallet-connect-modal-information-section-connect-pera-mobile"))||void 0===r||r.setAttribute("style","display: none;"))}}}var V='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");\n.pera-wallet-modal {\n --pera-wallet-modal-font-family: "Inter", sans-serif;\n --pera-wallet-modal-compact-width: 380px;\n --pera-wallet-modal-compact-height: 396px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.pera-wallet-modal--select-account .pera-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-color: #ffffff;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: unset;\n height: calc(100 * var(--pera-wallet-vh));\n padding: 20px;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s PeraWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body::before {\n background-image: unset;\n}\n.pera-wallet-modal--compact:not(.pera-wallet-modal--mobile) .pera-wallet-modal__body {\n width: var(--pera-wallet-modal-compact-width);\n height: var(--pera-wallet-modal-compact-height);\n padding: 0;\n}\n.pera-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.pera-wallet-modal ul,\n.pera-wallet-modal ol,\n.pera-wallet-modal li {\n list-style-type: none;\n}\n\n.pera-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.pera-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.pera-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 700px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #f3f3f7;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 24px;\n animation: 0.3s PeraWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n.pera-wallet-modal__body::before {\n --background-line: #1e0972 0 1.2px, transparent 0 calc(100% - 1.2px), #1e0972;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n content: "";\n background-image: linear-gradient(var(--background-line)), linear-gradient(90deg, var(--background-line));\n background-size: 116px 116px;\n mix-blend-mode: overlay;\n border-radius: 24px;\n opacity: 0.8;\n pointer-events: none;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-modal--desktop .pera-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes PeraWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes PeraWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.pera-wallet-connect-modal-pending-message-section {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto 48px;\n gap: 56px;\n height: 100%;\n padding: 4px;\n padding-bottom: 70px;\n}\n\n.pera-wallet-connect-modal-pending-message {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n text-align: center;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view {\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n height: 100%;\n margin-top: 10px;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__title {\n margin: 16px 0 12px;\n color: #3c3c49;\n font-size: 18px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.26px;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__description {\n color: #6a6a81;\n font-size: 14px;\n font-weight: 400;\n line-height: 24px;\n letter-spacing: -0.01px;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__button {\n display: block;\n width: 100%;\n padding: 14px;\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n color: #ffffff;\n background-color: #6b46fe;\n border: none;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor {\n display: flex;\n gap: 12px;\n margin-bottom: 20px;\n padding: 16px;\n background: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border-radius: 12px;\n text-decoration: none;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__image {\n width: 24px;\n height: 24px;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 4px;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n letter-spacing: -0.1px;\n color: #3c3c49;\n}\n.pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__description {\n /* stylelint-disable value-no-vendor-prefix */\n /* stylelint-disable property-no-vendor-prefix */\n display: -webkit-box;\n max-width: 100%;\n -webkit-line-clamp: 2;\n /* autoprefixer: ignore next */\n -webkit-box-orient: vertical;\n overflow: hidden;\n /* stylelint-enable value-no-vendor-prefix */\n /* stylelint-enable property-no-vendor-prefix */\n margin: 0;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n letter-spacing: 0.01px;\n color: #9d9dae;\n}\n\n.pera-wallet-connect-modal-pending-message__animation-wrapper {\n width: 56px;\n height: 56px;\n background-color: #6b46fe;\n border-radius: 50%;\n}\n\n.pera-wallet-connect-modal-pending-message__text {\n max-width: 271px;\n margin-top: 24px;\n color: #3c3c49;\n font-size: 18px;\n font-weight: 500;\n line-height: 28px;\n letter-spacing: -0.26px;\n}\n\n.pera-wallet-connect-modal-pending-message__cancel-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n padding: 14px;\n color: #6a6a81;\n background-color: #ffffff;\n box-shadow: 0px 0px 1px rgba(12, 26, 75, 0.24), 0px 3px 8px -1px rgba(50, 50, 71, 0.05);\n border-radius: 12px;\n text-decoration: none;\n text-align: center;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: -0.09px;\n font-weight: 500;\n border: none;\n}';o(V);const z=document.createElement("template");z.innerHTML='\n <div class="pera-wallet-connect-modal-pending-message-section">\n <div class="pera-wallet-connect-modal-pending-message">\n <div id="pera-wallet-connect-modal-pending-message-animation-wrapper" class="pera-wallet-connect-modal-pending-message__animation-wrapper"></div>\n\n <div class="pera-wallet-connect-modal-pending-message__text">\n Please wait while we connect you to Pera Wallet\n </div>\n </div>\n\n <button\n id="pera-wallet-connect-modal-pending-message-cancel-button"\n class="pera-wallet-button pera-wallet-connect-modal-pending-message__cancel-button">\n Cancel\n </button>\n </div>\n\n <div id="pera-wallet-connect-modal-pending-message-audio-wrapper"></div>\n';const G=`\n <div class="pera-wallet-connect-modal-pending-message--try-again-view">\n <div>\n <img src="${L}" alt="Pera Wallet Logo" />\n\n <h1 class="pera-wallet-connect-modal-pending-message--try-again-view__title">\n Couldn’t establish connection\n </h1>\n\n <p class="pera-wallet-connect-modal-pending-message--try-again-view__description">\n Having issues? Before trying again, make sure to read the support article below and apply the possible solutions.\n </p>\n </div>\n\n <div>\n <a\n href="https://support.perawallet.app/en/article/resolving-walletconnect-issues-1tolptm/"\n target="_blank"\n rel="noopener noreferrer"\n class="pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor">\n <img\n class="pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__image"\n src="data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 22.3199C7.72 22.3199 7.42998 22.2499 7.16998 22.1099C6.59998 21.8099 6.25 21.2099 6.25 20.5699V19.15C3.23 18.84 1.25 16.6199 1.25 13.4399V7.43994C1.25 3.99994 3.56 1.68994 7 1.68994H17C20.44 1.68994 22.75 3.99994 22.75 7.43994V13.4399C22.75 16.8799 20.44 19.1899 17 19.1899H13.23L8.96997 22.03C8.67997 22.22 8.34 22.3199 8 22.3199ZM7 3.17993C4.42 3.17993 2.75 4.84993 2.75 7.42993V13.43C2.75 16.01 4.42 17.68 7 17.68C7.41 17.68 7.75 18.02 7.75 18.43V20.56C7.75 20.69 7.83 20.75 7.88 20.78C7.93001 20.81 8.03001 20.84 8.14001 20.77L12.59 17.81C12.71 17.73 12.86 17.68 13.01 17.68H17.01C19.59 17.68 21.26 16.01 21.26 13.43V7.42993C21.26 4.84993 19.59 3.17993 17.01 3.17993H7ZM11.9998 12.11C11.5898 12.11 11.2498 11.77 11.2498 11.36V11.15C11.2498 10.0038 12.0798 9.4336 12.4082 9.20798L12.4198 9.20001C12.7898 8.95001 12.9098 8.78002 12.9098 8.52002C12.9098 8.02002 12.4998 7.60999 11.9998 7.60999C11.4998 7.60999 11.0898 8.02002 11.0898 8.52002C11.0898 8.93002 10.7498 9.27002 10.3398 9.27002C9.92984 9.27002 9.58984 8.93002 9.58984 8.52002C9.58984 7.19002 10.6698 6.10999 11.9998 6.10999C13.3298 6.10999 14.4098 7.19002 14.4098 8.52002C14.4098 9.66002 13.5698 10.23 13.2598 10.44C12.8698 10.7 12.7498 10.87 12.7498 11.15V11.36C12.7498 11.78 12.4098 12.11 11.9998 12.11ZM11.25 13.85C11.25 14.26 11.58 14.6 12 14.6C12.42 14.6 12.75 14.26 12.75 13.85C12.75 13.44 12.41 13.1 12 13.1C11.59 13.1 11.25 13.44 11.25 13.85Z' fill='%236B46FE'/%3e%3c/svg%3e"\n alt="Help Icon"\n />\n\n <div>\n <div\n class="pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title-wrapper">\n <h1\n class="pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__title">\n Resolving WalletConnect issues\n </h1>\n\n <img src="data:image/svg+xml,%3csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.3287 10.0983C10.9574 10.0983 10.6564 9.79734 10.6564 9.42604L10.6564 6.29525L5.14866 11.803C4.88611 12.0655 4.46044 12.0655 4.19789 11.803C3.93534 11.5404 3.93534 11.1147 4.19789 10.8522L9.70561 5.34447L6.57482 5.34447C6.20352 5.34447 5.90252 5.04347 5.90252 4.67218C5.90252 4.30088 6.20352 3.99988 6.57482 3.99988L11.3287 3.99988C11.507 3.99988 11.678 4.07071 11.8041 4.19679C11.9301 4.32287 12.001 4.49387 12.001 4.67218L12.001 9.42604C12.001 9.79734 11.7 10.0983 11.3287 10.0983Z' fill='%239D9DAE'/%3e%3c/svg%3e" alt="Send Icon"/>\n </div>\n\n <p\n class="pera-wallet-connect-modal-pending-message--try-again-view__resolving-anchor__description">\n Unfortunately there are several known issues related to WalletConnect that our team is working on. Some of these issues are related to the WalletConnect JavaScript implementation on the dApp ...\n </p>\n </div>\n </a>\n\n <button id="pera-wallet-connect-modal-pending-message-try-again-button" class="pera-wallet-connect-button pera-wallet-connect-modal-pending-message--try-again-view__button">\n Close & Try Again\n </button>\n </div>\n </div>\n `;class W extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=V,this.shadowRoot.append(z.content.cloneNode(!0),t)}}connectedCallback(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-pending-message-cancel-button");null==e||e.addEventListener("click",(()=>{this.onClose()})),this.addAudioForConnection(),this.renderLottieAnimation(),setTimeout((()=>{var t;if(z.innerHTML=G,this.shadowRoot){const e=document.createElement("style");e.textContent=V,this.shadowRoot.innerHTML="",this.shadowRoot.append(z.content.cloneNode(!0),e);const n=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-pending-message-try-again-button");null==n||n.addEventListener("click",(()=>{this.onClose()}))}}),3e4)}onClose(){(0,i.r)(i.g)}addAudioForConnection(){var t;if("true"===this.getAttribute("should-use-sound")&&(0,i.b)()){const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-pending-message-audio-wrapper"),n=document.createElement("audio");n.src="https://s3.amazonaws.com/wc.perawallet.app/audio.mp3",n.autoplay=!0,n.loop=!0,null==e||e.appendChild(n)}}renderLottieAnimation(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-connect-modal-pending-message-animation-wrapper");e&&a.loadAnimation({container:e,renderer:"svg",loop:!0,autoplay:!0,path:"https://s3.amazonaws.com/wc.perawallet.app/static/pera-loader-animation.json"})}}var O='.pera-wallet-sign-txn-toast {\n --pera-wallet-sign-txn-toast-width: 422px;\n --pera-wallet-sign-txn-toast-height: 134px;\n --pera-wallet-sign-txn-toast-font-family: "Inter", sans-serif;\n position: fixed;\n bottom: 28px;\n right: 35px;\n z-index: 11;\n overflow: hidden;\n width: var(--pera-wallet-sign-txn-toast-width);\n height: var(--pera-wallet-sign-txn-toast-height);\n background: #edeffb;\n border-radius: 8px;\n animation: 0.2s PeraWalletSignTxnToastSlideIn ease-out;\n}\n.pera-wallet-sign-txn-toast * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-sign-txn-toast-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.pera-wallet-sign-txn-toast ul,\n.pera-wallet-sign-txn-toast ol,\n.pera-wallet-sign-txn-toast li {\n list-style-type: none;\n}\n\n.pera-wallet-sign-txn-toast__header__close-button {\n position: absolute;\n top: 10px;\n right: 10px;\n width: 20px;\n height: 20px;\n margin: 0;\n padding: 0;\n background: transparent;\n border: none;\n cursor: pointer;\n}\n\n.pera-wallet-sign-txn-toast__content__lottie-animation {\n position: absolute;\n top: -75px;\n left: -100px;\n width: 368px;\n height: 368px;\n}\n\n.pera-wallet-sign-txn-toast__content__description {\n position: absolute;\n top: 40px;\n right: 48px;\n max-width: 197px;\n color: #3c3c49;\n font-size: 14px;\n line-height: 22px;\n letter-spacing: -0.1px;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-sign-txn-toast {\n display: none;\n }\n}\n@keyframes PeraWalletSignTxnToastSlideIn {\n 0% {\n bottom: 12px;\n opacity: 0;\n }\n 100% {\n bottom: 26px;\n opacity: 1;\n }\n}';o(O);const Z=document.createElement("template");Z.innerHTML='\n <div class="pera-wallet-sign-txn-toast">\n <div class="pera-wallet-sign-txn-toast__header">\n <button\n id="pera-wallet-sign-txn-toast-close-button"\n class="pera-wallet-sign-txn-toast__header__close-button">\n <img src="data:image/svg+xml,%3csvg width=\'20\' height=\'20\' viewBox=\'0 0 20 20\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3e%3cpath d=\'M14.4107 4.41074L9.41074 9.41074L10.5893 10.5893L15.5893 5.58926L14.4107 4.41074ZM9.41074 9.41074L4.41074 14.4107L5.58926 15.5893L10.5893 10.5893L9.41074 9.41074ZM15.5893 14.4107L10.5893 9.41074L9.41074 10.5893L14.4107 15.5893L15.5893 14.4107ZM10.5893 9.41074L5.58926 4.41074L4.41074 5.58926L9.41074 10.5893L10.5893 9.41074Z\' fill=\'%239099BD\'/%3e%3c/svg%3e" />\n </button>\n </div>\n <div class="pera-wallet-sign-txn-toast__content">\n <div id="pera-wallet-sign-txn-toast-lottie-animation" style="width:368;height:368" class="pera-wallet-sign-txn-toast__content__lottie-animation"></div>\n <p class="pera-wallet-sign-txn-toast__content__description">\n Please launch <b>Pera Wallet</b> on your iOS or Android device to sign this transaction.\n </p>\n </div>\n </div>\n';class Y extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");t.textContent=O,this.shadowRoot.append(Z.content.cloneNode(!0),t);const e=this.shadowRoot.getElementById("pera-wallet-sign-txn-toast-close-button");null==e||e.addEventListener("click",(()=>{(0,i.r)(i.h)})),this.renderLottieAnimation()}}renderLottieAnimation(){var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.getElementById("pera-wallet-sign-txn-toast-lottie-animation");e&&a.loadAnimation({container:e,renderer:"svg",loop:!0,autoplay:!0,path:"https://s3.amazonaws.com/wc.perawallet.app/static/sign-toast-animation.json"})}}var H='@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");\n.pera-wallet-modal {\n --pera-wallet-modal-font-family: "Inter", sans-serif;\n --pera-wallet-modal-compact-width: 380px;\n --pera-wallet-modal-compact-height: 396px;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n position: fixed;\n top: 0;\n right: 0;\n left: 0;\n bottom: 0;\n z-index: 999999;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.7);\n}\n.pera-wallet-modal--select-account .pera-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-color: #ffffff;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body {\n top: 40px;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: unset;\n height: calc(100 * var(--pera-wallet-vh));\n padding: 20px;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.03);\n border-radius: 20px 20px 0px 0px;\n animation: 0.3s PeraWalletConnectMobileSlideIn ease-out;\n overflow-y: auto;\n transform: unset;\n}\n.pera-wallet-modal--mobile .pera-wallet-modal__body::before {\n background-image: unset;\n}\n.pera-wallet-modal--compact:not(.pera-wallet-modal--mobile) .pera-wallet-modal__body {\n width: var(--pera-wallet-modal-compact-width);\n height: var(--pera-wallet-modal-compact-height);\n padding: 0;\n}\n.pera-wallet-modal * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n font-family: var(--pera-wallet-modal-font-family);\n font-smooth: antialiased;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.pera-wallet-modal ul,\n.pera-wallet-modal ol,\n.pera-wallet-modal li {\n list-style-type: none;\n}\n\n.pera-wallet-button {\n display: flex;\n align-items: center;\n justify-content: center;\n width: auto;\n height: 48px;\n padding: 14px;\n border: none;\n border-radius: 12px;\n outline: none;\n cursor: pointer;\n font-family: var(--pera-wallet-modal-font-family);\n font-size: 14px;\n}\n\n.pera-wallet-modal__logo img {\n display: block;\n width: 32px;\n}\n\n.pera-wallet-modal__body {\n position: relative;\n top: 50%;\n left: 50%;\n width: 700px;\n max-width: calc(100vw - 80px);\n padding: 28px;\n background-color: #f3f3f7;\n box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.08);\n border-radius: 24px;\n animation: 0.3s PeraWalletConnectSlideIn ease-out;\n transform: translate(-50%, -50%);\n}\n.pera-wallet-modal__body::before {\n --background-line: #1e0972 0 1.2px, transparent 0 calc(100% - 1.2px), #1e0972;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: -1;\n content: "";\n background-image: linear-gradient(var(--background-line)), linear-gradient(90deg, var(--background-line));\n background-size: 116px 116px;\n mix-blend-mode: overlay;\n border-radius: 24px;\n opacity: 0.8;\n pointer-events: none;\n}\n\n@media (max-width: 767px) {\n .pera-wallet-modal--desktop .pera-wallet-modal__body {\n width: 100%;\n max-width: calc(100vw - 32px);\n padding: 24px;\n }\n}\n@keyframes PeraWalletConnectSlideIn {\n 0% {\n opacity: 0;\n transform: translate(-50%, calc(-50% + 24px));\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%);\n }\n}\n@keyframes PeraWalletConnectMobileSlideIn {\n 0% {\n top: 30%;\n opacity: 0;\n }\n 100% {\n top: 40px;\n opacity: 1;\n }\n}\n.pera-wallet-sign-txn-modal.pera-wallet-modal .pera-wallet-modal__body {\n width: 480px;\n height: 578px;\n background-color: #ffffff;\n background-image: unset;\n padding: 0;\n}\n.pera-wallet-sign-txn-modal.pera-wallet-modal .pera-wallet-modal__body .pera-wallet-sign-txn-modal__body__content {\n width: 100%;\n height: 100%;\n}\n.pera-wallet-sign-txn-modal.pera-wallet-modal .pera-wallet-modal__body #pera-wallet-iframe {\n width: 100%;\n height: 100%;\n border-radius: 16px;\n margin: 0 auto;\n border: none;\n}\n\n.pera-wallet-sign-txn-modal--compact.pera-wallet-modal .pera-wallet-modal__body {\n width: var(--pera-wallet-modal-compact-width);\n height: var(--pera-wallet-modal-compact-height);\n}';o(H);const j=document.createElement("template");j.innerHTML=`\n <div id="pera-wallet-sign-txn-modal" class="${i.f} pera-wallet-sign-txn-modal">\n <div class="pera-wallet-modal__body">\n <pera-wallet-modal-header modal-id="${i.j}"></pera-wallet-modal-header/>\n\n <div class="pera-wallet-sign-txn-modal__body__content" />\n </div>\n </div>\n`;class X extends HTMLElement{constructor(){if(super(),this.attachShadow({mode:"open"}),this.shadowRoot){const t=document.createElement("style");if(t.textContent=H,this.shadowRoot.append(j.content.cloneNode(!0),t),"true"===this.getAttribute("compact-mode")){const t=this.shadowRoot.getElementById("pera-wallet-sign-txn-modal");null==t||t.classList.add("pera-wallet-sign-txn-modal--compact")}}}}function U(){document.documentElement.style.setProperty("--pera-wallet-vh",.01*window.innerHeight+"px")}function K(t,e){window.customElements.get(t)||window.customElements.define(t,e)}window.addEventListener("DOMContentLoaded",(()=>{U()})),window.addEventListener("resize",(()=>{U()})),K("pera-wallet-connect-modal",M),K("pera-wallet-modal-desktop-mode",x),K("pera-wallet-modal-header",h),K("pera-wallet-modal-touch-screen-mode",k),K("pera-wallet-redirect-modal",T),K("pera-wallet-connect-modal-information-section",N),K("pera-wallet-connect-modal-pending-message-section",W),K("pera-wallet-sign-txn-toast",Y),K("pera-wallet-sign-txn-modal",X),K("pera-wallet-download-qr-code",m)},8333:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(1601),r=n.n(i),a=n(6314),o=n.n(a)()(r());o.push([t.id,'/* ==========================================\n ALGOXSUITE COMMON UI STYLES\n ========================================== */\n\n/* SDK Container */\n#algox-sdk-container {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 9999999;\n width: 360px;\n background-color: white;\n border: 1px solid #ccc;\n border-radius: 8px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transform-origin: center;\n}\n\n#algox-sdk-container.dark-theme {\n background-color: #1a1a1a;\n border-color: #333;\n color: #fff;\n}\n\n#algox-sdk-container.minimizing {\n opacity: 0;\n visibility: hidden;\n transform: translate(-50%, -50%) scale(0.95);\n}\n\n#algox-sdk-container.maximizing {\n opacity: 0;\n visibility: hidden;\n transform: translate(-50%, -50%) scale(0.95);\n}\n\n/* Loading Overlay */\n#algox-loading-overlay {\n position: absolute;\n top: 45px;\n left: 0;\n right: 0;\n bottom: 90px;\n background: rgba(255, 255, 255, 0.7);\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 15px;\n z-index: 10000000;\n opacity: 0;\n visibility: hidden;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n border-top: 1px solid rgba(0, 0, 0, 0.1);\n border-bottom: 1px solid rgba(0, 0, 0, 0.1);\n}\n\n.dark-theme #algox-loading-overlay {\n background: rgba(26, 26, 26, 0.7);\n border-top-color: rgba(255, 255, 255, 0.1);\n border-bottom-color: rgba(255, 255, 255, 0.1);\n}\n\n#algox-loading-overlay.visible {\n opacity: 1;\n visibility: visible;\n}\n\n#algox-loader {\n width: 40px;\n height: 40px;\n border: 3px solid #f3f3f3;\n border-top: 3px solid #3498db;\n border-radius: 50%;\n animation: algox-spin 1s linear infinite;\n}\n\n.dark-theme #algox-loader {\n border-color: #2d2d2d;\n border-top-color: #3498db;\n}\n\n@keyframes algox-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n#algox-processing-message {\n font-size: 0.9rem;\n color: #333;\n text-align: center;\n padding: 0 20px;\n line-height: 1.4;\n}\n\n.dark-theme #algox-processing-message {\n color: #fff;\n}\n\n/* Minimized Button */\n#algox-minimized-btn {\n position: fixed;\n bottom: 20px;\n width: 50px;\n height: 50px;\n border-radius: 50%;\n background-color: #ffffff;\n color: #111827;\n border: 1px solid #e5e7eb;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 20px;\n font-weight: 900;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n z-index: 9999998;\n transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n opacity: 0;\n transform: scale(0.8);\n}\n\n#algox-minimized-btn img {\n width: 35px;\n height: 35px;\n object-fit: contain;\n}\n\n#algox-minimized-btn span {\n font-size: 1.1rem;\n line-height: 1;\n}\n\n#algox-minimized-btn:hover {\n transform: scale(1.1);\n background-color: #f3f4f6;\n}\n\n#algox-minimized-btn.dark-theme {\n background-color: #2d2d2d;\n color: #fff;\n}\n\n#algox-minimized-btn.dark-theme:hover {\n background-color: #1a1a1a;\n}\n\n#algox-minimized-btn.left {\n left: 20px;\n}\n\n#algox-minimized-btn.right {\n right: 20px;\n}\n\n#algox-minimized-btn.showing {\n opacity: 1;\n transform: scale(1);\n}\n\n#algox-minimized-btn.hiding {\n opacity: 0;\n transform: scale(0.8);\n}\n\n#algox-minimized-btn::before {\n content: "";\n position: absolute;\n top: -3px;\n left: -3px;\n right: -3px;\n bottom: -3px;\n border-radius: 50%;\n border: 3px solid transparent;\n opacity: 0;\n transition: opacity 0.3s ease;\n z-index: 99999999;\n pointer-events: none;\n}\n\n#algox-minimized-btn.processing::before {\n opacity: 1;\n border-top-color: #3498db;\n border-right-color: #3498db;\n animation: algox-spin 1s linear infinite;\n z-index: 99999999;\n}\n\n.dark-theme #algox-minimized-btn.processing::before {\n border-top-color: #3498db;\n border-right-color: #3498db;\n}\n\n/* Header */\n#algox-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 14px;\n border-bottom: 1px solid #e5e7eb;\n background-color: #f8f9fa;\n}\n\n.dark-theme #algox-header {\n background-color: #2d2d2d;\n border-bottom-color: #444;\n}\n\n#algox-header .header-left {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n#algox-header .header-left img {\n width: 28px;\n height: 28px;\n object-fit: contain;\n}\n\n#algox-header .header-left h3 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: #111827;\n}\n\n.dark-theme #algox-header .header-left h3 {\n color: #f9fafb;\n}\n\n#algox-header .header-right {\n display: flex;\n gap: 4px;\n align-items: center;\n}\n\n#algox-header .header-right button {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: background-color 0.2s;\n font-size: 1.25rem;\n color: #111827;\n width: 30px;\n height: 30px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n#algox-header .header-right button:hover {\n background-color: rgba(0, 0, 0, 0.05);\n}\n\n.dark-theme #algox-header .header-right button {\n color: #f9fafb;\n}\n\n.dark-theme #algox-header .header-right button:hover {\n background-color: rgba(255, 255, 255, 0.08);\n}\n\n#algox-logout-btn {\n transform: rotate(180deg);\n transition: opacity 0.3s ease;\n}\n\n#algox-logout-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Wallet Selection Screen */\n#algox-wallet-choice {\n padding: 16px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.algox-wallet-btn {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n padding: 12px 14px;\n background: #ffffff;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n cursor: pointer;\n transition: all 0.2s;\n font-weight: 600;\n color: #333;\n}\n\n.algox-wallet-btn:hover {\n background-color: #f9fafb;\n border-color: #3498db;\n transform: translateY(-2px);\n}\n\n.algox-wallet-btn img {\n width: 24px;\n height: 24px;\n object-fit: contain;\n}\n\n.dark-theme .algox-wallet-btn {\n background-color: #111827;\n border-color: #374151;\n color: #f9fafb;\n}\n\n.dark-theme .algox-wallet-btn:hover {\n background-color: #1f2937;\n border-color: #60a5fa;\n}\n\n/* Wallet Address Bar */\n#algox-wallet-address {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n user-select: text;\n cursor: pointer;\n display: none;\n color: #111827;\n padding: 12px 15px;\n font-size: 0.85rem;\n font-family: monospace;\n background-color: #f8f9fa;\n border-top: 1px solid #ddd;\n letter-spacing: 0.5px;\n}\n\n.dark-theme #algox-wallet-address {\n color: #f9fafb;\n background-color: #2d2d2d;\n border-top-color: #444;\n}\n\n/* Footer */\n#algox-footer {\n padding: 8px 15px;\n font-size: 0.85rem;\n text-align: center;\n color: #666;\n background-color: #f8f9fa;\n border-top: 1px solid #ddd;\n user-select: none;\n}\n\n.dark-theme #algox-footer {\n color: #999;\n background-color: #2d2d2d;\n border-top-color: #444;\n}\n\n#algox-footer a {\n color: #3498db;\n text-decoration: none;\n transition: color 0.2s ease;\n}\n\n#algox-footer a:hover {\n color: #2980b9;\n text-decoration: underline;\n}\n\n.dark-theme #algox-footer a {\n color: #5dade2;\n}\n\n.dark-theme #algox-footer a:hover {\n color: #3498db;\n}\n\n/* Toast Notifications */\n#algox-toast {\n position: fixed;\n z-index: 10000002;\n opacity: 0;\n transition: opacity 0.2s ease;\n min-width: 280px;\n max-width: 420px;\n background: #ffffff;\n color: #111827;\n border: 1px solid #e5e7eb;\n border-radius: 8px;\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);\n padding: 10px 12px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n#algox-toast.top-left {\n top: 20px;\n left: 20px;\n}\n\n#algox-toast.top-right {\n top: 20px;\n right: 20px;\n}\n\n.dark-theme #algox-toast {\n background: #1f2937;\n color: #f9fafb;\n border-color: #374151;\n}\n\n#algox-toast .toast-content {\n flex: 1;\n word-wrap: break-word;\n overflow-wrap: break-word;\n white-space: normal;\n}\n\n#algox-toast .toast-close {\n background: none;\n border: none;\n color: inherit;\n opacity: 0.7;\n cursor: pointer;\n padding: 0;\n font-size: 16px;\n line-height: 1;\n transition: opacity 0.2s ease;\n width: 16px;\n height: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n#algox-toast .toast-close:hover {\n opacity: 1;\n}\n\n#algox-toast.success {\n border-left: 4px solid #10b981;\n}\n\n#algox-toast.error {\n border-left: 4px solid #ef4444;\n}\n\n#algox-toast.warning {\n border-left: 4px solid #f59e0b;\n}\n\n#algox-toast.info {\n border-left: 4px solid #3498db;\n}\n\n/* Temporary Wallet Connection UI (Headless Mode) */\n#algox-temp-wallet-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.8);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 999999;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n}\n\n#algox-temp-wallet-overlay .temp-wallet-container {\n background: white;\n padding: 2rem;\n border-radius: 12px;\n text-align: center;\n max-width: 400px;\n width: 90%;\n box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);\n margin: 1rem;\n}\n\n#algox-temp-wallet-overlay .temp-wallet-title {\n margin: 0 0 1rem 0;\n color: #1f2937;\n font-size: 1.5rem;\n font-weight: 600;\n}\n\n#algox-temp-wallet-overlay .temp-wallet-message {\n margin: 0 0 1.5rem 0;\n color: #6b7280;\n font-size: 1rem;\n line-height: 1.5;\n}\n\n#algox-temp-wallet-overlay .temp-wallet-spinner {\n width: 40px;\n height: 40px;\n border: 4px solid #e5e7eb;\n border-top: 4px solid #3b82f6;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n margin: 0 auto 1rem auto;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n#algox-temp-wallet-overlay .temp-wallet-cancel-btn {\n background: #ef4444;\n color: white;\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 8px;\n font-size: 1rem;\n font-weight: 500;\n cursor: pointer;\n transition: background-color 0.2s;\n}\n\n#algox-temp-wallet-overlay .temp-wallet-cancel-btn:hover {\n background: #dc2626;\n}\n\n/* ==========================================\n COMMON TAB UI SYSTEM (ALGOXSUITE STANDARD)\n ========================================== */\n\n/* Tab Container */\n.algox-tabs-container {\n display: flex;\n align-items: center;\n gap: 8px;\n border-bottom: 2px solid #e5e7eb;\n padding: 0 16px;\n margin-top: 12px;\n position: relative;\n}\n\n.dark-theme .algox-tabs-container {\n border-bottom-color: #444;\n}\n\n/* Tab Navigation Buttons */\n.algox-tab-nav-btn {\n background: transparent;\n border: none;\n cursor: pointer;\n padding: 8px;\n border-radius: 4px;\n transition: background-color 0.2s;\n color: #6b7280;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 1.1rem;\n flex-shrink: 0;\n}\n\n.algox-tab-nav-btn:hover:not(:disabled) {\n background-color: rgba(0, 0, 0, 0.05);\n color: #111827;\n}\n\n.algox-tab-nav-btn:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.dark-theme .algox-tab-nav-btn {\n color: #9ca3af;\n}\n\n.dark-theme .algox-tab-nav-btn:hover:not(:disabled) {\n background-color: rgba(255, 255, 255, 0.08);\n color: #f9fafb;\n}\n\n/* Tabs Wrapper */\n.algox-tabs-wrapper {\n flex: 1;\n overflow: hidden;\n position: relative;\n}\n\n/* Tabs Track */\n.algox-tabs-track {\n display: flex;\n gap: 6px;\n transition: transform 0.3s ease;\n}\n\n/* Tab Buttons */\n.algox-tab-btn {\n flex: 0 0 calc(50% - 3px);\n min-width: calc(50% - 3px);\n padding: 10px;\n border: none;\n background: none;\n cursor: pointer;\n color: #6b7280;\n border-bottom: 2px solid transparent;\n font-size: 13px;\n font-weight: 500;\n transition: all 0.2s;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.algox-tab-btn:hover {\n color: #111827;\n background-color: rgba(0, 0, 0, 0.03);\n}\n\n.dark-theme .algox-tab-btn {\n color: #9ca3af;\n}\n\n.dark-theme .algox-tab-btn:hover {\n color: #f9fafb;\n background: rgba(255, 255, 255, 0.05);\n}\n\n.algox-tab-btn.active {\n color: #3498db;\n border-bottom-color: #3498db;\n}\n\n.dark-theme .algox-tab-btn.active {\n color: #60a5fa;\n border-bottom-color: #60a5fa;\n}\n\n/* Tab Content */\n.algox-tab-content {\n padding: 16px;\n overflow-y: auto;\n flex-grow: 1;\n}\n\n.algox-tab-pane {\n display: none;\n}\n\n.algox-tab-pane.active {\n display: block;\n}\n',""]);const s=o},8947:(t,e,n)=>{!function(t){"use strict";var e=function(t){var e,n=new Float64Array(16);if(t)for(e=0;e<t.length;e++)n[e]=t[e];return n},i=function(){throw new Error("no PRNG")},r=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var o=e(),s=e([1]),l=e([56129,1]),c=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),d=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),u=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function m(t,e,n,i){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=i>>24&255,t[e+5]=i>>16&255,t[e+6]=i>>8&255,t[e+7]=255&i}function g(t,e,n,i,r){var a,o=0;for(a=0;a<r;a++)o|=t[e+a]^n[i+a];return(1&o-1>>>8)-1}function f(t,e,n,i){return g(t,e,n,i,16)}function y(t,e,n,i){return g(t,e,n,i,32)}function v(t,e,n,i){!function(t,e,n,i){for(var r,a=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,d=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,m=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,f=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,x=a,S=o,A=s,C=l,k=c,I=h,E=d,_=u,M=p,D=m,P=g,T=f,L=y,B=v,F=w,R=b,N=0;N<20;N+=2)x^=(r=(L^=(r=(M^=(r=(k^=(r=x+L|0)<<7|r>>>25)+x|0)<<9|r>>>23)+k|0)<<13|r>>>19)+M|0)<<18|r>>>14,I^=(r=(S^=(r=(B^=(r=(D^=(r=I+S|0)<<7|r>>>25)+I|0)<<9|r>>>23)+D|0)<<13|r>>>19)+B|0)<<18|r>>>14,P^=(r=(E^=(r=(A^=(r=(F^=(r=P+E|0)<<7|r>>>25)+P|0)<<9|r>>>23)+F|0)<<13|r>>>19)+A|0)<<18|r>>>14,R^=(r=(T^=(r=(_^=(r=(C^=(r=R+T|0)<<7|r>>>25)+R|0)<<9|r>>>23)+C|0)<<13|r>>>19)+_|0)<<18|r>>>14,x^=(r=(C^=(r=(A^=(r=(S^=(r=x+C|0)<<7|r>>>25)+x|0)<<9|r>>>23)+S|0)<<13|r>>>19)+A|0)<<18|r>>>14,I^=(r=(k^=(r=(_^=(r=(E^=(r=I+k|0)<<7|r>>>25)+I|0)<<9|r>>>23)+E|0)<<13|r>>>19)+_|0)<<18|r>>>14,P^=(r=(D^=(r=(M^=(r=(T^=(r=P+D|0)<<7|r>>>25)+P|0)<<9|r>>>23)+T|0)<<13|r>>>19)+M|0)<<18|r>>>14,R^=(r=(F^=(r=(B^=(r=(L^=(r=R+F|0)<<7|r>>>25)+R|0)<<9|r>>>23)+L|0)<<13|r>>>19)+B|0)<<18|r>>>14;x=x+a|0,S=S+o|0,A=A+s|0,C=C+l|0,k=k+c|0,I=I+h|0,E=E+d|0,_=_+u|0,M=M+p|0,D=D+m|0,P=P+g|0,T=T+f|0,L=L+y|0,B=B+v|0,F=F+w|0,R=R+b|0,t[0]=x>>>0&255,t[1]=x>>>8&255,t[2]=x>>>16&255,t[3]=x>>>24&255,t[4]=S>>>0&255,t[5]=S>>>8&255,t[6]=S>>>16&255,t[7]=S>>>24&255,t[8]=A>>>0&255,t[9]=A>>>8&255,t[10]=A>>>16&255,t[11]=A>>>24&255,t[12]=C>>>0&255,t[13]=C>>>8&255,t[14]=C>>>16&255,t[15]=C>>>24&255,t[16]=k>>>0&255,t[17]=k>>>8&255,t[18]=k>>>16&255,t[19]=k>>>24&255,t[20]=I>>>0&255,t[21]=I>>>8&255,t[22]=I>>>16&255,t[23]=I>>>24&255,t[24]=E>>>0&255,t[25]=E>>>8&255,t[26]=E>>>16&255,t[27]=E>>>24&255,t[28]=_>>>0&255,t[29]=_>>>8&255,t[30]=_>>>16&255,t[31]=_>>>24&255,t[32]=M>>>0&255,t[33]=M>>>8&255,t[34]=M>>>16&255,t[35]=M>>>24&255,t[36]=D>>>0&255,t[37]=D>>>8&255,t[38]=D>>>16&255,t[39]=D>>>24&255,t[40]=P>>>0&255,t[41]=P>>>8&255,t[42]=P>>>16&255,t[43]=P>>>24&255,t[44]=T>>>0&255,t[45]=T>>>8&255,t[46]=T>>>16&255,t[47]=T>>>24&255,t[48]=L>>>0&255,t[49]=L>>>8&255,t[50]=L>>>16&255,t[51]=L>>>24&255,t[52]=B>>>0&255,t[53]=B>>>8&255,t[54]=B>>>16&255,t[55]=B>>>24&255,t[56]=F>>>0&255,t[57]=F>>>8&255,t[58]=F>>>16&255,t[59]=F>>>24&255,t[60]=R>>>0&255,t[61]=R>>>8&255,t[62]=R>>>16&255,t[63]=R>>>24&255}(t,e,n,i)}function w(t,e,n,i){!function(t,e,n,i){for(var r,a=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,d=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,m=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,f=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,x=0;x<20;x+=2)a^=(r=(y^=(r=(p^=(r=(c^=(r=a+y|0)<<7|r>>>25)+a|0)<<9|r>>>23)+c|0)<<13|r>>>19)+p|0)<<18|r>>>14,h^=(r=(o^=(r=(v^=(r=(m^=(r=h+o|0)<<7|r>>>25)+h|0)<<9|r>>>23)+m|0)<<13|r>>>19)+v|0)<<18|r>>>14,g^=(r=(d^=(r=(s^=(r=(w^=(r=g+d|0)<<7|r>>>25)+g|0)<<9|r>>>23)+w|0)<<13|r>>>19)+s|0)<<18|r>>>14,b^=(r=(f^=(r=(u^=(r=(l^=(r=b+f|0)<<7|r>>>25)+b|0)<<9|r>>>23)+l|0)<<13|r>>>19)+u|0)<<18|r>>>14,a^=(r=(l^=(r=(s^=(r=(o^=(r=a+l|0)<<7|r>>>25)+a|0)<<9|r>>>23)+o|0)<<13|r>>>19)+s|0)<<18|r>>>14,h^=(r=(c^=(r=(u^=(r=(d^=(r=h+c|0)<<7|r>>>25)+h|0)<<9|r>>>23)+d|0)<<13|r>>>19)+u|0)<<18|r>>>14,g^=(r=(m^=(r=(p^=(r=(f^=(r=g+m|0)<<7|r>>>25)+g|0)<<9|r>>>23)+f|0)<<13|r>>>19)+p|0)<<18|r>>>14,b^=(r=(w^=(r=(v^=(r=(y^=(r=b+w|0)<<7|r>>>25)+b|0)<<9|r>>>23)+y|0)<<13|r>>>19)+v|0)<<18|r>>>14;t[0]=a>>>0&255,t[1]=a>>>8&255,t[2]=a>>>16&255,t[3]=a>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=b>>>0&255,t[13]=b>>>8&255,t[14]=b>>>16&255,t[15]=b>>>24&255,t[16]=d>>>0&255,t[17]=d>>>8&255,t[18]=d>>>16&255,t[19]=d>>>24&255,t[20]=u>>>0&255,t[21]=u>>>8&255,t[22]=u>>>16&255,t[23]=u>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=m>>>0&255,t[29]=m>>>8&255,t[30]=m>>>16&255,t[31]=m>>>24&255}(t,e,n,i)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function x(t,e,n,i,r,a,o){var s,l,c=new Uint8Array(16),h=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=a[l];for(;r>=64;){for(v(h,c,o,b),l=0;l<64;l++)t[e+l]=n[i+l]^h[l];for(s=1,l=8;l<16;l++)s=s+(255&c[l])|0,c[l]=255&s,s>>>=8;r-=64,e+=64,i+=64}if(r>0)for(v(h,c,o,b),l=0;l<r;l++)t[e+l]=n[i+l]^h[l];return 0}function S(t,e,n,i,r){var a,o,s=new Uint8Array(16),l=new Uint8Array(64);for(o=0;o<16;o++)s[o]=0;for(o=0;o<8;o++)s[o]=i[o];for(;n>=64;){for(v(l,s,r,b),o=0;o<64;o++)t[e+o]=l[o];for(a=1,o=8;o<16;o++)a=a+(255&s[o])|0,s[o]=255&a,a>>>=8;n-=64,e+=64}if(n>0)for(v(l,s,r,b),o=0;o<n;o++)t[e+o]=l[o];return 0}function A(t,e,n,i,r){var a=new Uint8Array(32);w(a,i,r,b);for(var o=new Uint8Array(8),s=0;s<8;s++)o[s]=i[s+16];return S(t,e,n,o,a)}function C(t,e,n,i,r,a,o){var s=new Uint8Array(32);w(s,a,o,b);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=a[c+16];return x(t,e,n,i,r,l,s)}var k=function(t){var e,n,i,r,a,o,s,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,n=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|n<<3),i=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|i<<6),r=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(i>>>7|r<<9),a=255&t[8]|(255&t[9])<<8,this.r[4]=255&(r>>>4|a<<12),this.r[5]=a>>>1&8190,o=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(a>>>14|o<<2),s=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(o>>>11|s<<5),l=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(s>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function I(t,e,n,i,r,a){var o=new k(a);return o.update(n,i,r),o.finish(t,e),0}function E(t,e,n,i,r,a){var o=new Uint8Array(16);return I(o,0,n,i,r,a),f(t,e,o,0)}function _(t,e,n,i,r){var a;if(n<32)return-1;for(C(t,0,e,0,n,i,r),I(t,16,t,32,n-32,t),a=0;a<16;a++)t[a]=0;return 0}function M(t,e,n,i,r){var a,o=new Uint8Array(32);if(n<32)return-1;if(A(o,0,32,i,r),0!==E(e,16,e,32,n-32,o))return-1;for(C(t,0,e,0,n,i,r),a=0;a<32;a++)t[a]=0;return 0}function D(t,e){var n;for(n=0;n<16;n++)t[n]=0|e[n]}function P(t){var e,n,i=1;for(e=0;e<16;e++)n=t[e]+i+65535,i=Math.floor(n/65536),t[e]=n-65536*i;t[0]+=i-1+37*(i-1)}function T(t,e,n){for(var i,r=~(n-1),a=0;a<16;a++)i=r&(t[a]^e[a]),t[a]^=i,e[a]^=i}function L(t,n){var i,r,a,o=e(),s=e();for(i=0;i<16;i++)s[i]=n[i];for(P(s),P(s),P(s),r=0;r<2;r++){for(o[0]=s[0]-65517,i=1;i<15;i++)o[i]=s[i]-65535-(o[i-1]>>16&1),o[i-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),a=o[15]>>16&1,o[14]&=65535,T(s,o,1-a)}for(i=0;i<16;i++)t[2*i]=255&s[i],t[2*i+1]=s[i]>>8}function B(t,e){var n=new Uint8Array(32),i=new Uint8Array(32);return L(n,t),L(i,e),y(n,0,i,0)}function F(t){var e=new Uint8Array(32);return L(e,t),1&e[0]}function R(t,e){var n;for(n=0;n<16;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function N(t,e,n){for(var i=0;i<16;i++)t[i]=e[i]+n[i]}function V(t,e,n){for(var i=0;i<16;i++)t[i]=e[i]-n[i]}function z(t,e,n){var i,r,a=0,o=0,s=0,l=0,c=0,h=0,d=0,u=0,p=0,m=0,g=0,f=0,y=0,v=0,w=0,b=0,x=0,S=0,A=0,C=0,k=0,I=0,E=0,_=0,M=0,D=0,P=0,T=0,L=0,B=0,F=0,R=n[0],N=n[1],V=n[2],z=n[3],G=n[4],W=n[5],O=n[6],Z=n[7],Y=n[8],H=n[9],j=n[10],X=n[11],U=n[12],K=n[13],J=n[14],q=n[15];a+=(i=e[0])*R,o+=i*N,s+=i*V,l+=i*z,c+=i*G,h+=i*W,d+=i*O,u+=i*Z,p+=i*Y,m+=i*H,g+=i*j,f+=i*X,y+=i*U,v+=i*K,w+=i*J,b+=i*q,o+=(i=e[1])*R,s+=i*N,l+=i*V,c+=i*z,h+=i*G,d+=i*W,u+=i*O,p+=i*Z,m+=i*Y,g+=i*H,f+=i*j,y+=i*X,v+=i*U,w+=i*K,b+=i*J,x+=i*q,s+=(i=e[2])*R,l+=i*N,c+=i*V,h+=i*z,d+=i*G,u+=i*W,p+=i*O,m+=i*Z,g+=i*Y,f+=i*H,y+=i*j,v+=i*X,w+=i*U,b+=i*K,x+=i*J,S+=i*q,l+=(i=e[3])*R,c+=i*N,h+=i*V,d+=i*z,u+=i*G,p+=i*W,m+=i*O,g+=i*Z,f+=i*Y,y+=i*H,v+=i*j,w+=i*X,b+=i*U,x+=i*K,S+=i*J,A+=i*q,c+=(i=e[4])*R,h+=i*N,d+=i*V,u+=i*z,p+=i*G,m+=i*W,g+=i*O,f+=i*Z,y+=i*Y,v+=i*H,w+=i*j,b+=i*X,x+=i*U,S+=i*K,A+=i*J,C+=i*q,h+=(i=e[5])*R,d+=i*N,u+=i*V,p+=i*z,m+=i*G,g+=i*W,f+=i*O,y+=i*Z,v+=i*Y,w+=i*H,b+=i*j,x+=i*X,S+=i*U,A+=i*K,C+=i*J,k+=i*q,d+=(i=e[6])*R,u+=i*N,p+=i*V,m+=i*z,g+=i*G,f+=i*W,y+=i*O,v+=i*Z,w+=i*Y,b+=i*H,x+=i*j,S+=i*X,A+=i*U,C+=i*K,k+=i*J,I+=i*q,u+=(i=e[7])*R,p+=i*N,m+=i*V,g+=i*z,f+=i*G,y+=i*W,v+=i*O,w+=i*Z,b+=i*Y,x+=i*H,S+=i*j,A+=i*X,C+=i*U,k+=i*K,I+=i*J,E+=i*q,p+=(i=e[8])*R,m+=i*N,g+=i*V,f+=i*z,y+=i*G,v+=i*W,w+=i*O,b+=i*Z,x+=i*Y,S+=i*H,A+=i*j,C+=i*X,k+=i*U,I+=i*K,E+=i*J,_+=i*q,m+=(i=e[9])*R,g+=i*N,f+=i*V,y+=i*z,v+=i*G,w+=i*W,b+=i*O,x+=i*Z,S+=i*Y,A+=i*H,C+=i*j,k+=i*X,I+=i*U,E+=i*K,_+=i*J,M+=i*q,g+=(i=e[10])*R,f+=i*N,y+=i*V,v+=i*z,w+=i*G,b+=i*W,x+=i*O,S+=i*Z,A+=i*Y,C+=i*H,k+=i*j,I+=i*X,E+=i*U,_+=i*K,M+=i*J,D+=i*q,f+=(i=e[11])*R,y+=i*N,v+=i*V,w+=i*z,b+=i*G,x+=i*W,S+=i*O,A+=i*Z,C+=i*Y,k+=i*H,I+=i*j,E+=i*X,_+=i*U,M+=i*K,D+=i*J,P+=i*q,y+=(i=e[12])*R,v+=i*N,w+=i*V,b+=i*z,x+=i*G,S+=i*W,A+=i*O,C+=i*Z,k+=i*Y,I+=i*H,E+=i*j,_+=i*X,M+=i*U,D+=i*K,P+=i*J,T+=i*q,v+=(i=e[13])*R,w+=i*N,b+=i*V,x+=i*z,S+=i*G,A+=i*W,C+=i*O,k+=i*Z,I+=i*Y,E+=i*H,_+=i*j,M+=i*X,D+=i*U,P+=i*K,T+=i*J,L+=i*q,w+=(i=e[14])*R,b+=i*N,x+=i*V,S+=i*z,A+=i*G,C+=i*W,k+=i*O,I+=i*Z,E+=i*Y,_+=i*H,M+=i*j,D+=i*X,P+=i*U,T+=i*K,L+=i*J,B+=i*q,b+=(i=e[15])*R,o+=38*(S+=i*V),s+=38*(A+=i*z),l+=38*(C+=i*G),c+=38*(k+=i*W),h+=38*(I+=i*O),d+=38*(E+=i*Z),u+=38*(_+=i*Y),p+=38*(M+=i*H),m+=38*(D+=i*j),g+=38*(P+=i*X),f+=38*(T+=i*U),y+=38*(L+=i*K),v+=38*(B+=i*J),w+=38*(F+=i*q),a=(i=(a+=38*(x+=i*N))+(r=1)+65535)-65536*(r=Math.floor(i/65536)),o=(i=o+r+65535)-65536*(r=Math.floor(i/65536)),s=(i=s+r+65535)-65536*(r=Math.floor(i/65536)),l=(i=l+r+65535)-65536*(r=Math.floor(i/65536)),c=(i=c+r+65535)-65536*(r=Math.floor(i/65536)),h=(i=h+r+65535)-65536*(r=Math.floor(i/65536)),d=(i=d+r+65535)-65536*(r=Math.floor(i/65536)),u=(i=u+r+65535)-65536*(r=Math.floor(i/65536)),p=(i=p+r+65535)-65536*(r=Math.floor(i/65536)),m=(i=m+r+65535)-65536*(r=Math.floor(i/65536)),g=(i=g+r+65535)-65536*(r=Math.floor(i/65536)),f=(i=f+r+65535)-65536*(r=Math.floor(i/65536)),y=(i=y+r+65535)-65536*(r=Math.floor(i/65536)),v=(i=v+r+65535)-65536*(r=Math.floor(i/65536)),w=(i=w+r+65535)-65536*(r=Math.floor(i/65536)),b=(i=b+r+65535)-65536*(r=Math.floor(i/65536)),a=(i=(a+=r-1+37*(r-1))+(r=1)+65535)-65536*(r=Math.floor(i/65536)),o=(i=o+r+65535)-65536*(r=Math.floor(i/65536)),s=(i=s+r+65535)-65536*(r=Math.floor(i/65536)),l=(i=l+r+65535)-65536*(r=Math.floor(i/65536)),c=(i=c+r+65535)-65536*(r=Math.floor(i/65536)),h=(i=h+r+65535)-65536*(r=Math.floor(i/65536)),d=(i=d+r+65535)-65536*(r=Math.floor(i/65536)),u=(i=u+r+65535)-65536*(r=Math.floor(i/65536)),p=(i=p+r+65535)-65536*(r=Math.floor(i/65536)),m=(i=m+r+65535)-65536*(r=Math.floor(i/65536)),g=(i=g+r+65535)-65536*(r=Math.floor(i/65536)),f=(i=f+r+65535)-65536*(r=Math.floor(i/65536)),y=(i=y+r+65535)-65536*(r=Math.floor(i/65536)),v=(i=v+r+65535)-65536*(r=Math.floor(i/65536)),w=(i=w+r+65535)-65536*(r=Math.floor(i/65536)),b=(i=b+r+65535)-65536*(r=Math.floor(i/65536)),a+=r-1+37*(r-1),t[0]=a,t[1]=o,t[2]=s,t[3]=l,t[4]=c,t[5]=h,t[6]=d,t[7]=u,t[8]=p,t[9]=m,t[10]=g,t[11]=f,t[12]=y,t[13]=v,t[14]=w,t[15]=b}function G(t,e){z(t,e,e)}function W(t,n){var i,r=e();for(i=0;i<16;i++)r[i]=n[i];for(i=253;i>=0;i--)G(r,r),2!==i&&4!==i&&z(r,r,n);for(i=0;i<16;i++)t[i]=r[i]}function O(t,n){var i,r=e();for(i=0;i<16;i++)r[i]=n[i];for(i=250;i>=0;i--)G(r,r),1!==i&&z(r,r,n);for(i=0;i<16;i++)t[i]=r[i]}function Z(t,n,i){var r,a,o=new Uint8Array(32),s=new Float64Array(80),c=e(),h=e(),d=e(),u=e(),p=e(),m=e();for(a=0;a<31;a++)o[a]=n[a];for(o[31]=127&n[31]|64,o[0]&=248,R(s,i),a=0;a<16;a++)h[a]=s[a],u[a]=c[a]=d[a]=0;for(c[0]=u[0]=1,a=254;a>=0;--a)T(c,h,r=o[a>>>3]>>>(7&a)&1),T(d,u,r),N(p,c,d),V(c,c,d),N(d,h,u),V(h,h,u),G(u,p),G(m,c),z(c,d,c),z(d,h,p),N(p,c,d),V(c,c,d),G(h,c),V(d,u,m),z(c,d,l),N(c,c,u),z(d,d,c),z(c,u,m),z(u,h,s),G(h,p),T(c,h,r),T(d,u,r);for(a=0;a<16;a++)s[a+16]=c[a],s[a+32]=d[a],s[a+48]=h[a],s[a+64]=u[a];var g=s.subarray(32),f=s.subarray(16);return W(g,g),z(f,f,g),L(t,f),0}function Y(t,e){return Z(t,e,a)}function H(t,e){return i(e,32),Y(t,e)}function j(t,e,n){var i=new Uint8Array(32);return Z(i,n,e),w(t,r,i,b)}k.prototype.blocks=function(t,e,n){for(var i,r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b,x,S=this.fin?0:2048,A=this.h[0],C=this.h[1],k=this.h[2],I=this.h[3],E=this.h[4],_=this.h[5],M=this.h[6],D=this.h[7],P=this.h[8],T=this.h[9],L=this.r[0],B=this.r[1],F=this.r[2],R=this.r[3],N=this.r[4],V=this.r[5],z=this.r[6],G=this.r[7],W=this.r[8],O=this.r[9];n>=16;)u=d=0,u+=(A+=8191&(i=255&t[e+0]|(255&t[e+1])<<8))*L,u+=(C+=8191&(i>>>13|(r=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*O),u+=(k+=8191&(r>>>10|(a=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*W),u+=(I+=8191&(a>>>7|(o=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*G),d=(u+=(E+=8191&(o>>>4|(s=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*z))>>>13,u&=8191,u+=(_+=s>>>1&8191)*(5*V),u+=(M+=8191&(s>>>14|(l=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*N),u+=(D+=8191&(l>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*R),u+=(P+=8191&(c>>>8|(h=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*F),p=d+=(u+=(T+=h>>>5|S)*(5*B))>>>13,p+=A*B,p+=C*L,p+=k*(5*O),p+=I*(5*W),d=(p+=E*(5*G))>>>13,p&=8191,p+=_*(5*z),p+=M*(5*V),p+=D*(5*N),p+=P*(5*R),d+=(p+=T*(5*F))>>>13,p&=8191,m=d,m+=A*F,m+=C*B,m+=k*L,m+=I*(5*O),d=(m+=E*(5*W))>>>13,m&=8191,m+=_*(5*G),m+=M*(5*z),m+=D*(5*V),m+=P*(5*N),g=d+=(m+=T*(5*R))>>>13,g+=A*R,g+=C*F,g+=k*B,g+=I*L,d=(g+=E*(5*O))>>>13,g&=8191,g+=_*(5*W),g+=M*(5*G),g+=D*(5*z),g+=P*(5*V),f=d+=(g+=T*(5*N))>>>13,f+=A*N,f+=C*R,f+=k*F,f+=I*B,d=(f+=E*L)>>>13,f&=8191,f+=_*(5*O),f+=M*(5*W),f+=D*(5*G),f+=P*(5*z),y=d+=(f+=T*(5*V))>>>13,y+=A*V,y+=C*N,y+=k*R,y+=I*F,d=(y+=E*B)>>>13,y&=8191,y+=_*L,y+=M*(5*O),y+=D*(5*W),y+=P*(5*G),v=d+=(y+=T*(5*z))>>>13,v+=A*z,v+=C*V,v+=k*N,v+=I*R,d=(v+=E*F)>>>13,v&=8191,v+=_*B,v+=M*L,v+=D*(5*O),v+=P*(5*W),w=d+=(v+=T*(5*G))>>>13,w+=A*G,w+=C*z,w+=k*V,w+=I*N,d=(w+=E*R)>>>13,w&=8191,w+=_*F,w+=M*B,w+=D*L,w+=P*(5*O),b=d+=(w+=T*(5*W))>>>13,b+=A*W,b+=C*G,b+=k*z,b+=I*V,d=(b+=E*N)>>>13,b&=8191,b+=_*R,b+=M*F,b+=D*B,b+=P*L,x=d+=(b+=T*(5*O))>>>13,x+=A*O,x+=C*W,x+=k*G,x+=I*z,d=(x+=E*V)>>>13,x&=8191,x+=_*N,x+=M*R,x+=D*F,x+=P*B,A=u=8191&(d=(d=((d+=(x+=T*L)>>>13)<<2)+d|0)+(u&=8191)|0),C=p+=d>>>=13,k=m&=8191,I=g&=8191,E=f&=8191,_=y&=8191,M=v&=8191,D=w&=8191,P=b&=8191,T=x&=8191,e+=16,n-=16;this.h[0]=A,this.h[1]=C,this.h[2]=k,this.h[3]=I,this.h[4]=E,this.h[5]=_,this.h[6]=M,this.h[7]=D,this.h[8]=P,this.h[9]=T},k.prototype.finish=function(t,e){var n,i,r,a,o=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,o[0]=this.h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this.h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,i=(1^n)-1,a=0;a<10;a++)o[a]&=i;for(i=~i,a=0;a<10;a++)this.h[a]=this.h[a]&i|o[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),r=this.h[0]+this.pad[0],this.h[0]=65535&r,a=1;a<8;a++)r=(this.h[a]+this.pad[a]|0)+(r>>>16)|0,this.h[a]=65535&r;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},k.prototype.update=function(t,e,n){var i,r;if(this.leftover){for((r=16-this.leftover)>n&&(r=n),i=0;i<r;i++)this.buffer[this.leftover+i]=t[e+i];if(n-=r,e+=r,this.leftover+=r,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(r=n-n%16,this.blocks(t,e,r),e+=r,n-=r),n){for(i=0;i<n;i++)this.buffer[this.leftover+i]=t[e+i];this.leftover+=n}};var X=_,U=M,K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(t,e,n,i){for(var r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b,x,S,A,C,k,I,E,_,M,D=new Int32Array(16),P=new Int32Array(16),T=t[0],L=t[1],B=t[2],F=t[3],R=t[4],N=t[5],V=t[6],z=t[7],G=e[0],W=e[1],O=e[2],Z=e[3],Y=e[4],H=e[5],j=e[6],X=e[7],U=0;i>=128;){for(S=0;S<16;S++)A=8*S+U,D[S]=n[A+0]<<24|n[A+1]<<16|n[A+2]<<8|n[A+3],P[S]=n[A+4]<<24|n[A+5]<<16|n[A+6]<<8|n[A+7];for(S=0;S<80;S++)if(r=T,a=L,o=B,s=F,l=R,c=N,h=V,u=G,p=W,m=O,g=Z,f=Y,y=H,v=j,I=65535&(k=X),E=k>>>16,_=65535&(C=z),M=C>>>16,I+=65535&(k=(Y>>>14|R<<18)^(Y>>>18|R<<14)^(R>>>9|Y<<23)),E+=k>>>16,_+=65535&(C=(R>>>14|Y<<18)^(R>>>18|Y<<14)^(Y>>>9|R<<23)),M+=C>>>16,I+=65535&(k=Y&H^~Y&j),E+=k>>>16,_+=65535&(C=R&N^~R&V),M+=C>>>16,I+=65535&(k=K[2*S+1]),E+=k>>>16,_+=65535&(C=K[2*S]),M+=C>>>16,C=D[S%16],E+=(k=P[S%16])>>>16,_+=65535&C,M+=C>>>16,_+=(E+=(I+=65535&k)>>>16)>>>16,I=65535&(k=x=65535&I|E<<16),E=k>>>16,_=65535&(C=b=65535&_|(M+=_>>>16)<<16),M=C>>>16,I+=65535&(k=(G>>>28|T<<4)^(T>>>2|G<<30)^(T>>>7|G<<25)),E+=k>>>16,_+=65535&(C=(T>>>28|G<<4)^(G>>>2|T<<30)^(G>>>7|T<<25)),M+=C>>>16,E+=(k=G&W^G&O^W&O)>>>16,_+=65535&(C=T&L^T&B^L&B),M+=C>>>16,d=65535&(_+=(E+=(I+=65535&k)>>>16)>>>16)|(M+=_>>>16)<<16,w=65535&I|E<<16,I=65535&(k=g),E=k>>>16,_=65535&(C=s),M=C>>>16,E+=(k=x)>>>16,_+=65535&(C=b),M+=C>>>16,L=r,B=a,F=o,R=s=65535&(_+=(E+=(I+=65535&k)>>>16)>>>16)|(M+=_>>>16)<<16,N=l,V=c,z=h,T=d,W=u,O=p,Z=m,Y=g=65535&I|E<<16,H=f,j=y,X=v,G=w,S%16==15)for(A=0;A<16;A++)C=D[A],I=65535&(k=P[A]),E=k>>>16,_=65535&C,M=C>>>16,C=D[(A+9)%16],I+=65535&(k=P[(A+9)%16]),E+=k>>>16,_+=65535&C,M+=C>>>16,b=D[(A+1)%16],I+=65535&(k=((x=P[(A+1)%16])>>>1|b<<31)^(x>>>8|b<<24)^(x>>>7|b<<25)),E+=k>>>16,_+=65535&(C=(b>>>1|x<<31)^(b>>>8|x<<24)^b>>>7),M+=C>>>16,b=D[(A+14)%16],E+=(k=((x=P[(A+14)%16])>>>19|b<<13)^(b>>>29|x<<3)^(x>>>6|b<<26))>>>16,_+=65535&(C=(b>>>19|x<<13)^(x>>>29|b<<3)^b>>>6),M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,D[A]=65535&_|M<<16,P[A]=65535&I|E<<16;I=65535&(k=G),E=k>>>16,_=65535&(C=T),M=C>>>16,C=t[0],E+=(k=e[0])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[0]=T=65535&_|M<<16,e[0]=G=65535&I|E<<16,I=65535&(k=W),E=k>>>16,_=65535&(C=L),M=C>>>16,C=t[1],E+=(k=e[1])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[1]=L=65535&_|M<<16,e[1]=W=65535&I|E<<16,I=65535&(k=O),E=k>>>16,_=65535&(C=B),M=C>>>16,C=t[2],E+=(k=e[2])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[2]=B=65535&_|M<<16,e[2]=O=65535&I|E<<16,I=65535&(k=Z),E=k>>>16,_=65535&(C=F),M=C>>>16,C=t[3],E+=(k=e[3])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[3]=F=65535&_|M<<16,e[3]=Z=65535&I|E<<16,I=65535&(k=Y),E=k>>>16,_=65535&(C=R),M=C>>>16,C=t[4],E+=(k=e[4])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[4]=R=65535&_|M<<16,e[4]=Y=65535&I|E<<16,I=65535&(k=H),E=k>>>16,_=65535&(C=N),M=C>>>16,C=t[5],E+=(k=e[5])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[5]=N=65535&_|M<<16,e[5]=H=65535&I|E<<16,I=65535&(k=j),E=k>>>16,_=65535&(C=V),M=C>>>16,C=t[6],E+=(k=e[6])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[6]=V=65535&_|M<<16,e[6]=j=65535&I|E<<16,I=65535&(k=X),E=k>>>16,_=65535&(C=z),M=C>>>16,C=t[7],E+=(k=e[7])>>>16,_+=65535&C,M+=C>>>16,M+=(_+=(E+=(I+=65535&k)>>>16)>>>16)>>>16,t[7]=z=65535&_|M<<16,e[7]=X=65535&I|E<<16,U+=128,i-=128}return i}function q(t,e,n){var i,r=new Int32Array(8),a=new Int32Array(8),o=new Uint8Array(256),s=n;for(r[0]=1779033703,r[1]=3144134277,r[2]=1013904242,r[3]=2773480762,r[4]=1359893119,r[5]=2600822924,r[6]=528734635,r[7]=1541459225,a[0]=4089235720,a[1]=2227873595,a[2]=4271175723,a[3]=1595750129,a[4]=2917565137,a[5]=725511199,a[6]=4215389547,a[7]=327033209,J(r,a,e,n),n%=128,i=0;i<n;i++)o[i]=e[s-n+i];for(o[n]=128,o[(n=256-128*(n<112?1:0))-9]=0,m(o,n-8,s/536870912|0,s<<3),J(r,a,o,n),i=0;i<8;i++)m(t,8*i,r[i],a[i]);return 0}function $(t,n){var i=e(),r=e(),a=e(),o=e(),s=e(),l=e(),c=e(),d=e(),u=e();V(i,t[1],t[0]),V(u,n[1],n[0]),z(i,i,u),N(r,t[0],t[1]),N(u,n[0],n[1]),z(r,r,u),z(a,t[3],n[3]),z(a,a,h),z(o,t[2],n[2]),N(o,o,o),V(s,r,i),V(l,o,a),N(c,o,a),N(d,r,i),z(t[0],s,l),z(t[1],d,c),z(t[2],c,l),z(t[3],s,d)}function Q(t,e,n){var i;for(i=0;i<4;i++)T(t[i],e[i],n)}function tt(t,n){var i=e(),r=e(),a=e();W(a,n[2]),z(i,n[0],a),z(r,n[1],a),L(t,r),t[31]^=F(i)<<7}function et(t,e,n){var i,r;for(D(t[0],o),D(t[1],s),D(t[2],s),D(t[3],o),r=255;r>=0;--r)Q(t,e,i=n[r/8|0]>>(7&r)&1),$(e,t),$(t,t),Q(t,e,i)}function nt(t,n){var i=[e(),e(),e(),e()];D(i[0],d),D(i[1],u),D(i[2],s),z(i[3],d,u),et(t,i,n)}function it(t,n,r){var a,o=new Uint8Array(64),s=[e(),e(),e(),e()];for(r||i(n,32),q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,nt(s,o),tt(t,s),a=0;a<32;a++)n[a+32]=t[a];return 0}var rt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function at(t,e){var n,i,r,a;for(i=63;i>=32;--i){for(n=0,r=i-32,a=i-12;r<a;++r)e[r]+=n-16*e[i]*rt[r-(i-32)],n=Math.floor((e[r]+128)/256),e[r]-=256*n;e[r]+=n,e[i]=0}for(n=0,r=0;r<32;r++)e[r]+=n-(e[31]>>4)*rt[r],n=e[r]>>8,e[r]&=255;for(r=0;r<32;r++)e[r]-=n*rt[r];for(i=0;i<32;i++)e[i+1]+=e[i]>>8,t[i]=255&e[i]}function ot(t){var e,n=new Float64Array(64);for(e=0;e<64;e++)n[e]=t[e];for(e=0;e<64;e++)t[e]=0;at(t,n)}function st(t,n,i,r){var a,o,s=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),h=new Float64Array(64),d=[e(),e(),e(),e()];q(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64;var u=i+64;for(a=0;a<i;a++)t[64+a]=n[a];for(a=0;a<32;a++)t[32+a]=s[32+a];for(q(c,t.subarray(32),i+32),ot(c),nt(d,c),tt(t,d),a=32;a<64;a++)t[a]=r[a];for(q(l,t,i+64),ot(l),a=0;a<64;a++)h[a]=0;for(a=0;a<32;a++)h[a]=c[a];for(a=0;a<32;a++)for(o=0;o<32;o++)h[a+o]+=l[a]*s[o];return at(t.subarray(32),h),u}function lt(t,n,i,r){var a,l=new Uint8Array(32),h=new Uint8Array(64),d=[e(),e(),e(),e()],u=[e(),e(),e(),e()];if(i<64)return-1;if(function(t,n){var i=e(),r=e(),a=e(),l=e(),h=e(),d=e(),u=e();return D(t[2],s),R(t[1],n),G(a,t[1]),z(l,a,c),V(a,a,t[2]),N(l,t[2],l),G(h,l),G(d,h),z(u,d,h),z(i,u,a),z(i,i,l),O(i,i),z(i,i,a),z(i,i,l),z(i,i,l),z(t[0],i,l),G(r,t[0]),z(r,r,l),B(r,a)&&z(t[0],t[0],p),G(r,t[0]),z(r,r,l),B(r,a)?-1:(F(t[0])===n[31]>>7&&V(t[0],o,t[0]),z(t[3],t[0],t[1]),0)}(u,r))return-1;for(a=0;a<i;a++)t[a]=n[a];for(a=0;a<32;a++)t[a+32]=r[a];if(q(h,t,i),ot(h),et(d,u,h),nt(u,n.subarray(32)),$(d,u),tt(l,d),i-=64,y(n,0,l,0)){for(a=0;a<i;a++)t[a]=0;return-1}for(a=0;a<i;a++)t[a]=n[a+64];return i}var ct=64,ht=32,dt=64;function ut(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function pt(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function mt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:C,crypto_stream:A,crypto_stream_salsa20_xor:x,crypto_stream_salsa20:S,crypto_onetimeauth:I,crypto_onetimeauth_verify:E,crypto_verify_16:f,crypto_verify_32:y,crypto_secretbox:_,crypto_secretbox_open:M,crypto_scalarmult:Z,crypto_scalarmult_base:Y,crypto_box_beforenm:j,crypto_box_afternm:X,crypto_box:function(t,e,n,i,r,a){var o=new Uint8Array(32);return j(o,r,a),X(t,e,n,i,o)},crypto_box_open:function(t,e,n,i,r,a){var o=new Uint8Array(32);return j(o,r,a),U(t,e,n,i,o)},crypto_box_keypair:H,crypto_hash:q,crypto_sign:st,crypto_sign_keypair:it,crypto_sign_open:lt,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ct,crypto_sign_PUBLICKEYBYTES:ht,crypto_sign_SECRETKEYBYTES:dt,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:c,L:rt,pack25519:L,unpack25519:R,M:z,A:N,S:G,Z:V,pow2523:O,add:$,set25519:D,modL:at,scalarmult:et,scalarbase:nt},t.randomBytes=function(t){var e=new Uint8Array(t);return i(e,t),e},t.secretbox=function(t,e,n){pt(t,e,n),ut(n,e);for(var i=new Uint8Array(32+t.length),r=new Uint8Array(i.length),a=0;a<t.length;a++)i[a+32]=t[a];return _(r,i,i.length,e,n),r.subarray(16)},t.secretbox.open=function(t,e,n){pt(t,e,n),ut(n,e);for(var i=new Uint8Array(16+t.length),r=new Uint8Array(i.length),a=0;a<t.length;a++)i[a+16]=t[a];return i.length<32||0!==M(r,i,i.length,e,n)?null:r.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(pt(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var n=new Uint8Array(32);return Z(n,t,e),n},t.scalarMult.base=function(t){if(pt(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return Y(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,n,i,r){var a=t.box.before(i,r);return t.secretbox(e,n,a)},t.box.before=function(t,e){pt(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var n=new Uint8Array(32);return j(n,t,e),n},t.box.after=t.secretbox,t.box.open=function(e,n,i,r){var a=t.box.before(i,r);return t.secretbox.open(e,n,a)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return H(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(pt(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return Y(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(pt(t,e),e.length!==dt)throw new Error("bad secret key size");var n=new Uint8Array(ct+t.length);return st(n,t,t.length,e),n},t.sign.open=function(t,e){if(pt(t,e),e.length!==ht)throw new Error("bad public key size");var n=new Uint8Array(t.length),i=lt(n,t,t.length,e);if(i<0)return null;for(var r=new Uint8Array(i),a=0;a<r.length;a++)r[a]=n[a];return r},t.sign.detached=function(e,n){for(var i=t.sign(e,n),r=new Uint8Array(ct),a=0;a<r.length;a++)r[a]=i[a];return r},t.sign.detached.verify=function(t,e,n){if(pt(t,e,n),e.length!==ct)throw new Error("bad signature size");if(n.length!==ht)throw new Error("bad public key size");var i,r=new Uint8Array(ct+t.length),a=new Uint8Array(ct+t.length);for(i=0;i<ct;i++)r[i]=e[i];for(i=0;i<t.length;i++)r[i+ct]=t[i];return lt(a,r,r.length,n)>=0},t.sign.keyPair=function(){var t=new Uint8Array(ht),e=new Uint8Array(dt);return it(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(pt(t),t.length!==dt)throw new Error("bad secret key size");for(var e=new Uint8Array(ht),n=0;n<e.length;n++)e[n]=t[32+n];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(pt(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(ht),n=new Uint8Array(dt),i=0;i<32;i++)n[i]=t[i];return it(e,n,!0),{publicKey:e,secretKey:n}},t.sign.publicKeyLength=ht,t.sign.secretKeyLength=dt,t.sign.seedLength=32,t.sign.signatureLength=ct,t.hash=function(t){pt(t);var e=new Uint8Array(64);return q(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return pt(t,e),0!==t.length&&0!==e.length&&t.length===e.length&&0===g(t,0,e,0,t.length)},t.setPRNG=function(t){i=t},function(){var e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&e.getRandomValues?t.setPRNG((function(t,n){var i,r=new Uint8Array(n);for(i=0;i<n;i+=65536)e.getRandomValues(r.subarray(i,i+Math.min(n-i,65536)));for(i=0;i<n;i++)t[i]=r[i];mt(r)})):(e=n(1281))&&e.randomBytes&&t.setPRNG((function(t,n){var i,r=e.randomBytes(n);for(i=0;i<n;i++)t[i]=r[i];mt(r)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},9225:t=>{t.exports=i,i.strict=r,i.loose=a;var e=Object.prototype.toString,n={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(t){return r(t)||a(t)}function r(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function a(t){return n[e.call(t)]}},9404:function(t,e,n){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function r(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function a(t,e,n){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o=n(7790).Buffer}catch(t){}function s(t,e,n){for(var i=0,r=Math.min(t.length,n),a=e;a<r;a++){var o=t.charCodeAt(a)-48;i<<=4,i|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function l(t,e,n,i){for(var r=0,a=Math.min(t.length,n),o=e;o<a;o++){var s=t.charCodeAt(o)-48;r*=i,r+=s>=49?s-49+10:s>=17?s-17+10:s}return r}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var r=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&r++,16===e?this._parseHex(t,r):this._parseBase(t,e,r),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},a.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},a.prototype._initArray=function(t,e,n){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var a,o,s=0;if("be"===n)for(r=t.length-1,a=0;r>=0;r-=3)o=t[r]|t[r-1]<<8|t[r-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===n)for(r=0,a=0;r<t.length;r+=3)o=t[r]|t[r+1]<<8|t[r+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,r,a=0;for(n=t.length-6,i=0;n>=e;n-=6)r=s(t,n,n+6),this.words[i]|=r<<a&67108863,this.words[i+1]|=r>>>26-a&4194303,(a+=24)>=26&&(a-=26,i++);n+6!==e&&(r=s(t,e,n+6),this.words[i]|=r<<a&67108863,this.words[i+1]|=r>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=e)i++;i--,r=r/e|0;for(var a=t.length-n,o=a%i,s=Math.min(a,a-o)+n,c=0,h=n;h<s;h+=i)c=l(t,h,h+i,e),this.imuln(r),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var d=1;for(c=l(t,h,t.length,e),h=0;h<o;h++)d*=e;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},a.prototype.clone=function(){var t=new a(null);return this.copy(t),t},a.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},a.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function u(t,e,n){n.negative=e.negative^t.negative;var i=t.length+e.length|0;n.length=i,i=i-1|0;var r=0|t.words[0],a=0|e.words[0],o=r*a,s=67108863&o,l=o/67108864|0;n.words[0]=s;for(var c=1;c<i;c++){for(var h=l>>>26,d=67108863&l,u=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=u;p++){var m=c-p|0;h+=(o=(r=0|t.words[m])*(a=0|e.words[p])+d)/67108864|0,d=67108863&o}n.words[c]=0|d,l=0|h}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}a.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var r=0,a=0,o=0;o<this.length;o++){var s=this.words[o],l=(16777215&(s<<r|a)).toString(16);n=0!=(a=s>>>24-r&16777215)||o!==this.length-1?c[6-l.length]+l+n:l+n,(r+=2)>=26&&(r-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var u=h[t],p=d[t];n="";var m=this.clone();for(m.negative=0;!m.isZero();){var g=m.modn(p).toString(t);n=(m=m.idivn(p)).isZero()?g+n:c[u-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,n){var r=this.byteLength(),a=n||Math.max(1,r);i(r<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),h=this.clone();if(l){for(s=0;!h.isZero();s++)o=h.andln(255),h.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-r;s++)c[s]=0;for(s=0;!h.isZero();s++)o=h.andln(255),h.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 8191&e||(n+=13,e>>>=13),127&e||(n+=7,e>>>=7),15&e||(n+=4,e>>>=4),3&e||(n+=2,e>>>=2),1&e||n++,n},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},a.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},a.prototype.ior=function(t){return i(!(this.negative|t.negative)),this.iuor(t)},a.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},a.prototype.iand=function(t){return i(!(this.negative|t.negative)),this.iuand(t)},a.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var i=0;i<n.length;i++)this.words[i]=e.words[i]^n.words[i];if(this!==e)for(;i<e.length;i++)this.words[i]=e.words[i];return this.length=e.length,this.strip()},a.prototype.ixor=function(t){return i(!(this.negative|t.negative)),this.iuxor(t)},a.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var r=0;r<e;r++)this.words[r]=67108863&~this.words[r];return n>0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var n=t/26|0,r=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<r:this.words[n]&~(1<<r),this.strip()},a.prototype.iadd=function(t){var e,n,i;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,i=t):(n=t,i=this);for(var r=0,a=0;a<i.length;a++)e=(0|n.words[a])+(0|i.words[a])+r,this.words[a]=67108863&e,r=e>>>26;for(;0!==r&&a<n.length;a++)e=(0|n.words[a])+r,this.words[a]=67108863&e,r=e>>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this},a.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,i,r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(n=this,i=t):(n=t,i=this);for(var a=0,o=0;o<i.length;o++)a=(e=(0|n.words[o])-(0|i.words[o])+a)>>26,this.words[o]=67108863&e;for(;0!==a&&o<n.length;o++)a=(e=(0|n.words[o])+a)>>26,this.words[o]=67108863&e;if(0===a&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var i,r,a,o=t.words,s=e.words,l=n.words,c=0,h=0|o[0],d=8191&h,u=h>>>13,p=0|o[1],m=8191&p,g=p>>>13,f=0|o[2],y=8191&f,v=f>>>13,w=0|o[3],b=8191&w,x=w>>>13,S=0|o[4],A=8191&S,C=S>>>13,k=0|o[5],I=8191&k,E=k>>>13,_=0|o[6],M=8191&_,D=_>>>13,P=0|o[7],T=8191&P,L=P>>>13,B=0|o[8],F=8191&B,R=B>>>13,N=0|o[9],V=8191&N,z=N>>>13,G=0|s[0],W=8191&G,O=G>>>13,Z=0|s[1],Y=8191&Z,H=Z>>>13,j=0|s[2],X=8191&j,U=j>>>13,K=0|s[3],J=8191&K,q=K>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],nt=8191&et,it=et>>>13,rt=0|s[6],at=8191&rt,ot=rt>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ht=0|s[8],dt=8191&ht,ut=ht>>>13,pt=0|s[9],mt=8191&pt,gt=pt>>>13;n.negative=t.negative^e.negative,n.length=19;var ft=(c+(i=Math.imul(d,W))|0)+((8191&(r=(r=Math.imul(d,O))+Math.imul(u,W)|0))<<13)|0;c=((a=Math.imul(u,O))+(r>>>13)|0)+(ft>>>26)|0,ft&=67108863,i=Math.imul(m,W),r=(r=Math.imul(m,O))+Math.imul(g,W)|0,a=Math.imul(g,O);var yt=(c+(i=i+Math.imul(d,Y)|0)|0)+((8191&(r=(r=r+Math.imul(d,H)|0)+Math.imul(u,Y)|0))<<13)|0;c=((a=a+Math.imul(u,H)|0)+(r>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,W),r=(r=Math.imul(y,O))+Math.imul(v,W)|0,a=Math.imul(v,O),i=i+Math.imul(m,Y)|0,r=(r=r+Math.imul(m,H)|0)+Math.imul(g,Y)|0,a=a+Math.imul(g,H)|0;var vt=(c+(i=i+Math.imul(d,X)|0)|0)+((8191&(r=(r=r+Math.imul(d,U)|0)+Math.imul(u,X)|0))<<13)|0;c=((a=a+Math.imul(u,U)|0)+(r>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(b,W),r=(r=Math.imul(b,O))+Math.imul(x,W)|0,a=Math.imul(x,O),i=i+Math.imul(y,Y)|0,r=(r=r+Math.imul(y,H)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,H)|0,i=i+Math.imul(m,X)|0,r=(r=r+Math.imul(m,U)|0)+Math.imul(g,X)|0,a=a+Math.imul(g,U)|0;var wt=(c+(i=i+Math.imul(d,J)|0)|0)+((8191&(r=(r=r+Math.imul(d,q)|0)+Math.imul(u,J)|0))<<13)|0;c=((a=a+Math.imul(u,q)|0)+(r>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,W),r=(r=Math.imul(A,O))+Math.imul(C,W)|0,a=Math.imul(C,O),i=i+Math.imul(b,Y)|0,r=(r=r+Math.imul(b,H)|0)+Math.imul(x,Y)|0,a=a+Math.imul(x,H)|0,i=i+Math.imul(y,X)|0,r=(r=r+Math.imul(y,U)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,U)|0,i=i+Math.imul(m,J)|0,r=(r=r+Math.imul(m,q)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,q)|0;var bt=(c+(i=i+Math.imul(d,Q)|0)|0)+((8191&(r=(r=r+Math.imul(d,tt)|0)+Math.imul(u,Q)|0))<<13)|0;c=((a=a+Math.imul(u,tt)|0)+(r>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(I,W),r=(r=Math.imul(I,O))+Math.imul(E,W)|0,a=Math.imul(E,O),i=i+Math.imul(A,Y)|0,r=(r=r+Math.imul(A,H)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,H)|0,i=i+Math.imul(b,X)|0,r=(r=r+Math.imul(b,U)|0)+Math.imul(x,X)|0,a=a+Math.imul(x,U)|0,i=i+Math.imul(y,J)|0,r=(r=r+Math.imul(y,q)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,q)|0,i=i+Math.imul(m,Q)|0,r=(r=r+Math.imul(m,tt)|0)+Math.imul(g,Q)|0,a=a+Math.imul(g,tt)|0;var xt=(c+(i=i+Math.imul(d,nt)|0)|0)+((8191&(r=(r=r+Math.imul(d,it)|0)+Math.imul(u,nt)|0))<<13)|0;c=((a=a+Math.imul(u,it)|0)+(r>>>13)|0)+(xt>>>26)|0,xt&=67108863,i=Math.imul(M,W),r=(r=Math.imul(M,O))+Math.imul(D,W)|0,a=Math.imul(D,O),i=i+Math.imul(I,Y)|0,r=(r=r+Math.imul(I,H)|0)+Math.imul(E,Y)|0,a=a+Math.imul(E,H)|0,i=i+Math.imul(A,X)|0,r=(r=r+Math.imul(A,U)|0)+Math.imul(C,X)|0,a=a+Math.imul(C,U)|0,i=i+Math.imul(b,J)|0,r=(r=r+Math.imul(b,q)|0)+Math.imul(x,J)|0,a=a+Math.imul(x,q)|0,i=i+Math.imul(y,Q)|0,r=(r=r+Math.imul(y,tt)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,tt)|0,i=i+Math.imul(m,nt)|0,r=(r=r+Math.imul(m,it)|0)+Math.imul(g,nt)|0,a=a+Math.imul(g,it)|0;var St=(c+(i=i+Math.imul(d,at)|0)|0)+((8191&(r=(r=r+Math.imul(d,ot)|0)+Math.imul(u,at)|0))<<13)|0;c=((a=a+Math.imul(u,ot)|0)+(r>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(T,W),r=(r=Math.imul(T,O))+Math.imul(L,W)|0,a=Math.imul(L,O),i=i+Math.imul(M,Y)|0,r=(r=r+Math.imul(M,H)|0)+Math.imul(D,Y)|0,a=a+Math.imul(D,H)|0,i=i+Math.imul(I,X)|0,r=(r=r+Math.imul(I,U)|0)+Math.imul(E,X)|0,a=a+Math.imul(E,U)|0,i=i+Math.imul(A,J)|0,r=(r=r+Math.imul(A,q)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,q)|0,i=i+Math.imul(b,Q)|0,r=(r=r+Math.imul(b,tt)|0)+Math.imul(x,Q)|0,a=a+Math.imul(x,tt)|0,i=i+Math.imul(y,nt)|0,r=(r=r+Math.imul(y,it)|0)+Math.imul(v,nt)|0,a=a+Math.imul(v,it)|0,i=i+Math.imul(m,at)|0,r=(r=r+Math.imul(m,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var At=(c+(i=i+Math.imul(d,lt)|0)|0)+((8191&(r=(r=r+Math.imul(d,ct)|0)+Math.imul(u,lt)|0))<<13)|0;c=((a=a+Math.imul(u,ct)|0)+(r>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(F,W),r=(r=Math.imul(F,O))+Math.imul(R,W)|0,a=Math.imul(R,O),i=i+Math.imul(T,Y)|0,r=(r=r+Math.imul(T,H)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,H)|0,i=i+Math.imul(M,X)|0,r=(r=r+Math.imul(M,U)|0)+Math.imul(D,X)|0,a=a+Math.imul(D,U)|0,i=i+Math.imul(I,J)|0,r=(r=r+Math.imul(I,q)|0)+Math.imul(E,J)|0,a=a+Math.imul(E,q)|0,i=i+Math.imul(A,Q)|0,r=(r=r+Math.imul(A,tt)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,tt)|0,i=i+Math.imul(b,nt)|0,r=(r=r+Math.imul(b,it)|0)+Math.imul(x,nt)|0,a=a+Math.imul(x,it)|0,i=i+Math.imul(y,at)|0,r=(r=r+Math.imul(y,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0,i=i+Math.imul(m,lt)|0,r=(r=r+Math.imul(m,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var Ct=(c+(i=i+Math.imul(d,dt)|0)|0)+((8191&(r=(r=r+Math.imul(d,ut)|0)+Math.imul(u,dt)|0))<<13)|0;c=((a=a+Math.imul(u,ut)|0)+(r>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(V,W),r=(r=Math.imul(V,O))+Math.imul(z,W)|0,a=Math.imul(z,O),i=i+Math.imul(F,Y)|0,r=(r=r+Math.imul(F,H)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,H)|0,i=i+Math.imul(T,X)|0,r=(r=r+Math.imul(T,U)|0)+Math.imul(L,X)|0,a=a+Math.imul(L,U)|0,i=i+Math.imul(M,J)|0,r=(r=r+Math.imul(M,q)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,q)|0,i=i+Math.imul(I,Q)|0,r=(r=r+Math.imul(I,tt)|0)+Math.imul(E,Q)|0,a=a+Math.imul(E,tt)|0,i=i+Math.imul(A,nt)|0,r=(r=r+Math.imul(A,it)|0)+Math.imul(C,nt)|0,a=a+Math.imul(C,it)|0,i=i+Math.imul(b,at)|0,r=(r=r+Math.imul(b,ot)|0)+Math.imul(x,at)|0,a=a+Math.imul(x,ot)|0,i=i+Math.imul(y,lt)|0,r=(r=r+Math.imul(y,ct)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ct)|0,i=i+Math.imul(m,dt)|0,r=(r=r+Math.imul(m,ut)|0)+Math.imul(g,dt)|0,a=a+Math.imul(g,ut)|0;var kt=(c+(i=i+Math.imul(d,mt)|0)|0)+((8191&(r=(r=r+Math.imul(d,gt)|0)+Math.imul(u,mt)|0))<<13)|0;c=((a=a+Math.imul(u,gt)|0)+(r>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(V,Y),r=(r=Math.imul(V,H))+Math.imul(z,Y)|0,a=Math.imul(z,H),i=i+Math.imul(F,X)|0,r=(r=r+Math.imul(F,U)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,U)|0,i=i+Math.imul(T,J)|0,r=(r=r+Math.imul(T,q)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,q)|0,i=i+Math.imul(M,Q)|0,r=(r=r+Math.imul(M,tt)|0)+Math.imul(D,Q)|0,a=a+Math.imul(D,tt)|0,i=i+Math.imul(I,nt)|0,r=(r=r+Math.imul(I,it)|0)+Math.imul(E,nt)|0,a=a+Math.imul(E,it)|0,i=i+Math.imul(A,at)|0,r=(r=r+Math.imul(A,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,i=i+Math.imul(b,lt)|0,r=(r=r+Math.imul(b,ct)|0)+Math.imul(x,lt)|0,a=a+Math.imul(x,ct)|0,i=i+Math.imul(y,dt)|0,r=(r=r+Math.imul(y,ut)|0)+Math.imul(v,dt)|0,a=a+Math.imul(v,ut)|0;var It=(c+(i=i+Math.imul(m,mt)|0)|0)+((8191&(r=(r=r+Math.imul(m,gt)|0)+Math.imul(g,mt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(r>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(V,X),r=(r=Math.imul(V,U))+Math.imul(z,X)|0,a=Math.imul(z,U),i=i+Math.imul(F,J)|0,r=(r=r+Math.imul(F,q)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,q)|0,i=i+Math.imul(T,Q)|0,r=(r=r+Math.imul(T,tt)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,tt)|0,i=i+Math.imul(M,nt)|0,r=(r=r+Math.imul(M,it)|0)+Math.imul(D,nt)|0,a=a+Math.imul(D,it)|0,i=i+Math.imul(I,at)|0,r=(r=r+Math.imul(I,ot)|0)+Math.imul(E,at)|0,a=a+Math.imul(E,ot)|0,i=i+Math.imul(A,lt)|0,r=(r=r+Math.imul(A,ct)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ct)|0,i=i+Math.imul(b,dt)|0,r=(r=r+Math.imul(b,ut)|0)+Math.imul(x,dt)|0,a=a+Math.imul(x,ut)|0;var Et=(c+(i=i+Math.imul(y,mt)|0)|0)+((8191&(r=(r=r+Math.imul(y,gt)|0)+Math.imul(v,mt)|0))<<13)|0;c=((a=a+Math.imul(v,gt)|0)+(r>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(V,J),r=(r=Math.imul(V,q))+Math.imul(z,J)|0,a=Math.imul(z,q),i=i+Math.imul(F,Q)|0,r=(r=r+Math.imul(F,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,i=i+Math.imul(T,nt)|0,r=(r=r+Math.imul(T,it)|0)+Math.imul(L,nt)|0,a=a+Math.imul(L,it)|0,i=i+Math.imul(M,at)|0,r=(r=r+Math.imul(M,ot)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,ot)|0,i=i+Math.imul(I,lt)|0,r=(r=r+Math.imul(I,ct)|0)+Math.imul(E,lt)|0,a=a+Math.imul(E,ct)|0,i=i+Math.imul(A,dt)|0,r=(r=r+Math.imul(A,ut)|0)+Math.imul(C,dt)|0,a=a+Math.imul(C,ut)|0;var _t=(c+(i=i+Math.imul(b,mt)|0)|0)+((8191&(r=(r=r+Math.imul(b,gt)|0)+Math.imul(x,mt)|0))<<13)|0;c=((a=a+Math.imul(x,gt)|0)+(r>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(V,Q),r=(r=Math.imul(V,tt))+Math.imul(z,Q)|0,a=Math.imul(z,tt),i=i+Math.imul(F,nt)|0,r=(r=r+Math.imul(F,it)|0)+Math.imul(R,nt)|0,a=a+Math.imul(R,it)|0,i=i+Math.imul(T,at)|0,r=(r=r+Math.imul(T,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,i=i+Math.imul(M,lt)|0,r=(r=r+Math.imul(M,ct)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ct)|0,i=i+Math.imul(I,dt)|0,r=(r=r+Math.imul(I,ut)|0)+Math.imul(E,dt)|0,a=a+Math.imul(E,ut)|0;var Mt=(c+(i=i+Math.imul(A,mt)|0)|0)+((8191&(r=(r=r+Math.imul(A,gt)|0)+Math.imul(C,mt)|0))<<13)|0;c=((a=a+Math.imul(C,gt)|0)+(r>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(V,nt),r=(r=Math.imul(V,it))+Math.imul(z,nt)|0,a=Math.imul(z,it),i=i+Math.imul(F,at)|0,r=(r=r+Math.imul(F,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,i=i+Math.imul(T,lt)|0,r=(r=r+Math.imul(T,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,i=i+Math.imul(M,dt)|0,r=(r=r+Math.imul(M,ut)|0)+Math.imul(D,dt)|0,a=a+Math.imul(D,ut)|0;var Dt=(c+(i=i+Math.imul(I,mt)|0)|0)+((8191&(r=(r=r+Math.imul(I,gt)|0)+Math.imul(E,mt)|0))<<13)|0;c=((a=a+Math.imul(E,gt)|0)+(r>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,i=Math.imul(V,at),r=(r=Math.imul(V,ot))+Math.imul(z,at)|0,a=Math.imul(z,ot),i=i+Math.imul(F,lt)|0,r=(r=r+Math.imul(F,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,i=i+Math.imul(T,dt)|0,r=(r=r+Math.imul(T,ut)|0)+Math.imul(L,dt)|0,a=a+Math.imul(L,ut)|0;var Pt=(c+(i=i+Math.imul(M,mt)|0)|0)+((8191&(r=(r=r+Math.imul(M,gt)|0)+Math.imul(D,mt)|0))<<13)|0;c=((a=a+Math.imul(D,gt)|0)+(r>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(V,lt),r=(r=Math.imul(V,ct))+Math.imul(z,lt)|0,a=Math.imul(z,ct),i=i+Math.imul(F,dt)|0,r=(r=r+Math.imul(F,ut)|0)+Math.imul(R,dt)|0,a=a+Math.imul(R,ut)|0;var Tt=(c+(i=i+Math.imul(T,mt)|0)|0)+((8191&(r=(r=r+Math.imul(T,gt)|0)+Math.imul(L,mt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(r>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(V,dt),r=(r=Math.imul(V,ut))+Math.imul(z,dt)|0,a=Math.imul(z,ut);var Lt=(c+(i=i+Math.imul(F,mt)|0)|0)+((8191&(r=(r=r+Math.imul(F,gt)|0)+Math.imul(R,mt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(r>>>13)|0)+(Lt>>>26)|0,Lt&=67108863;var Bt=(c+(i=Math.imul(V,mt))|0)+((8191&(r=(r=Math.imul(V,gt))+Math.imul(z,mt)|0))<<13)|0;return c=((a=Math.imul(z,gt))+(r>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,l[0]=ft,l[1]=yt,l[2]=vt,l[3]=wt,l[4]=bt,l[5]=xt,l[6]=St,l[7]=At,l[8]=Ct,l[9]=kt,l[10]=It,l[11]=Et,l[12]=_t,l[13]=Mt,l[14]=Dt,l[15]=Pt,l[16]=Tt,l[17]=Lt,l[18]=Bt,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=u),a.prototype.mulTo=function(t,e){var n,i=this.length+t.length;return n=10===this.length&&10===t.length?p(this,t,e):i<63?u(this,t,e):i<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var i=0,r=0,a=0;a<n.length-1;a++){var o=r;r=0;for(var s=67108863&i,l=Math.min(a,e.length-1),c=Math.max(0,a-t.length+1);c<=l;c++){var h=a-c,d=(0|t.words[h])*(0|e.words[c]),u=67108863&d;s=67108863&(u=u+s|0),r+=(o=(o=o+(d/67108864|0)|0)+(u>>>26)|0)>>>26,o&=67108863}n.words[a]=s,i=o,o=r}return 0!==i?n.words[a]=i:n.length--,n.strip()}(this,t,e):m(this,t,e),n},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=a.prototype._countBits(t)-1,i=0;i<t;i++)e[i]=this.revBin(i,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var i=0,r=0;r<e;r++)i|=(1&t)<<e-r-1,t>>=1;return i},g.prototype.permute=function(t,e,n,i,r,a){for(var o=0;o<a;o++)i[o]=e[t[o]],r[o]=n[t[o]]},g.prototype.transform=function(t,e,n,i,r,a){this.permute(a,t,e,n,i,r);for(var o=1;o<r;o<<=1)for(var s=o<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),h=0;h<r;h+=s)for(var d=l,u=c,p=0;p<o;p++){var m=n[h+p],g=i[h+p],f=n[h+p+o],y=i[h+p+o],v=d*f-u*y;y=d*y+u*f,f=v,n[h+p]=m+f,i[h+p]=g+y,n[h+p+o]=m-f,i[h+p+o]=g-y,p!==s&&(v=l*d-c*u,u=l*u+c*d,d=v)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),i=1&n,r=0;for(n=n/2|0;n;n>>>=1)r++;return 1<<r+1+i},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var i=0;i<n/2;i++){var r=t[i];t[i]=t[n-i-1],t[n-i-1]=r,r=e[i],e[i]=-e[n-i-1],e[n-i-1]=-r}},g.prototype.normalize13b=function(t,e){for(var n=0,i=0;i<e/2;i++){var r=8192*Math.round(t[2*i+1]/e)+Math.round(t[2*i]/e)+n;t[i]=67108863&r,n=r<67108864?0:r/67108864|0}return t},g.prototype.convert13b=function(t,e,n,r){for(var a=0,o=0;o<e;o++)a+=0|t[o],n[2*o]=8191&a,a>>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*e;o<r;++o)n[o]=0;i(0===a),i(!(-8192&a))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var i=2*this.guessLen13b(t.length,e.length),r=this.makeRBT(i),a=this.stub(i),o=new Array(i),s=new Array(i),l=new Array(i),c=new Array(i),h=new Array(i),d=new Array(i),u=n.words;u.length=i,this.convert13b(t.words,t.length,o,i),this.convert13b(e.words,e.length,c,i),this.transform(o,a,s,l,i,r),this.transform(c,a,h,d,i,r);for(var p=0;p<i;p++){var m=s[p]*h[p]-l[p]*d[p];l[p]=s[p]*d[p]+l[p]*h[p],s[p]=m}return this.conjugate(s,l,i),this.transform(s,l,u,a,i,r),this.conjugate(u,a,i),this.normalize13b(u,i),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},a.prototype.mul=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},a.prototype.mulf=function(t){var e=new a(null);return e.words=new Array(this.length+t.length),m(this,t,e)},a.prototype.imul=function(t){return this.clone().mulTo(t,this)},a.prototype.imuln=function(t){i("number"==typeof t),i(t<67108864);for(var e=0,n=0;n<this.length;n++){var r=(0|this.words[n])*t,a=(67108863&r)+(67108863&e);e>>=26,e+=r/67108864|0,e+=a>>>26,this.words[n]=67108863&a}return 0!==e&&(this.words[n]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var i=n/26|0,r=n%26;e[n]=(t.words[i]&1<<r)>>>r}return e}(t);if(0===e.length)return new a(1);for(var n=this,i=0;i<e.length&&0===e[i];i++,n=n.sqr());if(++i<e.length)for(var r=n.sqr();i<e.length;i++,r=r.sqr())0!==e[i]&&(n=n.mul(r));return n},a.prototype.iushln=function(t){i("number"==typeof t&&t>=0);var e,n=t%26,r=(t-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e<this.length;e++){var s=this.words[e]&a,l=(0|this.words[e])-s<<n;this.words[e]=l|o,o=s>>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==r){for(e=this.length-1;e>=0;e--)this.words[e+r]=this.words[e];for(e=0;e<r;e++)this.words[e]=0;this.length+=r}return this.strip()},a.prototype.ishln=function(t){return i(0===this.negative),this.iushln(t)},a.prototype.iushrn=function(t,e,n){var r;i("number"==typeof t&&t>=0),r=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<<a,l=n;if(r-=o,r=Math.max(0,r),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=r);c--){var d=0|this.words[c];this.words[c]=h<<26-a|d>>>a,h=d&s}return l&&0!==h&&(l.words[l.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,n){return i(0===this.negative),this.iushrn(t,e,n)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,r=1<<e;return!(this.length<=n||!(this.words[n]&r))},a.prototype.imaskn=function(t){i("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var r=67108863^67108863>>>e<<e;this.words[this.length-1]&=r}return this.strip()},a.prototype.maskn=function(t){return this.clone().imaskn(t)},a.prototype.iaddn=function(t){return i("number"==typeof t),i(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},a.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},a.prototype.addn=function(t){return this.clone().iaddn(t)},a.prototype.subn=function(t){return this.clone().isubn(t)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(t,e,n){var r,a,o=t.length+n;this._expand(o);var s=0;for(r=0;r<t.length;r++){a=(0|this.words[r+n])+s;var l=(0|t.words[r])*e;s=((a-=67108863&l)>>26)-(l/67108864|0),this.words[r+n]=67108863&a}for(;r<this.length-n;r++)s=(a=(0|this.words[r+n])+s)>>26,this.words[r+n]=67108863&a;if(0===s)return this.strip();for(i(-1===s),s=0,r=0;r<this.length;r++)s=(a=-(0|this.words[r])+s)>>26,this.words[r]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var n=(this.length,t.length),i=this.clone(),r=t,o=0|r.words[r.length-1];0!=(n=26-this._countBits(o))&&(r=r.ushln(n),i.iushln(n),o=0|r.words[r.length-1]);var s,l=i.length-r.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var h=i.clone()._ishlnsubmul(r,1,l);0===h.negative&&(i=h,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var u=67108864*(0|i.words[r.length+d])+(0|i.words[r.length+d-1]);for(u=Math.min(u/o|0,67108863),i._ishlnsubmul(r,u,d);0!==i.negative;)u--,i.negative=0,i._ishlnsubmul(r,1,d),i.isZero()||(i.negative^=1);s&&(s.words[d]=u)}return s&&s.strip(),i.strip(),"div"!==e&&0!==n&&i.iushrn(n),{div:s||null,mod:i}},a.prototype.divmod=function(t,e,n){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(r=s.div.neg()),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:r,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(r=s.div.neg()),{div:r,mod:s.mod}):this.negative&t.negative?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var r,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),r=t.andln(1),a=n.cmp(i);return a<0||1===r&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,n=0,r=this.length-1;r>=0;r--)n=(e*n+(0|this.words[r]))%t;return n},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*e;this.words[n]=r/t|0,e=r%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var h=n.clone(),d=e.clone();!e.isZero();){for(var u=0,p=1;!(e.words[0]&p)&&u<26;++u,p<<=1);if(u>0)for(e.iushrn(u);u-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(h),o.isub(d)),r.iushrn(1),o.iushrn(1);for(var m=0,g=1;!(n.words[0]&g)&&m<26;++m,g<<=1);if(m>0)for(n.iushrn(m);m-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(h),l.isub(d)),s.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),r.isub(s),o.isub(l)):(n.isub(e),s.isub(r),l.isub(o))}return{a:s,b:l,gcd:n.iushln(c)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var r,o=new a(1),s=new a(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,h=1;!(e.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var d=0,u=1;!(n.words[0]&u)&&d<26;++d,u<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(s)):(n.isub(e),s.isub(o))}return(r=0===e.cmpn(1)?o:s).cmpn(0)<0&&r.iadd(t),r},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var i=0;e.isEven()&&n.isEven();i++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=e.cmp(n);if(r<0){var a=e;e=n,n=a}else if(0===r||0===n.cmpn(1))break;e.isub(n)}return n.iushln(i)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,n=(t-e)/26,r=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=r,this;for(var a=r,o=n;0!==a&&o<this.length;o++){var s=0|this.words[o];a=(s+=a)>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),i(t<=67108863,"Number is too big");var r=0|this.words[0];e=r===t?0:r<t?-1:1}return 0!==this.negative?0|-e:e},a.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},a.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var i=0|this.words[n],r=0|t.words[n];if(i!==r){i<r?e=-1:i>r&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new S(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var f={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e<this.n?-1:n.ucmp(this.p);return 0===i?(n.words[0]=0,n.length=1):i>0?n.isub(this.p):n.strip(),n},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},r(v,y),v.prototype.split=function(t,e){for(var n=4194303,i=Math.min(t.length,9),r=0;r<i;r++)e.words[r]=t.words[r];if(e.length=i,t.length<=9)return t.words[0]=0,void(t.length=1);var a=t.words[9];for(e.words[e.length++]=a&n,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(o&n)<<4|a>>>22,a=o}a>>>=22,t.words[r-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var i=0|t.words[n];e+=977*i,t.words[n]=67108863&e,e=64*i+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},r(w,y),r(b,y),r(x,y),x.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var i=19*(0|t.words[n])+e,r=67108863&i;i>>>=26,t.words[n]=r,e=i}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(f[t])return f[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new w;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new x}return f[t]=e,e},S.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){i(!(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var n=this.m.add(new a(1)).iushrn(2);return this.pow(t,n)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);i(!r.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new a(2*h*h).toRed(this);0!==this.pow(h,c).cmp(l);)h.redIAdd(l);for(var d=this.pow(h,r),u=this.pow(t,r.addn(1).iushrn(1)),p=this.pow(t,r),m=o;0!==p.cmp(s);){for(var g=p,f=0;0!==g.cmp(s);f++)g=g.redSqr();i(f<m);var y=this.pow(d,new a(1).iushln(m-f-1));u=u.redMul(y),d=y.redSqr(),p=p.redMul(d),m=f}return u},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new a(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new a(1).toRed(this),n[1]=t;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],t);var r=n[0],o=0,s=0,l=e.bitLength()%26;for(0===l&&(l=26),i=e.length-1;i>=0;i--){for(var c=e.words[i],h=l-1;h>=0;h--){var d=c>>h&1;r!==n[0]&&(r=this.sqr(r)),0!==d||0!==o?(o<<=1,o|=d,(4==++s||0===i&&0===h)&&(r=this.mul(r,n[o]),s=0,o=0)):s=0}l=26}return r},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new A(t)},r(A,S),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},A.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},A.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var n=t.mul(e),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9698:t=>{"use strict";t.exports=JSON.parse('{"hints":{"addNFTListing(uint64,string,string,string)byte[]":{"call_config":{"no_op":"CALL"}},"getNFTListing(string,uint64)(string,string,string)":{"read_only":true,"call_config":{"no_op":"CALL"},"structs":{"output":{"name":"Listing","elements":[["seller","string"],["nftPrice","string"],["marketplace","string"]]}}},"removeNFTListing(string,uint64)byte[]":{"call_config":{"no_op":"CALL"}},"contractOptInToNFT(string,uint64)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToContractAndAddListing(uint64,string,string,string)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToContract(string,uint64)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToReceiver(string,uint64,string)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToSeller(string,uint64,string)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToReceiverAndRemoveListing(uint64,string,string)byte[]":{"call_config":{"no_op":"CALL"}},"transferNFTToSellerAndRemoveListing(uint64,string,string)byte[]":{"call_config":{"no_op":"CALL"}},"fundContract(uint64)void":{"call_config":{"no_op":"CALL"}},"withdrawExcessFunds()void":{"call_config":{"no_op":"CALL"}}},"source":{"approval":"I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBAYWxnb3JhbmRmb3VuZGF0aW9uL2FsZ29yYW5kLXR5cGVzY3JpcHQvYXJjNC9pbmRleC5kLnRzOjpDb250cmFjdC5hcHByb3ZhbFByb2dyYW0oKSAtPiB1aW50NjQ6Cm1haW46CiAgICBpbnRjYmxvY2sgMCAyIDEgOAogICAgYnl0ZWNibG9jayAibGlzdGluZ18iIDB4MTUxZjdjNzUwMDIwIDB4MDAwNgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI3CiAgICAvLyBleHBvcnQgY2xhc3MgQWxnb01pbnRYIGV4dGVuZHMgQ29udHJhY3QgewogICAgdHhuIE51bUFwcEFyZ3MKICAgIGJ6IG1haW5fX19hbGdvdHNfXy5kZWZhdWx0Q3JlYXRlQDE5CiAgICB0eG4gT25Db21wbGV0aW9uCiAgICAhCiAgICBhc3NlcnQgLy8gT25Db21wbGV0aW9uIG11c3QgYmUgTm9PcAogICAgdHhuIEFwcGxpY2F0aW9uSUQKICAgIGFzc2VydAogICAgcHVzaGJ5dGVzcyAweDU5YmRjMjAwIDB4OWRiODZhOGUgMHg2NzNhZDAwYyAweDE2YTRiNDJlIDB4NWQyYWQyYTAgMHhlMzk4NjY0MCAweGM5MDc5ZTlhIDB4MDYyNDBkZjMgMHg5OGJmOTA2ZCAweGFlZmYwNDBiIDB4NTVkOTUyNWIgMHgxNGVlOGFmYiAvLyBtZXRob2QgImFkZE5GVExpc3RpbmcodWludDY0LHN0cmluZyxzdHJpbmcsc3RyaW5nKWJ5dGVbXSIsIG1ldGhvZCAiZ2V0TkZUTGlzdGluZyhzdHJpbmcsdWludDY0KShzdHJpbmcsc3RyaW5nLHN0cmluZykiLCBtZXRob2QgInJlbW92ZU5GVExpc3Rpbmcoc3RyaW5nLHVpbnQ2NClieXRlW10iLCBtZXRob2QgImNvbnRyYWN0T3B0SW5Ub05GVChzdHJpbmcsdWludDY0KWJ5dGVbXSIsIG1ldGhvZCAidHJhbnNmZXJORlRUb0NvbnRyYWN0QW5kQWRkTGlzdGluZyh1aW50NjQsc3RyaW5nLHN0cmluZyxzdHJpbmcpYnl0ZVtdIiwgbWV0aG9kICJ0cmFuc2Zlck5GVFRvQ29udHJhY3Qoc3RyaW5nLHVpbnQ2NClieXRlW10iLCBtZXRob2QgInRyYW5zZmVyTkZUVG9SZWNlaXZlcihzdHJpbmcsdWludDY0LHN0cmluZylieXRlW10iLCBtZXRob2QgInRyYW5zZmVyTkZUVG9TZWxsZXIoc3RyaW5nLHVpbnQ2NCxzdHJpbmcpYnl0ZVtdIiwgbWV0aG9kICJ0cmFuc2Zlck5GVFRvUmVjZWl2ZXJBbmRSZW1vdmVMaXN0aW5nKHVpbnQ2NCxzdHJpbmcsc3RyaW5nKWJ5dGVbXSIsIG1ldGhvZCAidHJhbnNmZXJORlRUb1NlbGxlckFuZFJlbW92ZUxpc3RpbmcodWludDY0LHN0cmluZyxzdHJpbmcpYnl0ZVtdIiwgbWV0aG9kICJmdW5kQ29udHJhY3QodWludDY0KXZvaWQiLCBtZXRob2QgIndpdGhkcmF3RXhjZXNzRnVuZHMoKXZvaWQiCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAwCiAgICBtYXRjaCBhZGRORlRMaXN0aW5nIGdldE5GVExpc3RpbmcgcmVtb3ZlTkZUTGlzdGluZyBjb250cmFjdE9wdEluVG9ORlQgdHJhbnNmZXJORlRUb0NvbnRyYWN0QW5kQWRkTGlzdGluZyB0cmFuc2Zlck5GVFRvQ29udHJhY3QgdHJhbnNmZXJORlRUb1JlY2VpdmVyIHRyYW5zZmVyTkZUVG9TZWxsZXIgdHJhbnNmZXJORlRUb1JlY2VpdmVyQW5kUmVtb3ZlTGlzdGluZyB0cmFuc2Zlck5GVFRvU2VsbGVyQW5kUmVtb3ZlTGlzdGluZyBmdW5kQ29udHJhY3Qgd2l0aGRyYXdFeGNlc3NGdW5kcwogICAgZXJyCgptYWluX19fYWxnb3RzX18uZGVmYXVsdENyZWF0ZUAxOToKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNwogICAgLy8gZXhwb3J0IGNsYXNzIEFsZ29NaW50WCBleHRlbmRzIENvbnRyYWN0IHsKICAgIHR4biBPbkNvbXBsZXRpb24KICAgICEKICAgIHR4biBBcHBsaWNhdGlvbklECiAgICAhCiAgICAmJgogICAgYXNzZXJ0IC8vIE9uQ29tcGxldGlvbiBtdXN0IGJlIE5vT3AgJiYgY2FuIG9ubHkgY2FsbCB3aGVuIGNyZWF0aW5nCiAgICBpbnRjXzIgLy8gMQogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjpBbGdvTWludFguYWRkTkZUTGlzdGluZ1tyb3V0aW5nXSgpIC0+IHZvaWQ6CmFkZE5GVExpc3Rpbmc6CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NDIKICAgIC8vIEBhYmltZXRob2QoKQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgZHVwCiAgICBsZW4KICAgIGludGNfMyAvLyA4CiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LnVpbnQ2NAogICAgYnRvaQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYgLy8gb24gZXJyb3I6IGludmFsaWQgYXJyYXkgbGVuZ3RoIGhlYWRlcgogICAgaW50Y18xIC8vIDIKICAgICsKICAgIGRpZyAxCiAgICBsZW4KICAgIGR1cAogICAgdW5jb3ZlciAyCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDMKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICBkdXAKICAgIHVuY292ZXIgMgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyA0CiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICBkdXAKICAgIGV4dHJhY3QgMiAwCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NDkKICAgIC8vIGNvbnN0IGxpc3RpbmdLZXkgPSB0aGlzLmJ1aWxkTGlzdGluZ0tleShtYXJrZXRwbGFjZSwgYXNzZXRJZCk7CiAgICB1bmNvdmVyIDYKICAgIGNhbGxzdWIgYnVpbGRMaXN0aW5nS2V5CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjkKICAgIC8vIHByaXZhdGUgbGlzdGluZ3MgPSBCb3hNYXA8Ynl0ZXMsIExpc3Rpbmc+KHsga2V5UHJlZml4OiAibGlzdGluZ18iIH0pOwogICAgYnl0ZWNfMCAvLyAibGlzdGluZ18iCiAgICBzd2FwCiAgICBjb25jYXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo1MgogICAgLy8gIXRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgZHVwCiAgICBib3hfbGVuCiAgICBidXJ5IDEKICAgICEKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo1MS01NAogICAgLy8gYXNzZXJ0KAogICAgLy8gICAhdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICAvLyAgICJBIGxpc3RpbmcgYWxyZWFkeSBleGlzdHMgZm9yIHRoaXMgTkZUIgogICAgLy8gKTsKICAgIGFzc2VydCAvLyBBIGxpc3RpbmcgYWxyZWFkeSBleGlzdHMgZm9yIHRoaXMgTkZUCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NTYtNjAKICAgIC8vIGNvbnN0IHZhbHVlID0gbmV3IExpc3RpbmcoewogICAgLy8gICBzZWxsZXI6IG5ldyBhcmM0LlN0cihzZW5kZXJXYWxsZXRBZGRyZXNzKSwKICAgIC8vICAgbmZ0UHJpY2U6IG5ldyBhcmM0LlN0cihuZnRQcmljZSksCiAgICAvLyAgIG1hcmtldHBsYWNlOiBuZXcgYXJjNC5TdHIobWFya2V0cGxhY2UpLAogICAgLy8gfSk7CiAgICBwdXNoaW50IDYgLy8gNgogICAgdW5jb3ZlciA1CiAgICArCiAgICBkdXAKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBieXRlY18yIC8vIDB4MDAwNgogICAgc3dhcAogICAgY29uY2F0CiAgICBzd2FwCiAgICB1bmNvdmVyIDQKICAgICsKICAgIGl0b2IKICAgIGV4dHJhY3QgNiAyCiAgICBjb25jYXQKICAgIHVuY292ZXIgNAogICAgY29uY2F0CiAgICB1bmNvdmVyIDMKICAgIGNvbmNhdAogICAgdW5jb3ZlciAyCiAgICBjb25jYXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo2MgogICAgLy8gdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS52YWx1ZSA9IGNsb25lKHZhbHVlKTsKICAgIGRpZyAxCiAgICBib3hfZGVsCiAgICBwb3AKICAgIGJveF9wdXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo0MgogICAgLy8gQGFiaW1ldGhvZCgpCiAgICBieXRlY18xIC8vIDB4MTUxZjdjNzUwMDIwCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NjQKICAgIC8vIHJldHVybiBUeG4udHhJZDsKICAgIHR4biBUeElECiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NDIKICAgIC8vIEBhYmltZXRob2QoKQogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC5nZXRORlRMaXN0aW5nW3JvdXRpbmddKCkgLT4gdm9pZDoKZ2V0TkZUTGlzdGluZzoKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo2NwogICAgLy8gQGFiaW1ldGhvZCh7IHJlYWRvbmx5OiB0cnVlIH0pCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICBleHRyYWN0IDIgMAogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgZHVwCiAgICBsZW4KICAgIGludGNfMyAvLyA4CiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LnVpbnQ2NAogICAgYnRvaQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjY5CiAgICAvLyBjb25zdCBsaXN0aW5nS2V5ID0gdGhpcy5idWlsZExpc3RpbmdLZXkobWFya2V0cGxhY2UsIGFzc2V0SWQpOwogICAgY2FsbHN1YiBidWlsZExpc3RpbmdLZXkKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOQogICAgLy8gcHJpdmF0ZSBsaXN0aW5ncyA9IEJveE1hcDxieXRlcywgTGlzdGluZz4oeyBrZXlQcmVmaXg6ICJsaXN0aW5nXyIgfSk7CiAgICBieXRlY18wIC8vICJsaXN0aW5nXyIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjcyCiAgICAvLyB0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIGR1cAogICAgYm94X2xlbgogICAgYnVyeSAxCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NzEtNzQKICAgIC8vIGFzc2VydCgKICAgIC8vICAgdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICAvLyAgICJObyBhY3RpdmUgbGlzdGluZyBmb3VuZCBmb3IgdGhpcyBORlQiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE5vIGFjdGl2ZSBsaXN0aW5nIGZvdW5kIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjc2CiAgICAvLyByZXR1cm4gY2xvbmUodGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS52YWx1ZSk7CiAgICBib3hfZ2V0CiAgICBwb3AKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo2NwogICAgLy8gQGFiaW1ldGhvZCh7IHJlYWRvbmx5OiB0cnVlIH0pCiAgICBwdXNoYnl0ZXMgMHgxNTFmN2M3NQogICAgc3dhcAogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC5yZW1vdmVORlRMaXN0aW5nW3JvdXRpbmddKCkgLT4gdm9pZDoKcmVtb3ZlTkZUTGlzdGluZzoKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo3OQogICAgLy8gQGFiaW1ldGhvZCgpCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICBleHRyYWN0IDIgMAogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgZHVwCiAgICBsZW4KICAgIGludGNfMyAvLyA4CiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LnVpbnQ2NAogICAgYnRvaQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjgxCiAgICAvLyBjb25zdCBsaXN0aW5nS2V5ID0gdGhpcy5idWlsZExpc3RpbmdLZXkobWFya2V0cGxhY2UsIGFzc2V0SWQpOwogICAgY2FsbHN1YiBidWlsZExpc3RpbmdLZXkKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOQogICAgLy8gcHJpdmF0ZSBsaXN0aW5ncyA9IEJveE1hcDxieXRlcywgTGlzdGluZz4oeyBrZXlQcmVmaXg6ICJsaXN0aW5nXyIgfSk7CiAgICBieXRlY18wIC8vICJsaXN0aW5nXyIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjg0CiAgICAvLyB0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIGR1cAogICAgYm94X2xlbgogICAgYnVyeSAxCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6ODMtODYKICAgIC8vIGFzc2VydCgKICAgIC8vICAgdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICAvLyAgICJObyBhY3RpdmUgbGlzdGluZyBmb3VuZCBmb3IgdGhpcyBORlQiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE5vIGFjdGl2ZSBsaXN0aW5nIGZvdW5kIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjg4CiAgICAvLyB0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmRlbGV0ZSgpOwogICAgYm94X2RlbAogICAgcG9wCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6NzkKICAgIC8vIEBhYmltZXRob2QoKQogICAgYnl0ZWNfMSAvLyAweDE1MWY3Yzc1MDAyMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjkwCiAgICAvLyByZXR1cm4gVHhuLnR4SWQ7CiAgICB0eG4gVHhJRAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjc5CiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzIgLy8gMQogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjpBbGdvTWludFguY29udHJhY3RPcHRJblRvTkZUW3JvdXRpbmddKCkgLT4gdm9pZDoKY29udHJhY3RPcHRJblRvTkZUOgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjk4CiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIGV4dHJhY3QgMiAwCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBkdXAKICAgIGxlbgogICAgaW50Y18zIC8vIDgKICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQudWludDY0CiAgICBidG9pCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTAwCiAgICAvLyBjb25zdCBsaXN0aW5nS2V5ID0gdGhpcy5idWlsZExpc3RpbmdLZXkobWFya2V0cGxhY2UsIGFzc2V0SWQpOwogICAgc3dhcAogICAgZGlnIDEKICAgIGNhbGxzdWIgYnVpbGRMaXN0aW5nS2V5CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjkKICAgIC8vIHByaXZhdGUgbGlzdGluZ3MgPSBCb3hNYXA8Ynl0ZXMsIExpc3Rpbmc+KHsga2V5UHJlZml4OiAibGlzdGluZ18iIH0pOwogICAgYnl0ZWNfMCAvLyAibGlzdGluZ18iCiAgICBzd2FwCiAgICBjb25jYXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMDMKICAgIC8vICF0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIGJveF9sZW4KICAgIGJ1cnkgMQogICAgIQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEwMi0xMDUKICAgIC8vIGFzc2VydCgKICAgIC8vICAgIXRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgLy8gICAiQSBsaXN0aW5nIGFscmVhZHkgZXhpc3RzIGZvciB0aGlzIE5GVCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gQSBsaXN0aW5nIGFscmVhZHkgZXhpc3RzIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEwNy0xMTQKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMCwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fYmVnaW4KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMDkKICAgIC8vIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMTEKICAgIC8vIGFzc2V0QW1vdW50OiAwLAogICAgaW50Y18wIC8vIDAKICAgIGl0eG5fZmllbGQgQXNzZXRBbW91bnQKICAgIGl0eG5fZmllbGQgQXNzZXRSZWNlaXZlcgogICAgaXR4bl9maWVsZCBYZmVyQXNzZXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMDctMTEzCiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDAsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgcHVzaGludCA0IC8vIDQKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMTIKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEwNy0xMTQKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMCwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OTgKICAgIC8vIEBhYmltZXRob2QoKQogICAgYnl0ZWNfMSAvLyAweDE1MWY3Yzc1MDAyMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjExNgogICAgLy8gcmV0dXJuIFR4bi50eElkOwogICAgdHhuIFR4SUQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo5OAogICAgLy8gQGFiaW1ldGhvZCgpCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18yIC8vIDEKICAgIHJldHVybgoKCi8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo6QWxnb01pbnRYLnRyYW5zZmVyTkZUVG9Db250cmFjdEFuZEFkZExpc3Rpbmdbcm91dGluZ10oKSAtPiB2b2lkOgp0cmFuc2Zlck5GVFRvQ29udHJhY3RBbmRBZGRMaXN0aW5nOgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEyNAogICAgLy8gQGFiaW1ldGhvZCgpCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBkdXAKICAgIGxlbgogICAgaW50Y18zIC8vIDgKICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQudWludDY0CiAgICBidG9pCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgZHVwCiAgICB1bmNvdmVyIDIKICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQuZHluYW1pY19hcnJheTxhcmM0LnVpbnQ4PgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYgLy8gb24gZXJyb3I6IGludmFsaWQgYXJyYXkgbGVuZ3RoIGhlYWRlcgogICAgaW50Y18xIC8vIDIKICAgICsKICAgIGRpZyAxCiAgICBsZW4KICAgIGR1cAogICAgdW5jb3ZlciAyCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDQKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIGR1cAogICAgZXh0cmFjdCAyIDAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMzEKICAgIC8vIGNvbnN0IGxpc3RpbmdLZXkgPSB0aGlzLmJ1aWxkTGlzdGluZ0tleShtYXJrZXRwbGFjZSwgYXNzZXRJZCk7CiAgICBkaWcgNgogICAgY2FsbHN1YiBidWlsZExpc3RpbmdLZXkKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOQogICAgLy8gcHJpdmF0ZSBsaXN0aW5ncyA9IEJveE1hcDxieXRlcywgTGlzdGluZz4oeyBrZXlQcmVmaXg6ICJsaXN0aW5nXyIgfSk7CiAgICBieXRlY18wIC8vICJsaXN0aW5nXyIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEzNAogICAgLy8gIXRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgZHVwCiAgICBib3hfbGVuCiAgICBidXJ5IDEKICAgICEKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMzMtMTM2CiAgICAvLyBhc3NlcnQoCiAgICAvLyAgICF0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIC8vICAgIkEgbGlzdGluZyBhbHJlYWR5IGV4aXN0cyBmb3IgdGhpcyBORlQiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIEEgbGlzdGluZyBhbHJlYWR5IGV4aXN0cyBmb3IgdGhpcyBORlQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMzgtMTQ1CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDAsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTQwCiAgICAvLyBhc3NldFJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIGdsb2JhbCBDdXJyZW50QXBwbGljYXRpb25BZGRyZXNzCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTQyCiAgICAvLyBhc3NldEFtb3VudDogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEFzc2V0QW1vdW50CiAgICB1bmNvdmVyIDcKICAgIGl0eG5fZmllbGQgWGZlckFzc2V0CiAgICBpdHhuX2ZpZWxkIEFzc2V0UmVjZWl2ZXIKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMzgtMTQ0CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDAsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgcHVzaGludCA0IC8vIDQKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNDMKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjEzOC0xNDUKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMCwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTQ3LTE1MQogICAgLy8gY29uc3QgdmFsdWUgPSBuZXcgTGlzdGluZyh7CiAgICAvLyAgIHNlbGxlcjogbmV3IGFyYzQuU3RyKHNlbmRlcldhbGxldEFkZHJlc3MpLAogICAgLy8gICBuZnRQcmljZTogbmV3IGFyYzQuU3RyKG5mdFByaWNlKSwKICAgIC8vICAgbWFya2V0cGxhY2U6IG5ldyBhcmM0LlN0cihtYXJrZXRwbGFjZSksCiAgICAvLyB9KTsKICAgIHB1c2hpbnQgNiAvLyA2CiAgICB1bmNvdmVyIDUKICAgICsKICAgIGR1cAogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGJ5dGVjXzIgLy8gMHgwMDA2CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHN3YXAKICAgIHVuY292ZXIgNAogICAgKwogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGNvbmNhdAogICAgdW5jb3ZlciA0CiAgICBjb25jYXQKICAgIHVuY292ZXIgMwogICAgY29uY2F0CiAgICB1bmNvdmVyIDIKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE1MwogICAgLy8gdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS52YWx1ZSA9IGNsb25lKHZhbHVlKTsKICAgIGRpZyAxCiAgICBib3hfZGVsCiAgICBwb3AKICAgIGJveF9wdXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMjQKICAgIC8vIEBhYmltZXRob2QoKQogICAgYnl0ZWNfMSAvLyAweDE1MWY3Yzc1MDAyMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE1NQogICAgLy8gcmV0dXJuIFR4bi50eElkOwogICAgdHhuIFR4SUQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxMjQKICAgIC8vIEBhYmltZXRob2QoKQogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC50cmFuc2Zlck5GVFRvQ29udHJhY3Rbcm91dGluZ10oKSAtPiB2b2lkOgp0cmFuc2Zlck5GVFRvQ29udHJhY3Q6CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTYxCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIGV4dHJhY3QgMiAwCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBkdXAKICAgIGxlbgogICAgaW50Y18zIC8vIDgKICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQudWludDY0CiAgICBidG9pCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTYzCiAgICAvLyBjb25zdCBsaXN0aW5nS2V5ID0gdGhpcy5idWlsZExpc3RpbmdLZXkobWFya2V0cGxhY2UsIGFzc2V0SWQpOwogICAgc3dhcAogICAgZGlnIDEKICAgIGNhbGxzdWIgYnVpbGRMaXN0aW5nS2V5CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjkKICAgIC8vIHByaXZhdGUgbGlzdGluZ3MgPSBCb3hNYXA8Ynl0ZXMsIExpc3Rpbmc+KHsga2V5UHJlZml4OiAibGlzdGluZ18iIH0pOwogICAgYnl0ZWNfMCAvLyAibGlzdGluZ18iCiAgICBzd2FwCiAgICBjb25jYXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNjYKICAgIC8vICF0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIGJveF9sZW4KICAgIGJ1cnkgMQogICAgIQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE2NS0xNjgKICAgIC8vIGFzc2VydCgKICAgIC8vICAgIXRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgLy8gICAiQSBsaXN0aW5nIGFscmVhZHkgZXhpc3RzIGZvciB0aGlzIE5GVCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gQSBsaXN0aW5nIGFscmVhZHkgZXhpc3RzIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE3MC0xNzcKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMCwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fYmVnaW4KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNzIKICAgIC8vIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNzQKICAgIC8vIGFzc2V0QW1vdW50OiAwLAogICAgaW50Y18wIC8vIDAKICAgIGl0eG5fZmllbGQgQXNzZXRBbW91bnQKICAgIGl0eG5fZmllbGQgQXNzZXRSZWNlaXZlcgogICAgaXR4bl9maWVsZCBYZmVyQXNzZXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNzAtMTc2CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDAsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgcHVzaGludCA0IC8vIDQKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNzUKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE3MC0xNzcKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMCwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTYxCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGJ5dGVjXzEgLy8gMHgxNTFmN2M3NTAwMjAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxNzkKICAgIC8vIHJldHVybiBUeG4udHhJZDsKICAgIHR4biBUeElECiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTYxCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzIgLy8gMQogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjpBbGdvTWludFgudHJhbnNmZXJORlRUb1JlY2VpdmVyW3JvdXRpbmddKCkgLT4gdm9pZDoKdHJhbnNmZXJORlRUb1JlY2VpdmVyOgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE4MgogICAgLy8gQGFiaW1ldGhvZCgpCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAxCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICBleHRyYWN0IDIgMAogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgZHVwCiAgICBsZW4KICAgIGludGNfMyAvLyA4CiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LnVpbnQ2NAogICAgYnRvaQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYgLy8gb24gZXJyb3I6IGludmFsaWQgYXJyYXkgbGVuZ3RoIGhlYWRlcgogICAgaW50Y18xIC8vIDIKICAgICsKICAgIGRpZyAxCiAgICBsZW4KICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQuZHluYW1pY19hcnJheTxhcmM0LnVpbnQ4PgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE4OAogICAgLy8gY29uc3QgbGlzdGluZ0tleSA9IHRoaXMuYnVpbGRMaXN0aW5nS2V5KG1hcmtldHBsYWNlLCBhc3NldElkKTsKICAgIHVuY292ZXIgMgogICAgZGlnIDIKICAgIGNhbGxzdWIgYnVpbGRMaXN0aW5nS2V5CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjkKICAgIC8vIHByaXZhdGUgbGlzdGluZ3MgPSBCb3hNYXA8Ynl0ZXMsIExpc3Rpbmc+KHsga2V5UHJlZml4OiAibGlzdGluZ18iIH0pOwogICAgYnl0ZWNfMCAvLyAibGlzdGluZ18iCiAgICBzd2FwCiAgICBjb25jYXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxOTEKICAgIC8vIHRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgZHVwCiAgICBib3hfbGVuCiAgICBidXJ5IDEKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxOTAtMTkzCiAgICAvLyBhc3NlcnQoCiAgICAvLyAgIHRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZXhpc3RzLAogICAgLy8gICAiTm8gYWN0aXZlIGxpc3RpbmcgZm91bmQgZm9yIHRoaXMgTkZUIgogICAgLy8gKTsKICAgIGFzc2VydCAvLyBObyBhY3RpdmUgbGlzdGluZyBmb3VuZCBmb3IgdGhpcyBORlQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoxOTUKICAgIC8vIGNvbnN0IGxpc3RpbmcgPSBjbG9uZSh0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLnZhbHVlKTsKICAgIGJveF9nZXQKICAgIHBvcAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE5OAogICAgLy8gbGlzdGluZy5zZWxsZXIgPT09IG5ldyBhcmM0LlN0cihzZWxsZXJXYWxsZXRBZGRyZXNzKSwKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMQogICAgaW50Y18xIC8vIDIKICAgIGV4dHJhY3RfdWludDE2CiAgICBzdWJzdHJpbmczCiAgICA9PQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjE5Ny0yMDAKICAgIC8vIGFzc2VydCgKICAgIC8vICAgbGlzdGluZy5zZWxsZXIgPT09IG5ldyBhcmM0LlN0cihzZWxsZXJXYWxsZXRBZGRyZXNzKSwKICAgIC8vICAgIlNlbGxlciB3YWxsZXQgYWRkcmVzcyBkb2VzIG5vdCBtYXRjaCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gU2VsbGVyIHdhbGxldCBhZGRyZXNzIGRvZXMgbm90IG1hdGNoCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjAyLTIwOQogICAgLy8gaXR4bgogICAgLy8gICAuYXNzZXRUcmFuc2Zlcih7CiAgICAvLyAgICAgYXNzZXRSZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDEsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjA0CiAgICAvLyBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgdHhuIFNlbmRlcgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIwNgogICAgLy8gYXNzZXRBbW91bnQ6IDEsCiAgICBpbnRjXzIgLy8gMQogICAgaXR4bl9maWVsZCBBc3NldEFtb3VudAogICAgaXR4bl9maWVsZCBBc3NldFJlY2VpdmVyCiAgICBpdHhuX2ZpZWxkIFhmZXJBc3NldAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIwMi0yMDgKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICAvLyAgICAgeGZlckFzc2V0OiBhc3NldElkLAogICAgLy8gICAgIGFzc2V0QW1vdW50OiAxLAogICAgLy8gICAgIGZlZTogMCwKICAgIC8vICAgfSkKICAgIHB1c2hpbnQgNCAvLyA0CiAgICBpdHhuX2ZpZWxkIFR5cGVFbnVtCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjA3CiAgICAvLyBmZWU6IDAsCiAgICBpbnRjXzAgLy8gMAogICAgaXR4bl9maWVsZCBGZWUKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMDItMjA5CiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMSwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTgyCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGJ5dGVjXzEgLy8gMHgxNTFmN2M3NTAwMjAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMTEKICAgIC8vIHJldHVybiBUeG4udHhJZDsKICAgIHR4biBUeElECiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MTgyCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGNvbmNhdAogICAgbG9nCiAgICBpbnRjXzIgLy8gMQogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjpBbGdvTWludFgudHJhbnNmZXJORlRUb1NlbGxlcltyb3V0aW5nXSgpIC0+IHZvaWQ6CnRyYW5zZmVyTkZUVG9TZWxsZXI6CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjE0CiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIGV4dHJhY3QgMiAwCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAyCiAgICBkdXAKICAgIGxlbgogICAgaW50Y18zIC8vIDgKICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQudWludDY0CiAgICBidG9pCiAgICB0eG5hIEFwcGxpY2F0aW9uQXJncyAzCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNiAvLyBvbiBlcnJvcjogaW52YWxpZCBhcnJheSBsZW5ndGggaGVhZGVyCiAgICBpbnRjXzEgLy8gMgogICAgKwogICAgZGlnIDEKICAgIGxlbgogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC5keW5hbWljX2FycmF5PGFyYzQudWludDg+CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjIwCiAgICAvLyBjb25zdCBsaXN0aW5nS2V5ID0gdGhpcy5idWlsZExpc3RpbmdLZXkobWFya2V0cGxhY2UsIGFzc2V0SWQpOwogICAgdW5jb3ZlciAyCiAgICBkaWcgMgogICAgY2FsbHN1YiBidWlsZExpc3RpbmdLZXkKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOQogICAgLy8gcHJpdmF0ZSBsaXN0aW5ncyA9IEJveE1hcDxieXRlcywgTGlzdGluZz4oeyBrZXlQcmVmaXg6ICJsaXN0aW5nXyIgfSk7CiAgICBieXRlY18wIC8vICJsaXN0aW5nXyIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIyMwogICAgLy8gdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICBkdXAKICAgIGJveF9sZW4KICAgIGJ1cnkgMQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIyMi0yMjUKICAgIC8vIGFzc2VydCgKICAgIC8vICAgdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICAvLyAgICJObyBhY3RpdmUgbGlzdGluZyBmb3VuZCBmb3IgdGhpcyBORlQiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE5vIGFjdGl2ZSBsaXN0aW5nIGZvdW5kIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIyNwogICAgLy8gY29uc3QgbGlzdGluZyA9IGNsb25lKHRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkudmFsdWUpOwogICAgYm94X2dldAogICAgcG9wCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjMwCiAgICAvLyBsaXN0aW5nLnNlbGxlciA9PT0gbmV3IGFyYzQuU3RyKHNlbGxlcldhbGxldEFkZHJlc3MpLAogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAxCiAgICBpbnRjXzEgLy8gMgogICAgZXh0cmFjdF91aW50MTYKICAgIHN1YnN0cmluZzMKICAgID09CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjI5LTIzMgogICAgLy8gYXNzZXJ0KAogICAgLy8gICBsaXN0aW5nLnNlbGxlciA9PT0gbmV3IGFyYzQuU3RyKHNlbGxlcldhbGxldEFkZHJlc3MpLAogICAgLy8gICAiU2VsbGVyIHdhbGxldCBhZGRyZXNzIGRvZXMgbm90IG1hdGNoIgogICAgLy8gKTsKICAgIGFzc2VydCAvLyBTZWxsZXIgd2FsbGV0IGFkZHJlc3MgZG9lcyBub3QgbWF0Y2gKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMzQtMjQxCiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMSwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fYmVnaW4KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMzYKICAgIC8vIGFzc2V0UmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICB0eG4gU2VuZGVyCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjM4CiAgICAvLyBhc3NldEFtb3VudDogMSwKICAgIGludGNfMiAvLyAxCiAgICBpdHhuX2ZpZWxkIEFzc2V0QW1vdW50CiAgICBpdHhuX2ZpZWxkIEFzc2V0UmVjZWl2ZXIKICAgIGl0eG5fZmllbGQgWGZlckFzc2V0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjM0LTI0MAogICAgLy8gaXR4bgogICAgLy8gICAuYXNzZXRUcmFuc2Zlcih7CiAgICAvLyAgICAgYXNzZXRSZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDEsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgcHVzaGludCA0IC8vIDQKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMzkKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjIzNC0yNDEKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICAvLyAgICAgeGZlckFzc2V0OiBhc3NldElkLAogICAgLy8gICAgIGFzc2V0QW1vdW50OiAxLAogICAgLy8gICAgIGZlZTogMCwKICAgIC8vICAgfSkKICAgIC8vICAgLnN1Ym1pdCgpOwogICAgaXR4bl9zdWJtaXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMTQKICAgIC8vIEBhYmltZXRob2QoKQogICAgYnl0ZWNfMSAvLyAweDE1MWY3Yzc1MDAyMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI0MwogICAgLy8gcmV0dXJuIFR4bi50eElkOwogICAgdHhuIFR4SUQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyMTQKICAgIC8vIEBhYmltZXRob2QoKQogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC50cmFuc2Zlck5GVFRvUmVjZWl2ZXJBbmRSZW1vdmVMaXN0aW5nW3JvdXRpbmddKCkgLT4gdm9pZDoKdHJhbnNmZXJORlRUb1JlY2VpdmVyQW5kUmVtb3ZlTGlzdGluZzoKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNTAKICAgIC8vIEBhYmltZXRob2QoKQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMQogICAgZHVwCiAgICBsZW4KICAgIGludGNfMyAvLyA4CiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LnVpbnQ2NAogICAgYnRvaQogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMgogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYgLy8gb24gZXJyb3I6IGludmFsaWQgYXJyYXkgbGVuZ3RoIGhlYWRlcgogICAgaW50Y18xIC8vIDIKICAgICsKICAgIGRpZyAxCiAgICBsZW4KICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQuZHluYW1pY19hcnJheTxhcmM0LnVpbnQ4PgogICAgdHhuYSBBcHBsaWNhdGlvbkFyZ3MgMwogICAgZHVwCiAgICBpbnRjXzAgLy8gMAogICAgZXh0cmFjdF91aW50MTYgLy8gb24gZXJyb3I6IGludmFsaWQgYXJyYXkgbGVuZ3RoIGhlYWRlcgogICAgaW50Y18xIC8vIDIKICAgICsKICAgIGRpZyAxCiAgICBsZW4KICAgID09CiAgICBhc3NlcnQgLy8gaW52YWxpZCBudW1iZXIgb2YgYnl0ZXMgZm9yIGFyYzQuZHluYW1pY19hcnJheTxhcmM0LnVpbnQ4PgogICAgZHVwCiAgICBleHRyYWN0IDIgMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI1NgogICAgLy8gY29uc3QgbGlzdGluZ0tleSA9IHRoaXMuYnVpbGRMaXN0aW5nS2V5KG1hcmtldHBsYWNlLCBhc3NldElkKTsKICAgIGRpZyAzCiAgICBjYWxsc3ViIGJ1aWxkTGlzdGluZ0tleQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI5CiAgICAvLyBwcml2YXRlIGxpc3RpbmdzID0gQm94TWFwPGJ5dGVzLCBMaXN0aW5nPih7IGtleVByZWZpeDogImxpc3RpbmdfIiB9KTsKICAgIGJ5dGVjXzAgLy8gImxpc3RpbmdfIgogICAgc3dhcAogICAgY29uY2F0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjU5CiAgICAvLyB0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIGR1cAogICAgYm94X2xlbgogICAgYnVyeSAxCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjU4LTI2MQogICAgLy8gYXNzZXJ0KAogICAgLy8gICB0aGlzLmxpc3RpbmdzKGxpc3RpbmdLZXkpLmV4aXN0cywKICAgIC8vICAgIk5vIGFjdGl2ZSBsaXN0aW5nIGZvdW5kIGZvciB0aGlzIE5GVCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gTm8gYWN0aXZlIGxpc3RpbmcgZm91bmQgZm9yIHRoaXMgTkZUCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjYzCiAgICAvLyBjb25zdCBsaXN0aW5nID0gY2xvbmUodGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS52YWx1ZSk7CiAgICBkdXAKICAgIGJveF9nZXQKICAgIHBvcAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI2NgogICAgLy8gbGlzdGluZy5zZWxsZXIgPT09IG5ldyBhcmM0LlN0cihzZWxsZXJXYWxsZXRBZGRyZXNzKSwKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMQogICAgaW50Y18xIC8vIDIKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMgogICAgY292ZXIgMgogICAgc3Vic3RyaW5nMwogICAgdW5jb3ZlciA0CiAgICA9PQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI2NS0yNjgKICAgIC8vIGFzc2VydCgKICAgIC8vICAgbGlzdGluZy5zZWxsZXIgPT09IG5ldyBhcmM0LlN0cihzZWxsZXJXYWxsZXRBZGRyZXNzKSwKICAgIC8vICAgIlNlbGxlciB3YWxsZXQgYWRkcmVzcyBkb2VzIG5vdCBtYXRjaCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gU2VsbGVyIHdhbGxldCBhZGRyZXNzIGRvZXMgbm90IG1hdGNoCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MjcxCiAgICAvLyBsaXN0aW5nLm1hcmtldHBsYWNlID09PSBuZXcgYXJjNC5TdHIobWFya2V0cGxhY2UpLAogICAgZHVwCiAgICBwdXNoaW50IDQgLy8gNAogICAgZXh0cmFjdF91aW50MTYKICAgIGRpZyAxCiAgICBsZW4KICAgIHN1YnN0cmluZzMKICAgIHVuY292ZXIgMgogICAgPT0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNzAtMjczCiAgICAvLyBhc3NlcnQoCiAgICAvLyAgIGxpc3RpbmcubWFya2V0cGxhY2UgPT09IG5ldyBhcmM0LlN0cihtYXJrZXRwbGFjZSksCiAgICAvLyAgICJNYXJrZXRwbGFjZSBkb2VzIG5vdCBtYXRjaCIKICAgIC8vICk7CiAgICBhc3NlcnQgLy8gTWFya2V0cGxhY2UgZG9lcyBub3QgbWF0Y2gKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNzUtMjgyCiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMSwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fYmVnaW4KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNzcKICAgIC8vIGFzc2V0UmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICB0eG4gU2VuZGVyCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6Mjc5CiAgICAvLyBhc3NldEFtb3VudDogMSwKICAgIGludGNfMiAvLyAxCiAgICBpdHhuX2ZpZWxkIEFzc2V0QW1vdW50CiAgICB1bmNvdmVyIDIKICAgIGl0eG5fZmllbGQgWGZlckFzc2V0CiAgICBpdHhuX2ZpZWxkIEFzc2V0UmVjZWl2ZXIKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyNzUtMjgxCiAgICAvLyBpdHhuCiAgICAvLyAgIC5hc3NldFRyYW5zZmVyKHsKICAgIC8vICAgICBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgLy8gICAgIHhmZXJBc3NldDogYXNzZXRJZCwKICAgIC8vICAgICBhc3NldEFtb3VudDogMSwKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICBwdXNoaW50IDQgLy8gNAogICAgaXR4bl9maWVsZCBUeXBlRW51bQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI4MAogICAgLy8gZmVlOiAwLAogICAgaW50Y18wIC8vIDAKICAgIGl0eG5fZmllbGQgRmVlCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6Mjc1LTI4MgogICAgLy8gaXR4bgogICAgLy8gICAuYXNzZXRUcmFuc2Zlcih7CiAgICAvLyAgICAgYXNzZXRSZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDEsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI4NAogICAgLy8gdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5kZWxldGUoKTsKICAgIGJveF9kZWwKICAgIHBvcAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI1MAogICAgLy8gQGFiaW1ldGhvZCgpCiAgICBieXRlY18xIC8vIDB4MTUxZjdjNzUwMDIwCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6Mjg2CiAgICAvLyByZXR1cm4gVHhuLnR4SWQ7CiAgICB0eG4gVHhJRAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI1MAogICAgLy8gQGFiaW1ldGhvZCgpCiAgICBjb25jYXQKICAgIGxvZwogICAgaW50Y18yIC8vIDEKICAgIHJldHVybgoKCi8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czo6QWxnb01pbnRYLnRyYW5zZmVyTkZUVG9TZWxsZXJBbmRSZW1vdmVMaXN0aW5nW3JvdXRpbmddKCkgLT4gdm9pZDoKdHJhbnNmZXJORlRUb1NlbGxlckFuZFJlbW92ZUxpc3Rpbmc6CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6Mjg5CiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGR1cAogICAgbGVuCiAgICBpbnRjXzMgLy8gOAogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC51aW50NjQKICAgIGJ0b2kKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDIKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDMKICAgIGR1cAogICAgaW50Y18wIC8vIDAKICAgIGV4dHJhY3RfdWludDE2IC8vIG9uIGVycm9yOiBpbnZhbGlkIGFycmF5IGxlbmd0aCBoZWFkZXIKICAgIGludGNfMSAvLyAyCiAgICArCiAgICBkaWcgMQogICAgbGVuCiAgICA9PQogICAgYXNzZXJ0IC8vIGludmFsaWQgbnVtYmVyIG9mIGJ5dGVzIGZvciBhcmM0LmR5bmFtaWNfYXJyYXk8YXJjNC51aW50OD4KICAgIGR1cAogICAgZXh0cmFjdCAyIDAKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOTUKICAgIC8vIGNvbnN0IGxpc3RpbmdLZXkgPSB0aGlzLmJ1aWxkTGlzdGluZ0tleShtYXJrZXRwbGFjZSwgYXNzZXRJZCk7CiAgICBkaWcgMwogICAgY2FsbHN1YiBidWlsZExpc3RpbmdLZXkKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyOQogICAgLy8gcHJpdmF0ZSBsaXN0aW5ncyA9IEJveE1hcDxieXRlcywgTGlzdGluZz4oeyBrZXlQcmVmaXg6ICJsaXN0aW5nXyIgfSk7CiAgICBieXRlY18wIC8vICJsaXN0aW5nXyIKICAgIHN3YXAKICAgIGNvbmNhdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI5OAogICAgLy8gdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICBkdXAKICAgIGJveF9sZW4KICAgIGJ1cnkgMQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjI5Ny0zMDAKICAgIC8vIGFzc2VydCgKICAgIC8vICAgdGhpcy5saXN0aW5ncyhsaXN0aW5nS2V5KS5leGlzdHMsCiAgICAvLyAgICJObyBhY3RpdmUgbGlzdGluZyBmb3VuZCBmb3IgdGhpcyBORlQiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE5vIGFjdGl2ZSBsaXN0aW5nIGZvdW5kIGZvciB0aGlzIE5GVAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMwMgogICAgLy8gY29uc3QgbGlzdGluZyA9IGNsb25lKHRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkudmFsdWUpOwogICAgZHVwCiAgICBib3hfZ2V0CiAgICBwb3AKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMDUKICAgIC8vIGxpc3Rpbmcuc2VsbGVyID09PSBuZXcgYXJjNC5TdHIoc2VsbGVyV2FsbGV0QWRkcmVzcyksCiAgICBkdXAKICAgIGludGNfMCAvLyAwCiAgICBleHRyYWN0X3VpbnQxNgogICAgZGlnIDEKICAgIGludGNfMSAvLyAyCiAgICBleHRyYWN0X3VpbnQxNgogICAgZGlnIDIKICAgIGNvdmVyIDIKICAgIHN1YnN0cmluZzMKICAgIHVuY292ZXIgNAogICAgPT0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMDQtMzA3CiAgICAvLyBhc3NlcnQoCiAgICAvLyAgIGxpc3Rpbmcuc2VsbGVyID09PSBuZXcgYXJjNC5TdHIoc2VsbGVyV2FsbGV0QWRkcmVzcyksCiAgICAvLyAgICJTZWxsZXIgd2FsbGV0IGFkZHJlc3MgZG9lcyBub3QgbWF0Y2giCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIFNlbGxlciB3YWxsZXQgYWRkcmVzcyBkb2VzIG5vdCBtYXRjaAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMxMAogICAgLy8gbGlzdGluZy5tYXJrZXRwbGFjZSA9PT0gbmV3IGFyYzQuU3RyKG1hcmtldHBsYWNlKSwKICAgIGR1cAogICAgcHVzaGludCA0IC8vIDQKICAgIGV4dHJhY3RfdWludDE2CiAgICBkaWcgMQogICAgbGVuCiAgICBzdWJzdHJpbmczCiAgICB1bmNvdmVyIDIKICAgID09CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzA5LTMxMgogICAgLy8gYXNzZXJ0KAogICAgLy8gICBsaXN0aW5nLm1hcmtldHBsYWNlID09PSBuZXcgYXJjNC5TdHIobWFya2V0cGxhY2UpLAogICAgLy8gICAiTWFya2V0cGxhY2UgZG9lcyBub3QgbWF0Y2giCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE1hcmtldHBsYWNlIGRvZXMgbm90IG1hdGNoCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzE0LTMyMQogICAgLy8gaXR4bgogICAgLy8gICAuYXNzZXRUcmFuc2Zlcih7CiAgICAvLyAgICAgYXNzZXRSZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDEsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzE2CiAgICAvLyBhc3NldFJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgdHhuIFNlbmRlcgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMxOAogICAgLy8gYXNzZXRBbW91bnQ6IDEsCiAgICBpbnRjXzIgLy8gMQogICAgaXR4bl9maWVsZCBBc3NldEFtb3VudAogICAgdW5jb3ZlciAyCiAgICBpdHhuX2ZpZWxkIFhmZXJBc3NldAogICAgaXR4bl9maWVsZCBBc3NldFJlY2VpdmVyCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzE0LTMyMAogICAgLy8gaXR4bgogICAgLy8gICAuYXNzZXRUcmFuc2Zlcih7CiAgICAvLyAgICAgYXNzZXRSZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIC8vICAgICB4ZmVyQXNzZXQ6IGFzc2V0SWQsCiAgICAvLyAgICAgYXNzZXRBbW91bnQ6IDEsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgcHVzaGludCA0IC8vIDQKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMTkKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMxNC0zMjEKICAgIC8vIGl0eG4KICAgIC8vICAgLmFzc2V0VHJhbnNmZXIoewogICAgLy8gICAgIGFzc2V0UmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICAvLyAgICAgeGZlckFzc2V0OiBhc3NldElkLAogICAgLy8gICAgIGFzc2V0QW1vdW50OiAxLAogICAgLy8gICAgIGZlZTogMCwKICAgIC8vICAgfSkKICAgIC8vICAgLnN1Ym1pdCgpOwogICAgaXR4bl9zdWJtaXQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMjMKICAgIC8vIHRoaXMubGlzdGluZ3MobGlzdGluZ0tleSkuZGVsZXRlKCk7CiAgICBib3hfZGVsCiAgICBwb3AKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyODkKICAgIC8vIEBhYmltZXRob2QoKQogICAgYnl0ZWNfMSAvLyAweDE1MWY3Yzc1MDAyMAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMyNQogICAgLy8gcmV0dXJuIFR4bi50eElkOwogICAgdHhuIFR4SUQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czoyODkKICAgIC8vIEBhYmltZXRob2QoKQogICAgY29uY2F0CiAgICBsb2cKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC5mdW5kQ29udHJhY3Rbcm91dGluZ10oKSAtPiB2b2lkOgpmdW5kQ29udHJhY3Q6CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzMzCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIHR4bmEgQXBwbGljYXRpb25BcmdzIDEKICAgIGR1cAogICAgbGVuCiAgICBpbnRjXzMgLy8gOAogICAgPT0KICAgIGFzc2VydCAvLyBpbnZhbGlkIG51bWJlciBvZiBieXRlcyBmb3IgYXJjNC51aW50NjQKICAgIGJ0b2kKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMzYKICAgIC8vIFR4bi5zZW5kZXIgPT09IEdsb2JhbC5jcmVhdG9yQWRkcmVzcywKICAgIHR4biBTZW5kZXIKICAgIGdsb2JhbCBDcmVhdG9yQWRkcmVzcwogICAgPT0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMzUtMzM4CiAgICAvLyBhc3NlcnQoCiAgICAvLyAgIFR4bi5zZW5kZXIgPT09IEdsb2JhbC5jcmVhdG9yQWRkcmVzcywKICAgIC8vICAgIk9ubHkgY29udHJhY3QgY3JlYXRvciBjYW4gZnVuZCB0aGUgY29udHJhY3QiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE9ubHkgY29udHJhY3QgY3JlYXRvciBjYW4gZnVuZCB0aGUgY29udHJhY3QKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNDAtMzQ2CiAgICAvLyBpdHhuCiAgICAvLyAgIC5wYXltZW50KHsKICAgIC8vICAgICBhbW91bnQ6IGFtb3VudCwKICAgIC8vICAgICByZWNlaXZlcjogR2xvYmFsLmN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzQzCiAgICAvLyByZWNlaXZlcjogR2xvYmFsLmN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MsCiAgICBnbG9iYWwgQ3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcwogICAgaXR4bl9maWVsZCBSZWNlaXZlcgogICAgaXR4bl9maWVsZCBBbW91bnQKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNDAtMzQ1CiAgICAvLyBpdHhuCiAgICAvLyAgIC5wYXltZW50KHsKICAgIC8vICAgICBhbW91bnQ6IGFtb3VudCwKICAgIC8vICAgICByZWNlaXZlcjogR2xvYmFsLmN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgaW50Y18yIC8vIDEKICAgIGl0eG5fZmllbGQgVHlwZUVudW0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNDQKICAgIC8vIGZlZTogMCwKICAgIGludGNfMCAvLyAwCiAgICBpdHhuX2ZpZWxkIEZlZQogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjM0MC0zNDYKICAgIC8vIGl0eG4KICAgIC8vICAgLnBheW1lbnQoewogICAgLy8gICAgIGFtb3VudDogYW1vdW50LAogICAgLy8gICAgIHJlY2VpdmVyOiBHbG9iYWwuY3VycmVudEFwcGxpY2F0aW9uQWRkcmVzcywKICAgIC8vICAgICBmZWU6IDAsCiAgICAvLyAgIH0pCiAgICAvLyAgIC5zdWJtaXQoKTsKICAgIGl0eG5fc3VibWl0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzMzCiAgICAvLyBAYWJpbWV0aG9kKCkKICAgIGludGNfMiAvLyAxCiAgICByZXR1cm4KCgovLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6OkFsZ29NaW50WC53aXRoZHJhd0V4Y2Vzc0Z1bmRzW3JvdXRpbmddKCkgLT4gdm9pZDoKd2l0aGRyYXdFeGNlc3NGdW5kczoKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNTIKICAgIC8vIFR4bi5zZW5kZXIgPT09IEdsb2JhbC5jcmVhdG9yQWRkcmVzcywKICAgIHR4biBTZW5kZXIKICAgIGdsb2JhbCBDcmVhdG9yQWRkcmVzcwogICAgPT0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNTEtMzU0CiAgICAvLyBhc3NlcnQoCiAgICAvLyAgIFR4bi5zZW5kZXIgPT09IEdsb2JhbC5jcmVhdG9yQWRkcmVzcywKICAgIC8vICAgIk9ubHkgY29udHJhY3QgY3JlYXRvciBjYW4gd2l0aGRyYXcgZnVuZHMiCiAgICAvLyApOwogICAgYXNzZXJ0IC8vIE9ubHkgY29udHJhY3QgY3JlYXRvciBjYW4gd2l0aGRyYXcgZnVuZHMKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNTcKICAgIC8vIEdsb2JhbC5jdXJyZW50QXBwbGljYXRpb25BZGRyZXNzLmJhbGFuY2UgLSBNSU5fQkFMQU5DRQogICAgZ2xvYmFsIEN1cnJlbnRBcHBsaWNhdGlvbkFkZHJlc3MKICAgIGFjY3RfcGFyYW1zX2dldCBBY2N0QmFsYW5jZQogICAgYXNzZXJ0IC8vIGFjY291bnQgZnVuZGVkCiAgICBwdXNoaW50IDEwMDAwMCAvLyAxMDAwMDAKICAgIC0KICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNjItMzY4CiAgICAvLyBpdHhuCiAgICAvLyAgIC5wYXltZW50KHsKICAgIC8vICAgICBhbW91bnQ6IGFtb3VudFRvV2l0aGRyYXcsCiAgICAvLyAgICAgcmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX2JlZ2luCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzY1CiAgICAvLyByZWNlaXZlcjogVHhuLnNlbmRlciwKICAgIHR4biBTZW5kZXIKICAgIGl0eG5fZmllbGQgUmVjZWl2ZXIKICAgIGl0eG5fZmllbGQgQW1vdW50CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzYyLTM2NwogICAgLy8gaXR4bgogICAgLy8gICAucGF5bWVudCh7CiAgICAvLyAgICAgYW1vdW50OiBhbW91bnRUb1dpdGhkcmF3LAogICAgLy8gICAgIHJlY2VpdmVyOiBUeG4uc2VuZGVyLAogICAgLy8gICAgIGZlZTogMCwKICAgIC8vICAgfSkKICAgIGludGNfMiAvLyAxCiAgICBpdHhuX2ZpZWxkIFR5cGVFbnVtCiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzY2CiAgICAvLyBmZWU6IDAsCiAgICBpbnRjXzAgLy8gMAogICAgaXR4bl9maWVsZCBGZWUKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozNjItMzY4CiAgICAvLyBpdHhuCiAgICAvLyAgIC5wYXltZW50KHsKICAgIC8vICAgICBhbW91bnQ6IGFtb3VudFRvV2l0aGRyYXcsCiAgICAvLyAgICAgcmVjZWl2ZXI6IFR4bi5zZW5kZXIsCiAgICAvLyAgICAgZmVlOiAwLAogICAgLy8gICB9KQogICAgLy8gICAuc3VibWl0KCk7CiAgICBpdHhuX3N1Ym1pdAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjM0OQogICAgLy8gQGFiaW1ldGhvZCgpCiAgICBpbnRjXzIgLy8gMQogICAgcmV0dXJuCgoKLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjpBbGdvTWludFguYnVpbGRMaXN0aW5nS2V5KG1hcmtldHBsYWNlOiBieXRlcywgYXNzZXRJZDogdWludDY0KSAtPiBieXRlczoKYnVpbGRMaXN0aW5nS2V5OgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMxCiAgICAvLyBwcml2YXRlIGJ1aWxkTGlzdGluZ0tleShtYXJrZXRwbGFjZTogc3RyaW5nLCBhc3NldElkOiB1aW50NjQpOiBieXRlcyB7CiAgICBwcm90byAyIDEKICAgIC8vIHNtYXJ0X2NvbnRyYWN0cy9BbGdvTWludFgvY29udHJhY3QuYWxnby50czozMgogICAgLy8gY29uc3QgbWFya2V0cGxhY2VCeXRlcyA9IG5ldyBhcmM0LlN0cihtYXJrZXRwbGFjZSkuYnl0ZXM7CiAgICBmcmFtZV9kaWcgLTIKICAgIGxlbgogICAgaXRvYgogICAgZXh0cmFjdCA2IDIKICAgIGZyYW1lX2RpZyAtMgogICAgY29uY2F0CiAgICAvLyBzbWFydF9jb250cmFjdHMvQWxnb01pbnRYL2NvbnRyYWN0LmFsZ28udHM6MzQKICAgIC8vIGNvbnN0IGFzc2V0SWRCeXRlcyA9IG5ldyBhcmM0LlVpbnQ2NChhc3NldElkKS5ieXRlczsKICAgIGZyYW1lX2RpZyAtMQogICAgaXRvYgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjM1CiAgICAvLyByZXR1cm4gb3AuY29uY2F0KG9wLmNvbmNhdChtYXJrZXRwbGFjZUJ5dGVzLCBzZXBhcmF0b3IpLCBhc3NldElkQnl0ZXMpOwogICAgc3dhcAogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjMzCiAgICAvLyBjb25zdCBzZXBhcmF0b3IgPSBuZXcgYXJjNC5TdHIoIl8iKS5ieXRlczsKICAgIHB1c2hieXRlcyAweDAwMDE1ZgogICAgLy8gc21hcnRfY29udHJhY3RzL0FsZ29NaW50WC9jb250cmFjdC5hbGdvLnRzOjM1CiAgICAvLyByZXR1cm4gb3AuY29uY2F0KG9wLmNvbmNhdChtYXJrZXRwbGFjZUJ5dGVzLCBzZXBhcmF0b3IpLCBhc3NldElkQnl0ZXMpOwogICAgY29uY2F0CiAgICBzd2FwCiAgICBjb25jYXQKICAgIHJldHN1Ygo=","clear":"I3ByYWdtYSB2ZXJzaW9uIDExCiNwcmFnbWEgdHlwZXRyYWNrIGZhbHNlCgovLyBAYWxnb3JhbmRmb3VuZGF0aW9uL2FsZ29yYW5kLXR5cGVzY3JpcHQvYmFzZS1jb250cmFjdC5kLnRzOjpCYXNlQ29udHJhY3QuY2xlYXJTdGF0ZVByb2dyYW0oKSAtPiB1aW50NjQ6Cm1haW46CiAgICBwdXNoaW50IDEgLy8gMQogICAgcmV0dXJuCg=="},"state":{"global":{"num_byte_slices":0,"num_uints":0},"local":{"num_byte_slices":0,"num_uints":0}},"schema":{"global":{"declared":{},"reserved":{}},"local":{"declared":{},"reserved":{}}},"contract":{"name":"AlgoMintX","methods":[{"name":"addNFTListing","args":[{"type":"uint64","name":"assetId"},{"type":"string","name":"senderWalletAddress"},{"type":"string","name":"nftPrice"},{"type":"string","name":"marketplace"}],"readonly":false,"returns":{"type":"byte[]"},"desc":"\\nBox only methods"},{"name":"getNFTListing","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"}],"readonly":true,"returns":{"type":"(string,string,string)"}},{"name":"removeNFTListing","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"}],"readonly":false,"returns":{"type":"byte[]"}},{"name":"contractOptInToNFT","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"}],"readonly":false,"returns":{"type":"byte[]"},"desc":"\\nNFT methods"},{"name":"transferNFTToContractAndAddListing","args":[{"type":"uint64","name":"assetId"},{"type":"string","name":"senderWalletAddress"},{"type":"string","name":"nftPrice"},{"type":"string","name":"marketplace"}],"readonly":false,"returns":{"type":"byte[]"},"desc":"Records a listing and opt-ins the contract to the asset.\\nEscrow is completed by a user-signed asset transfer in the same atomic group\\n(mirrors AlgoStakeX stake: app call + outer asset transfer)."},{"name":"transferNFTToContract","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"}],"readonly":false,"returns":{"type":"byte[]"},"desc":"Opt-in only. Pair with a user-signed asset transfer in the same atomic group."},{"name":"transferNFTToReceiver","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"},{"type":"string","name":"sellerWalletAddress"}],"readonly":false,"returns":{"type":"byte[]"}},{"name":"transferNFTToSeller","args":[{"type":"string","name":"marketplace"},{"type":"uint64","name":"assetId"},{"type":"string","name":"sellerWalletAddress"}],"readonly":false,"returns":{"type":"byte[]"}},{"name":"transferNFTToReceiverAndRemoveListing","args":[{"type":"uint64","name":"assetId"},{"type":"string","name":"sellerWalletAddress"},{"type":"string","name":"marketplace"}],"readonly":false,"returns":{"type":"byte[]"},"desc":"\\nNFT + Box methods"},{"name":"transferNFTToSellerAndRemoveListing","args":[{"type":"uint64","name":"assetId"},{"type":"string","name":"sellerWalletAddress"},{"type":"string","name":"marketplace"}],"readonly":false,"returns":{"type":"byte[]"}},{"name":"fundContract","args":[{"type":"uint64","name":"amount"}],"readonly":false,"returns":{"type":"void"},"desc":"\\nMisc methods"},{"name":"withdrawExcessFunds","args":[],"readonly":false,"returns":{"type":"void"}}],"networks":{}},"bare_call_config":{"no_op":"CREATE"}}')},9891:function(module,exports,__webpack_require__){var factory;"undefined"!=typeof navigator&&(factory=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var n,i,r=t.length;for(n=0;n<r;n+=1)for(var a in i=t[n].prototype)Object.prototype.hasOwnProperty.call(i,a)&&(e.prototype[a]=i[a])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,n=this.audios.length;for(e=0;e<n;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var n,i=0,r=[];switch(t){case"int16":case"uint8c":n=1;break;default:n=1.1}for(i=0;i<e;i+=1)r.push(n);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,n){return"float32"===e?new Float32Array(n):"int16"===e?new Int16Array(n):"uint8c"===e?new Uint8ClampedArray(n):t(e,n)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],n=e.length;for(t=0;t<n;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,n=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)n[e]=Math.abs(t[e]);return n}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,n,i){this.type=t,this.currentTime=e,this.totalTime=n,this.direction=i<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,n,i){this.type=t,this.currentLoop=n,this.totalLoops=e,this.direction=i<0?-1:1}function BMSegmentStartEvent(t,e,n){this.type=t,this.firstFrame=e,this.totalFrames=n}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,n){var i,r,a,o,s,l,c,h;switch(l=n*(1-e),c=n*(1-(s=6*t-(o=Math.floor(6*t)))*e),h=n*(1-(1-s)*e),o%6){case 0:i=n,r=h,a=l;break;case 1:i=c,r=n,a=l;break;case 2:i=l,r=n,a=h;break;case 3:i=l,r=c,a=n;break;case 4:i=h,r=l,a=n;break;case 5:i=n,r=l,a=c}return[i,r,a]}function RGBtoHSV(t,e,n){var i,r=Math.max(t,e,n),a=Math.min(t,e,n),o=r-a,s=0===r?0:o/r,l=r/255;switch(r){case a:i=0;break;case t:i=e-n+o*(e<n?6:0),i/=6*o;break;case e:i=n-t+2*o,i/=6*o;break;case n:i=t-e+4*o,i/=6*o}return[i,s,l]}function addSaturationToRGB(t,e){var n=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return n[1]+=e,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(t,e){var n=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return n[2]+=e,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(t,e){var n=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return n[0]+=e/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var t,e,n=[];for(t=0;t<256;t+=1)e=t.toString(16),n[t]=1===e.length?"0"+e:e;return function(t,e,i){return t<0&&(t=0),e<0&&(e=0),i<0&&(i=0),"#"+n[t]+n[e]+n[i]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,n=1,i=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},a={postMessage:function(t){r.onmessage({data:t})}};function o(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var n=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),i=URL.createObjectURL(n);return new Worker(i)}return t=e,r}((function(t){if(a.dataManager||(a.dataManager=function(){function t(r,a){var o,s,l,c,h,d,u,p=r.length;for(s=0;s<p;s+=1)if("ks"in(o=r[s])&&!o.completed){if(o.completed=!0,o.hasMask){var m=o.masksProperties;for(c=m.length,l=0;l<c;l+=1)if(m[l].pt.k.i)i(m[l].pt.k);else for(d=m[l].pt.k.length,h=0;h<d;h+=1)m[l].pt.k[h].s&&i(m[l].pt.k[h].s[0]),m[l].pt.k[h].e&&i(m[l].pt.k[h].e[0])}0===o.ty?(o.layers=e(o.refId,a),t(o.layers,a)):4===o.ty?n(o.shapes):5===o.ty&&(0===(u=o).t.a.length&&u.t.p)}}function e(t,e){var n=function(t,e){for(var n=0,i=e.length;n<i;){if(e[n].id===t)return e[n];n+=1}return null}(t,e);return n?n.layers.__used?JSON.parse(JSON.stringify(n.layers)):(n.layers.__used=!0,n.layers):null}function n(t){var e,r,a;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;r<a;r+=1)t[e].ks.k[r].s&&i(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&i(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&n(t[e].it)}function i(t){var e,n=t.i.length;for(e=0;e<n;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var n=e?e.split("."):[100,100,100];return t[0]>n[0]||!(n[0]>t[0])&&(t[1]>n[1]||!(n[1]>t[1])&&(t[2]>n[2]||!(n[2]>t[2])&&null))}var a,o=function(){var t=[4,4,14];function e(t){var e,n,i,r=t.length;for(e=0;e<r;e+=1)5===t[e].ty&&(void 0,i=(n=t[e]).t.d,n.t.d={k:[{s:i,t:0}]})}return function(n){if(r(t,n.v)&&(e(n.layers),n.assets)){var i,a=n.assets.length;for(i=0;i<a;i+=1)n.assets[i].layers&&e(n.assets[i].layers)}}}(),s=(a=[4,7,99],function(t){if(t.chars&&!r(a,t.v)){var e,i=t.chars.length;for(e=0;e<i;e+=1){var o=t.chars[e];o.data&&o.data.shapes&&(n(o.data.shapes),o.data.ip=0,o.data.op=99999,o.data.st=0,o.data.sr=1,o.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(o.data.shapes.push({ty:"no"}),o.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var t=[5,7,15];function e(t){var e,n,i=t.length;for(e=0;e<i;e+=1)5===t[e].ty&&(n=void 0,"number"==typeof(n=t[e].t.p).a&&(n.a={a:0,k:n.a}),"number"==typeof n.p&&(n.p={a:0,k:n.p}),"number"==typeof n.r&&(n.r={a:0,k:n.r}))}return function(n){if(r(t,n.v)&&(e(n.layers),n.assets)){var i,a=n.assets.length;for(i=0;i<a;i+=1)n.assets[i].layers&&e(n.assets[i].layers)}}}(),c=function(){var t=[4,1,9];function e(t){var n,i,r,a=t.length;for(n=0;n<a;n+=1)if("gr"===t[n].ty)e(t[n].it);else if("fl"===t[n].ty||"st"===t[n].ty)if(t[n].c.k&&t[n].c.k[0].i)for(r=t[n].c.k.length,i=0;i<r;i+=1)t[n].c.k[i].s&&(t[n].c.k[i].s[0]/=255,t[n].c.k[i].s[1]/=255,t[n].c.k[i].s[2]/=255,t[n].c.k[i].s[3]/=255),t[n].c.k[i].e&&(t[n].c.k[i].e[0]/=255,t[n].c.k[i].e[1]/=255,t[n].c.k[i].e[2]/=255,t[n].c.k[i].e[3]/=255);else t[n].c.k[0]/=255,t[n].c.k[1]/=255,t[n].c.k[2]/=255,t[n].c.k[3]/=255}function n(t){var n,i=t.length;for(n=0;n<i;n+=1)4===t[n].ty&&e(t[n].shapes)}return function(e){if(r(t,e.v)&&(n(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&n(e.assets[i].layers)}}}(),h=function(){var t=[4,4,18];function e(t){var n,i,r;for(n=t.length-1;n>=0;n-=1)if("sh"===t[n].ty)if(t[n].ks.k.i)t[n].ks.k.c=t[n].closed;else for(r=t[n].ks.k.length,i=0;i<r;i+=1)t[n].ks.k[i].s&&(t[n].ks.k[i].s[0].c=t[n].closed),t[n].ks.k[i].e&&(t[n].ks.k[i].e[0].c=t[n].closed);else"gr"===t[n].ty&&e(t[n].it)}function n(t){var n,i,r,a,o,s,l=t.length;for(i=0;i<l;i+=1){if((n=t[i]).hasMask){var c=n.masksProperties;for(a=c.length,r=0;r<a;r+=1)if(c[r].pt.k.i)c[r].pt.k.c=c[r].cl;else for(s=c[r].pt.k.length,o=0;o<s;o+=1)c[r].pt.k[o].s&&(c[r].pt.k[o].s[0].c=c[r].cl),c[r].pt.k[o].e&&(c[r].pt.k[o].e[0].c=c[r].cl)}4===n.ty&&e(n.shapes)}}return function(e){if(r(t,e.v)&&(n(e.layers),e.assets)){var i,a=e.assets.length;for(i=0;i<a;i+=1)e.assets[i].layers&&n(e.assets[i].layers)}}}();var d={completeData:function(n){n.__complete||(c(n),o(n),s(n),l(n),h(n),t(n.layers,n.assets),function(n,i){if(n){var r=0,a=n.length;for(r=0;r<a;r+=1)1===n[r].t&&(n[r].data.layers=e(n[r].data.refId,i),t(n[r].data.layers,i))}}(n.chars,n.assets),n.__complete=!0)}};return d.checkColors=c,d.checkChars=s,d.checkPathProperties=l,d.checkShapes=h,d.completeLayers=t,d}()),a.assetLoader||(a.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,n,i,r){var a,o=new XMLHttpRequest;try{o.responseType="json"}catch(t){}o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)a=t(o),i(a);else try{a=t(o),i(a)}catch(t){r&&r(t)}};try{o.open(["G","E","T"].join(""),e,!0)}catch(t){o.open(["G","E","T"].join(""),n+"/"+e,!0)}o.send()}}}()),"loadAnimation"===t.data.type)a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}));else if("complete"===t.data.type){var e=t.data.animation;a.dataManager.completeData(e),a.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&a.assetLoader.load(t.data.path,t.data.fullPath,(function(e){a.postMessage({id:t.data.id,payload:e,status:"success"})}),(function(){a.postMessage({id:t.data.id,status:"error"})}))})),e.onmessage=function(t){var e=t.data,n=e.id,r=i[n];i[n]=null,"success"===e.status?r.onComplete(e.payload):r.onError&&r.onError()})}function s(t,e){var r="processId_"+(n+=1);return i[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,n,i){o();var r=s(n,i);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(t,n,i){o();var r=s(n,i);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(t,n,i){o();var r=s(n,i);e.postMessage({type:"complete",animation:t,id:r})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,n){var i="";if(t.e)i=t.p;else if(e){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),i=e+r}else i=n,i+=t.u?t.u:"",i+=t.p;return i}function r(t){var e=0,n=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(n)),e+=1}.bind(this),50)}function a(t){var e={assetData:t},n=i(t,this.assetsPath,this.path);return dataManager.loadData(n,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=a.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var n;this.imagesLoadedCb=e;var i=t.length;for(n=0;n<i;n+=1)t[n].layers||(t[n].t&&"seq"!==t[n].t?3===t[n].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[n]))):(this.totalImages+=1,this.images.push(this._createImageData(t[n]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,n=this.images.length;e<n;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var n=i(e,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.src=n;var a={img:r,assetData:e};return a},createImageData:function(e){var n=i(e,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){a.img=t,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",n),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var a={img:r,assetData:e};return a},imageLoaded:e,footageLoaded:n,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},o}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var n=this._cbs[t],i=0;i<n.length;i+=1)n[i](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var n=0,i=this._cbs[t].length;n<i;)this._cbs[t][n]===e&&(this._cbs[t].splice(n,1),n-=1,i-=1),n+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,n=t.split("\r\n"),i={},r=0,a=0;a<n.length;a+=1)2===(e=n[a].split(":")).length&&(i[e[0]]=e[1].trim(),r+=1);if(0===r)throw new Error;return i}return function(e){for(var n=[],i=0;i<e.length;i+=1){var r=e[i],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[i].cm)}catch(n){try{a.payload=t(e[i].cm)}catch(t){a.payload={name:e[i].cm}}}n.push(a)}return n}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,n=this.compositions.length;e<n;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var t in renderers)if(renderers[t])return t;return""}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var n=getRenderer(e);this.renderer=new n(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var n={wrapper:t,animationData:e},i=t.attributes;n.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",n.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var r=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";"false"===r?n.loop=!1:"true"===r?n.loop=!0:""!==r&&(n.loop=parseInt(r,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:!i.getNamedItem("bm-autoplay")||i.getNamedItem("bm-autoplay").value;n.autoplay="false"!==a,n.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"","false"===(i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"")&&(n.prerender=!1),n.path?this.setParams(n):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,n,i=this.animationData.layers,r=i.length,a=t.layers,o=a.length;for(n=0;n<o;n+=1)for(e=0;e<r;){if(i[e].id===a[n].id){i[e]=a[n];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;e<r;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var n=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(n,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var n="number"==typeof t?t:void 0,i="number"==typeof e?e:void 0;this.renderer.updateContainerSize(n,i)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,n=0;n<this.markers.length;n+=1)if((e=this.markers[n]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,n){if(!n||this.name===n){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,n){if(!n||this.name===n){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(i,e,n);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,n=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(n=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(n=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),n&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?n=t:this.currentRawFrame+this.firstFrame>e&&(n=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==n&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var n,i=t.length;for(n=0;n<i;n+=1)this.segments.push(t[n])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(t){this.loop=t},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var n=t.p;-1!==n.indexOf("images/")&&(n=n.split("/")[1]),e=this.assetsPath+n}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,n=this.assets.length;e<n;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,n){try{this.renderer.getElementByPath(t).updateDocumentData(e,n)}catch(t){}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],n=0,i=0,r=0,a=!0,o=!1;function s(t){for(var n=0,r=t.target;n<i;)e[n].animation===r&&(e.splice(n,1),n-=1,i-=1,r.isPaused||h()),n+=1}function l(t,n){if(!t)return null;for(var r=0;r<i;){if(e[r].elem===t&&null!==e[r].elem)return e[r].animation;r+=1}var a=new AnimationItem;return d(a,t),a.setData(t,n),a}function c(){r+=1,m()}function h(){r-=1}function d(t,n){t.addEventListener("destroy",s),t.addEventListener("_active",c),t.addEventListener("_idle",h),e.push({elem:n,animation:t}),i+=1}function u(t){var s,l=t-n;for(s=0;s<i;s+=1)e[s].animation.advanceTime(l);n=t,r&&!o?window.requestAnimationFrame(u):a=!0}function p(t){n=t,window.requestAnimationFrame(u)}function m(){!o&&r&&a&&(window.requestAnimationFrame(p),a=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return d(e,null),e.setParams(t),e},t.setSpeed=function(t,n){var r;for(r=0;r<i;r+=1)e[r].animation.setSpeed(t,n)},t.setDirection=function(t,n){var r;for(r=0;r<i;r+=1)e[r].animation.setDirection(t,n)},t.play=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.play(t)},t.pause=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.pause(t)},t.stop=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.stop(t)},t.togglePause=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.togglePause(t)},t.searchAnimations=function(t,e,n){var i,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),a=r.length;for(i=0;i<a;i+=1)n&&r[i].setAttribute("data-bm-type",n),l(r[i],t);if(e&&0===a){n||(n="svg");var o=document.getElementsByTagName("body")[0];o.innerText="";var s=createTag("div");s.style.width="100%",s.style.height="100%",s.setAttribute("data-bm-type",n),o.appendChild(s),l(s,t)}},t.resize=function(){var t;for(t=0;t<i;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,n,r){var a;for(a=0;a<i;a+=1)e[a].animation.goToAndStop(t,n,r)},t.destroy=function(t){var n;for(n=i-1;n>=0;n-=1)e[n].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,m()},t.setVolume=function(t,n){var r;for(r=0;r<i;r+=1)e[r].animation.setVolume(t,n)},t.mute=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.mute(t)},t.unmute=function(t){var n;for(n=0;n<i;n+=1)e[n].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,n=e.length,i=[];for(t=0;t<n;t+=1)i.push(e[t].animation);return i},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,n,i,r,a){var o=a||("bez_"+t+"_"+n+"_"+i+"_"+r).replace(/\./g,"p");if(e[o])return e[o];var s=new h([t,n,i,r]);return e[o]=s,s}},e={},n=11,i=1/(n-1),r="function"==typeof Float32Array;function a(t,e){return 1-3*e+3*t}function o(t,e){return 3*e-6*t}function s(t){return 3*t}function l(t,e,n){return((a(e,n)*t+o(e,n))*t+s(e))*t}function c(t,e,n){return 3*a(e,n)*t*t+2*o(e,n)*t+s(e)}function h(t){this._p=t,this._mSampleValues=r?new Float32Array(n):new Array(n),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(t){var e=this._p[0],n=this._p[1],i=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===n&&i===r?t:0===t?0:1===t?1:l(this._getTForX(t),n,r)},_precompute:function(){var t=this._p[0],e=this._p[1],n=this._p[2],i=this._p[3];this._precomputed=!0,t===e&&n===i||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<n;++r)this._mSampleValues[r]=l(r*i,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],a=this._mSampleValues,o=0,s=1,h=n-1;s!==h&&a[s]<=t;++s)o+=i;var d=o+(t-a[--s])/(a[s+1]-a[s])*i,u=c(d,e,r);return u>=.001?function(t,e,n,i){for(var r=0;r<4;++r){var a=c(e,n,i);if(0===a)return e;e-=(l(e,n,i)-t)/a}return e}(t,d,e,r):0===u?d:function(t,e,n,i,r){var a,o,s=0;do{(a=l(o=e+(n-e)/2,i,r)-t)>0?n=o:e=o}while(Math.abs(a)>1e-7&&++s<10);return o}(t,o,o+i,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,n){var i=0,r=t,a=createSizedArray(r);return{newElement:function(){return i?a[i-=1]:e()},release:function(t){i===r&&(a=pooling.double(a),r*=2),n&&n(t),a[i]=t,i+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,n=t.lengths.length;for(e=0;e<n;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}));function bezFunction(){var t=Math;function e(t,e,n,i,r,a){var o=t*i+e*r+n*a-r*i-a*t-n*e;return o>-.001&&o<.001}var n=function(t,e,n,i){var r,a,o,s,l,c,h=getDefaultCurveSegments(),d=0,u=[],p=[],m=bezierLengthPool.newElement();for(o=n.length,r=0;r<h;r+=1){for(l=r/(h-1),c=0,a=0;a<o;a+=1)s=bmPow(1-l,3)*t[a]+3*bmPow(1-l,2)*l*n[a]+3*(1-l)*bmPow(l,2)*i[a]+bmPow(l,3)*e[a],u[a]=s,null!==p[a]&&(c+=bmPow(u[a]-p[a],2)),p[a]=u[a];c&&(d+=c=bmSqrt(c)),m.percents[r]=l,m.lengths[r]=d}return m.addedLength=d,m};function i(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}var a,o=(a={},function(t,n,o,s){var l=(t[0]+"_"+t[1]+"_"+n[0]+"_"+n[1]+"_"+o[0]+"_"+o[1]+"_"+s[0]+"_"+s[1]).replace(/\./g,"p");if(!a[l]){var c,h,d,u,p,m,g,f=getDefaultCurveSegments(),y=0,v=null;2===t.length&&(t[0]!==n[0]||t[1]!==n[1])&&e(t[0],t[1],n[0],n[1],t[0]+o[0],t[1]+o[1])&&e(t[0],t[1],n[0],n[1],n[0]+s[0],n[1]+s[1])&&(f=2);var w=new i(f);for(d=o.length,c=0;c<f;c+=1){for(g=createSizedArray(d),p=c/(f-1),m=0,h=0;h<d;h+=1)u=bmPow(1-p,3)*t[h]+3*bmPow(1-p,2)*p*(t[h]+o[h])+3*(1-p)*bmPow(p,2)*(n[h]+s[h])+bmPow(p,3)*n[h],g[h]=u,null!==v&&(m+=bmPow(g[h]-v[h],2));y+=m=bmSqrt(m),w.points[c]=new r(m,g),v=g}w.segmentLength=y,a[l]=w}return a[l]});function s(t,e){var n=e.percents,i=e.lengths,r=n.length,a=bmFloor((r-1)*t),o=t*e.addedLength,s=0;if(a===r-1||0===a||o===i[a])return n[a];for(var l=i[a]>o?-1:1,c=!0;c;)if(i[a]<=o&&i[a+1]>o?(s=(o-i[a])/(i[a+1]-i[a]),c=!1):a+=l,a<0||a>=r-1){if(a===r-1)return n[a];c=!1}return n[a]+(n[a+1]-n[a])*s}var l=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,i=segmentsLengthPool.newElement(),r=t.c,a=t.v,o=t.o,s=t.i,l=t._length,c=i.lengths,h=0;for(e=0;e<l-1;e+=1)c[e]=n(a[e],a[e+1],o[e],s[e+1]),h+=c[e].addedLength;return r&&l&&(c[e]=n(a[e],a[0],o[e],s[0]),h+=c[e].addedLength),i.totalLength=h,i},getNewSegment:function(e,n,i,r,a,o,c){a<0?a=0:a>1&&(a=1);var h,d=s(a,c),u=s(o=o>1?1:o,c),p=e.length,m=1-d,g=1-u,f=m*m*m,y=d*m*m*3,v=d*d*m*3,w=d*d*d,b=m*m*g,x=d*m*g+m*d*g+m*m*u,S=d*d*g+m*d*u+d*m*u,A=d*d*u,C=m*g*g,k=d*g*g+m*u*g+m*g*u,I=d*u*g+m*u*u+d*g*u,E=d*u*u,_=g*g*g,M=u*g*g+g*u*g+g*g*u,D=u*u*g+g*u*u+u*g*u,P=u*u*u;for(h=0;h<p;h+=1)l[4*h]=t.round(1e3*(f*e[h]+y*i[h]+v*r[h]+w*n[h]))/1e3,l[4*h+1]=t.round(1e3*(b*e[h]+x*i[h]+S*r[h]+A*n[h]))/1e3,l[4*h+2]=t.round(1e3*(C*e[h]+k*i[h]+I*r[h]+E*n[h]))/1e3,l[4*h+3]=t.round(1e3*(_*e[h]+M*i[h]+D*r[h]+P*n[h]))/1e3;return l},getPointInSegment:function(e,n,i,r,a,o){var l=s(a,o),c=1-l;return[t.round(1e3*(c*c*c*e[0]+(l*c*c+c*l*c+c*c*l)*i[0]+(l*l*c+c*l*l+l*c*l)*r[0]+l*l*l*n[0]))/1e3,t.round(1e3*(c*c*c*e[1]+(l*c*c+c*l*c+c*c*l)*i[1]+(l*l*c+c*l*l+l*c*l)*r[1]+l*l*l*n[1]))/1e3]},buildBezierData:o,pointOnLine2D:e,pointOnLine3D:function(n,i,r,a,o,s,l,c,h){if(0===r&&0===s&&0===h)return e(n,i,a,o,l,c);var d,u=t.sqrt(t.pow(a-n,2)+t.pow(o-i,2)+t.pow(s-r,2)),p=t.sqrt(t.pow(l-n,2)+t.pow(c-i,2)+t.pow(h-r,2)),m=t.sqrt(t.pow(l-a,2)+t.pow(c-o,2)+t.pow(h-s,2));return(d=u>p?u>m?u-p-m:m-p-u:m>p?m-p-u:p-u-m)>-1e-4&&d<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var n,i=this.offsetTime;"multidimensional"===this.propType&&(n=createTypedArray("float32",this.pv.length));for(var r,a,o,s,l,c,h,d,u,p=e.lastIndex,m=p,g=this.keyframes.length-1,f=!0;f;){if(r=this.keyframes[m],a=this.keyframes[m+1],m===g-1&&t>=a.t-i){r.h&&(r=a),p=0;break}if(a.t-i>t){p=m;break}m<g-1?m+=1:(p=0,f=!1)}o=this.keyframesMetadata[m]||{};var y,v=a.t-i,w=r.t-i;if(r.to){o.bezierData||(o.bezierData=bez.buildBezierData(r.s,a.s||r.e,r.to,r.ti));var b=o.bezierData;if(t>=v||t<w){var x=t>=v?b.points.length-1:0;for(l=b.points[x].point.length,s=0;s<l;s+=1)n[s]=b.points[x].point[s]}else{o.__fnct?u=o.__fnct:(u=BezierFactory.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,o.__fnct=u),c=u((t-w)/(v-w));var S,A=b.segmentLength*c,C=e.lastFrame<t&&e._lastKeyframeIndex===m?e._lastAddedLength:0;for(d=e.lastFrame<t&&e._lastKeyframeIndex===m?e._lastPoint:0,f=!0,h=b.points.length;f;){if(C+=b.points[d].partialLength,0===A||0===c||d===b.points.length-1){for(l=b.points[d].point.length,s=0;s<l;s+=1)n[s]=b.points[d].point[s];break}if(A>=C&&A<C+b.points[d+1].partialLength){for(S=(A-C)/b.points[d+1].partialLength,l=b.points[d].point.length,s=0;s<l;s+=1)n[s]=b.points[d].point[s]+(b.points[d+1].point[s]-b.points[d].point[s])*S;break}d<h-1?d+=1:f=!1}e._lastPoint=d,e._lastAddedLength=C-b.points[d].partialLength,e._lastKeyframeIndex=m}}else{var k,I,E,_,M;if(g=r.s.length,y=a.s||r.e,this.sh&&1!==r.h)t>=v?(n[0]=y[0],n[1]=y[1],n[2]=y[2]):t<=w?(n[0]=r.s[0],n[1]=r.s[1],n[2]=r.s[2]):quaternionToEuler(n,slerp(createQuaternion(r.s),createQuaternion(y),(t-w)/(v-w)));else for(m=0;m<g;m+=1)1!==r.h&&(t>=v?c=1:t<w?c=0:(r.o.x.constructor===Array?(o.__fnct||(o.__fnct=[]),o.__fnct[m]?u=o.__fnct[m]:(k=void 0===r.o.x[m]?r.o.x[0]:r.o.x[m],I=void 0===r.o.y[m]?r.o.y[0]:r.o.y[m],E=void 0===r.i.x[m]?r.i.x[0]:r.i.x[m],_=void 0===r.i.y[m]?r.i.y[0]:r.i.y[m],u=BezierFactory.getBezierEasing(k,I,E,_).get,o.__fnct[m]=u)):o.__fnct?u=o.__fnct:(k=r.o.x,I=r.o.y,E=r.i.x,_=r.i.y,u=BezierFactory.getBezierEasing(k,I,E,_).get,r.keyframeMetadata=u),c=u((t-w)/(v-w)))),y=a.s||r.e,M=1===r.h?r.s[m]:r.s[m]+(y[m]-r.s[m])*c,"multidimensional"===this.propType?n[m]=M:n=M}return e.lastIndex=p,n}function slerp(t,e,n){var i,r,a,o,s,l=[],c=t[0],h=t[1],d=t[2],u=t[3],p=e[0],m=e[1],g=e[2],f=e[3];return(r=c*p+h*m+d*g+u*f)<0&&(r=-r,p=-p,m=-m,g=-g,f=-f),1-r>1e-6?(i=Math.acos(r),a=Math.sin(i),o=Math.sin((1-n)*i)/a,s=Math.sin(n*i)/a):(o=1-n,s=n),l[0]=o*c+s*p,l[1]=o*h+s*m,l[2]=o*d+s*g,l[3]=o*u+s*f,l}function quaternionToEuler(t,e){var n=e[0],i=e[1],r=e[2],a=e[3],o=Math.atan2(2*i*a-2*n*r,1-2*i*i-2*r*r),s=Math.asin(2*n*i+2*r*a),l=Math.atan2(2*n*a-2*i*r,1-2*n*n-2*r*r);t[0]=o/degToRads,t[1]=s/degToRads,t[2]=l/degToRads}function createQuaternion(t){var e=t[0]*degToRads,n=t[1]*degToRads,i=t[2]*degToRads,r=Math.cos(e/2),a=Math.cos(n/2),o=Math.cos(i/2),s=Math.sin(e/2),l=Math.sin(n/2),c=Math.sin(i/2);return[s*l*o+r*a*c,s*a*o+r*l*c,r*l*o-s*a*c,r*a*o-s*l*c]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=n&&t>=n||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if("unidimensional"===this.propType)e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var n=0,i=this.v.length;n<i;)e=t[n]*this.mult,mathAbs(this.v[n]-e)>1e-5&&(this.v[n]=e,this._mdf=!0),n+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)n=this.effectsSequence[t](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function ValueProperty(t,e,n,i){this.propType="unidimensional",this.mult=n||1,this.data=e,this.v=n?e.k*n:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(t,e,n,i){var r;this.propType="multidimensional",this.mult=n||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var a=e.k.length;for(this.v=createTypedArray("float32",a),this.pv=createTypedArray("float32",a),this.vel=createTypedArray("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(t,e,n,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=n||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(t,e,n,i){var r;this.propType="multidimensional";var a,o,s,l,c=e.k.length;for(r=0;r<c-1;r+=1)e.k[r].to&&e.k[r].s&&e.k[r+1]&&e.k[r+1].s&&(a=e.k[r].s,o=e.k[r+1].s,s=e.k[r].to,l=e.k[r].ti,(2===a.length&&(a[0]!==o[0]||a[1]!==o[1])&&bez.pointOnLine2D(a[0],a[1],o[0],o[1],a[0]+s[0],a[1]+s[1])&&bez.pointOnLine2D(a[0],a[1],o[0],o[1],o[0]+l[0],o[1]+l[1])||3===a.length&&(a[0]!==o[0]||a[1]!==o[1]||a[2]!==o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],o[0],o[1],o[2],a[0]+s[0],a[1]+s[1],a[2]+s[2])&&bez.pointOnLine3D(a[0],a[1],a[2],o[0],o[1],o[2],o[0]+l[0],o[1]+l[1],o[2]+l[2]))&&(e.k[r].to=null,e.k[r].ti=null),a[0]===o[0]&&a[1]===o[1]&&0===s[0]&&0===s[1]&&0===l[0]&&0===l[1]&&(2===a.length||a[2]===o[2]&&0===s[2]&&0===l[2])&&(e.k[r].to=null,e.k[r].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var h=e.k[0].s.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),r=0;r<h;r+=1)this.v[r]=initFrame,this.pv[r]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",h)},this.addEffect=addEffect}var PropertyFactory={getProp:function(t,e,n,i,r){var a;if(e.sid&&(e=t.globalData.slotManager.getProp(e)),e.k.length)if("number"==typeof e.k[0])a=new MultiDimensionalProperty(t,e,i,r);else switch(n){case 0:a=new KeyframedValueProperty(t,e,i,r);break;case 1:a=new KeyframedMultidimensionalProperty(t,e,i,r)}else a=new ValueProperty(t,e,i,r);return a.effectsSequence.length&&r.addDynamicProperty(a),a}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var n=0;n<e;)this.v[n]=pointPool.newElement(),this.o[n]=pointPool.newElement(),this.i[n]=pointPool.newElement(),n+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,n,i,r){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[]}(!a[i]||a[i]&&!r)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,n,i,r,a,o,s){this.setXYAt(t,e,"v",o,s),this.setXYAt(n,i,"o",o,s),this.setXYAt(r,a,"i",o,s)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,n=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],n[0][0],n[0][1],0,!1),r=1);var a,o=this._length-1,s=this._length;for(a=r;a<s;a+=1)t.setTripleAt(e[o][0],e[o][1],i[o][0],i[o][1],n[o][0],n[o][1],a,!1),o-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(t){var e,n=t._length;for(e=0;e<n;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1})),factory.clone=function(t){var e,n=factory.newElement(),i=void 0===t._length?t.v.length:t._length;for(n.setLength(i),n.c=t.c,e=0;e<i;e+=1)n.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return n},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,n=t._length;for(e=0;e<n;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,n){var i,r,a,o,s,l,c,h,d,u=n.lastIndex,p=this.keyframes;if(t<p[0].t-this.offsetTime)i=p[0].s[0],a=!0,u=0;else if(t>=p[p.length-1].t-this.offsetTime)i=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],a=!0;else{for(var m,g,f,y=u,v=p.length-1,w=!0;w&&(m=p[y],!((g=p[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:w=!1;if(f=this.keyframesMetadata[y]||{},u=y,!(a=1===m.h)){if(t>=g.t-this.offsetTime)h=1;else if(t<m.t-this.offsetTime)h=0;else{var b;f.__fnct?b=f.__fnct:(b=BezierFactory.getBezierEasing(m.o.x,m.o.y,m.i.x,m.i.y).get,f.__fnct=b),h=b((t-(m.t-this.offsetTime))/(g.t-this.offsetTime-(m.t-this.offsetTime)))}r=g.s?g.s[0]:m.e[0]}i=m.s[0]}for(l=e._length,c=i.i[0].length,n.lastIndex=u,o=0;o<l;o+=1)for(s=0;s<c;s+=1)d=a?i.i[o][s]:i.i[o][s]+(r.i[o][s]-i.i[o][s])*h,e.i[o][s]=d,d=a?i.o[o][s]:i.o[o][s]+(r.o[o][s]-i.o[o][s])*h,e.o[o][s]=d,d=a?i.v[o][s]:i.v[o][s]+(r.v[o][s]-i.v[o][s])*h,e.v[o][s]=d}function n(){var e=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==t&&(r<n&&e<n||r>i&&e>i)||(this._caching.lastIndex=r<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function i(){this.paths=this.localShapeCollection}function r(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var n,i=t._length;for(n=0;n<i;n+=1)if(t.v[n][0]!==e.v[n][0]||t.v[n][1]!==e.v[n][1]||t.o[n][0]!==e.o[n][0]||t.o[n][1]!==e.o[n][1]||t.i[n][0]!==e.i[n][0]||t.i[n][1]!==e.i[n][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function a(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var n=this.effectsSequence.length;for(e=0;e<n;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function o(t,e,n){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===n?e.pt.k:e.ks.k;this.v=shapePool.clone(r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function s(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,r,a){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===a?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var o=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,o),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=i,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[n.bind(this)]}o.prototype.interpolateShape=e,o.prototype.getValue=a,o.prototype.setVValue=r,o.prototype.addEffect=s,l.prototype.getValue=a,l.prototype.interpolateShape=e,l.prototype.setVValue=r,l.prototype.addEffect=s;var c=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],n=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2,a=3!==this.d,o=this.v;o.v[0][0]=e,o.v[0][1]=n-r,o.v[1][0]=a?e+i:e-i,o.v[1][1]=n,o.v[2][0]=e,o.v[2][1]=n+r,o.v[3][0]=a?e-i:e+i,o.v[3][1]=n,o.i[0][0]=a?e-i*t:e+i*t,o.i[0][1]=n-r,o.i[1][0]=a?e+i:e-i,o.i[1][1]=n-r*t,o.i[2][0]=a?e+i*t:e-i*t,o.i[2][1]=n+r,o.i[3][0]=a?e-i:e+i,o.i[3][1]=n+r*t,o.o[0][0]=a?e+i*t:e-i*t,o.o[0][1]=n-r,o.o[1][0]=a?e+i:e-i,o.o[1][1]=n+r*t,o.o[2][0]=a?e-i*t:e+i*t,o.o[2][1]=n+r,o.o[3][0]=a?e-i:e+i,o.o[3][1]=n-r*t}},extendPrototype([DynamicPropertyContainer],e),e}(),h=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,n,i,r=2*Math.floor(this.pt.v),a=2*Math.PI/r,o=!0,s=this.or.v,l=this.ir.v,c=this.os.v,h=this.is.v,d=2*Math.PI*s/(2*r),u=2*Math.PI*l/(2*r),p=-Math.PI/2;p+=this.r.v;var m=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<r;t+=1){n=o?c:h,i=o?d:u;var g=(e=o?s:l)*Math.cos(p),f=e*Math.sin(p),y=0===g&&0===f?0:f/Math.sqrt(g*g+f*f),v=0===g&&0===f?0:-g/Math.sqrt(g*g+f*f);g+=+this.p.v[0],f+=+this.p.v[1],this.v.setTripleAt(g,f,g-y*i*n*m,f-v*i*n*m,g+y*i*n*m,f+v*i*n*m,t,!0),o=!o,p+=a*m}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),n=2*Math.PI/e,i=this.or.v,r=this.os.v,a=2*Math.PI*i/(4*e),o=.5*-Math.PI,s=3===this.data.d?-1:1;for(o+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var l=i*Math.cos(o),c=i*Math.sin(o),h=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),d=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-h*a*r*s,c-d*a*r*s,l+h*a*r*s,c+d*a*r*s,t,!0),o+=n*s}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),d=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],n=this.s.v[0]/2,i=this.s.v[1]/2,r=bmMin(n,i,this.r.v),a=r*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+n,e-i+r,t+n,e-i+r,t+n,e-i+a,0,!0),this.v.setTripleAt(t+n,e+i-r,t+n,e+i-a,t+n,e+i-r,1,!0),0!==r?(this.v.setTripleAt(t+n-r,e+i,t+n-r,e+i,t+n-a,e+i,2,!0),this.v.setTripleAt(t-n+r,e+i,t-n+a,e+i,t-n+r,e+i,3,!0),this.v.setTripleAt(t-n,e+i-r,t-n,e+i-r,t-n,e+i-a,4,!0),this.v.setTripleAt(t-n,e-i+r,t-n,e-i+a,t-n,e-i+r,5,!0),this.v.setTripleAt(t-n+r,e-i,t-n+r,e-i,t-n+a,e-i,6,!0),this.v.setTripleAt(t+n-r,e-i,t+n-a,e-i,t+n-r,e-i,7,!0)):(this.v.setTripleAt(t-n,e+i,t-n+a,e+i,t-n,e+i,2),this.v.setTripleAt(t-n,e-i,t-n,e-i+a,t-n,e-i,3))):(this.v.setTripleAt(t+n,e-i+r,t+n,e-i+a,t+n,e-i+r,0,!0),0!==r?(this.v.setTripleAt(t+n-r,e-i,t+n-r,e-i,t+n-a,e-i,1,!0),this.v.setTripleAt(t-n+r,e-i,t-n+a,e-i,t-n+r,e-i,2,!0),this.v.setTripleAt(t-n,e-i+r,t-n,e-i+r,t-n,e-i+a,3,!0),this.v.setTripleAt(t-n,e+i-r,t-n,e+i-a,t-n,e+i-r,4,!0),this.v.setTripleAt(t-n+r,e+i,t-n+r,e+i,t-n+a,e+i,5,!0),this.v.setTripleAt(t+n-r,e+i,t+n-a,e+i,t+n-r,e+i,6,!0),this.v.setTripleAt(t+n,e+i-r,t+n,e+i-r,t+n,e+i-a,7,!0)):(this.v.setTripleAt(t-n,e-i,t-n+a,e-i,t-n,e-i,1,!0),this.v.setTripleAt(t-n,e+i,t-n,e+i-a,t-n,e+i,2,!0),this.v.setTripleAt(t+n,e+i,t+n-a,e+i,t+n,e+i,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}();return{getShapeProp:function(t,e,n){var i;return 3===n||4===n?i=(3===n?e.pt:e.ks).k.length?new l(t,e,n):new o(t,e,n):5===n?i=new d(t,e):6===n?i=new c(t,e):7===n&&(i=new h(t,e)),i.k&&t.addDynamicProperty(i),i},getConstructorFunction:function(){return o},getKeyframedConstructorFunction:function(){return l}}}(),Matrix=function(){var t=Math.cos,e=Math.sin,n=Math.tan,i=Math.round;function r(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function o(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(1,0,0,0,0,i,-r,0,0,r,i,0,0,0,0,1)}function s(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,0,r,0,0,1,0,0,-r,0,i,0,0,0,0,1)}function l(n){if(0===n)return this;var i=t(n),r=e(n);return this._t(i,-r,0,0,r,i,0,0,0,0,1,0,0,0,0,1)}function c(t,e){return this._t(1,e,t,1,0,0)}function h(t,e){return this.shear(n(t),n(e))}function d(i,r){var a=t(r),o=e(r);return this._t(a,o,0,0,-o,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(i),1,0,0,0,0,1,0,0,0,0,1)._t(a,-o,0,0,o,a,0,0,0,0,1,0,0,0,0,1)}function u(t,e,n){return n||0===n||(n=1),1===t&&1===e&&1===n?this:this._t(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1)}function p(t,e,n,i,r,a,o,s,l,c,h,d,u,p,m,g){return this.props[0]=t,this.props[1]=e,this.props[2]=n,this.props[3]=i,this.props[4]=r,this.props[5]=a,this.props[6]=o,this.props[7]=s,this.props[8]=l,this.props[9]=c,this.props[10]=h,this.props[11]=d,this.props[12]=u,this.props[13]=p,this.props[14]=m,this.props[15]=g,this}function m(t,e,n){return n=n||0,0!==t||0!==e||0!==n?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1):this}function g(t,e,n,i,r,a,o,s,l,c,h,d,u,p,m,g){var f=this.props;if(1===t&&0===e&&0===n&&0===i&&0===r&&1===a&&0===o&&0===s&&0===l&&0===c&&1===h&&0===d)return f[12]=f[12]*t+f[15]*u,f[13]=f[13]*a+f[15]*p,f[14]=f[14]*h+f[15]*m,f[15]*=g,this._identityCalculated=!1,this;var y=f[0],v=f[1],w=f[2],b=f[3],x=f[4],S=f[5],A=f[6],C=f[7],k=f[8],I=f[9],E=f[10],_=f[11],M=f[12],D=f[13],P=f[14],T=f[15];return f[0]=y*t+v*r+w*l+b*u,f[1]=y*e+v*a+w*c+b*p,f[2]=y*n+v*o+w*h+b*m,f[3]=y*i+v*s+w*d+b*g,f[4]=x*t+S*r+A*l+C*u,f[5]=x*e+S*a+A*c+C*p,f[6]=x*n+S*o+A*h+C*m,f[7]=x*i+S*s+A*d+C*g,f[8]=k*t+I*r+E*l+_*u,f[9]=k*e+I*a+E*c+_*p,f[10]=k*n+I*o+E*h+_*m,f[11]=k*i+I*s+E*d+_*g,f[12]=M*t+D*r+P*l+T*u,f[13]=M*e+D*a+P*c+T*p,f[14]=M*n+D*o+P*h+T*m,f[15]=M*i+D*s+P*d+T*g,this._identityCalculated=!1,this}function f(t){var e=t.props;return this.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function w(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function b(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function x(t,e,n){return{x:t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]}}function S(t,e,n){return t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12]}function A(t,e,n){return t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13]}function C(t,e,n){return t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]}function k(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,n=-this.props[1]/t,i=-this.props[4]/t,r=this.props[0]/t,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,s=new Matrix;return s.props[0]=e,s.props[1]=n,s.props[4]=i,s.props[5]=r,s.props[12]=a,s.props[13]=o,s}function I(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function E(t){var e,n=t.length,i=[];for(e=0;e<n;e+=1)i[e]=I(t[e]);return i}function _(t,e,n){var i=createTypedArray("float32",6);if(this.isIdentity())i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],i[4]=n[0],i[5]=n[1];else{var r=this.props[0],a=this.props[1],o=this.props[4],s=this.props[5],l=this.props[12],c=this.props[13];i[0]=t[0]*r+t[1]*o+l,i[1]=t[0]*a+t[1]*s+c,i[2]=e[0]*r+e[1]*o+l,i[3]=e[0]*a+e[1]*s+c,i[4]=n[0]*r+n[1]*o+l,i[5]=n[0]*a+n[1]*s+c}return i}function M(t,e,n){return this.isIdentity()?[t,e,n]:[t*this.props[0]+e*this.props[4]+n*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+n*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+n*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var n=this.props;return Math.round(100*(t*n[0]+e*n[4]+n[12]))/100+","+Math.round(100*(t*n[1]+e*n[5]+n[13]))/100}function P(){for(var t=0,e=this.props,n="matrix3d(";t<16;)n+=i(1e4*e[t])/1e4,n+=15===t?")":",",t+=1;return n}function T(t){return t<1e-6&&t>0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function L(){var t=this.props;return"matrix("+T(t[0])+","+T(t[1])+","+T(t[4])+","+T(t[5])+","+T(t[12])+","+T(t[13])+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=o,this.rotateY=s,this.rotateZ=l,this.skew=h,this.skewFromAxis=d,this.shear=c,this.scale=u,this.setTransform=p,this.translate=m,this.transform=g,this.multiply=f,this.applyToPoint=x,this.applyToX=S,this.applyToY=A,this.applyToZ=C,this.applyToPointArray=M,this.applyToTriplePoints=_,this.applyToPointStringified=D,this.toCSS=P,this.to2dCSS=L,this.clone=w,this.cloneFromProps=b,this.equals=v,this.inversePoints=E,this.inversePoint=I,this.getInverseMatrix=k,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),n=0;n<e.length;n+=1){var i=e[n].split("=");if(decodeURIComponent(i[0])==t)return decodeURIComponent(i[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"!==_typeof$3(exports)&&__webpack_require__.amdO}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,n){e[t]||(e[t]=n)},t.getModifier=function(t,n,i){return new e[t](n,i)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,n,i,r){var a=[];e<=1?a.push({s:t,e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var o,s,l=[],c=a.length;for(o=0;o<c;o+=1){var h,d;(s=a[o]).e*r<i||s.s*r>i+n||(h=s.s*r<=i?0:(s.s*r-i)/n,d=s.e*r>=i+n?1:(s.e*r-i)/n,l.push([h,d]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,n=t.length;for(e=0;e<n;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,n,i,r;if(this._mdf||t){var a=this.o.v%360/360;if(a<0&&(a+=1),(e=this.s.v>1?1+a:this.s.v<0?0+a:this.s.v+a)>(n=this.e.v>1?1+a:this.e.v<0?0+a:this.e.v+a)){var o=e;e=n,n=o}e=1e-4*Math.round(1e4*e),n=1e-4*Math.round(1e4*n),this.sValue=e,this.eValue=n}else e=this.sValue,n=this.eValue;var s,l,c,h,d,u=this.shapes.length,p=0;if(n===e)for(r=0;r<u;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===n&&0===e||0===n&&1===e){if(this._mdf)for(r=0;r<u;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var m,g,f=[];for(r=0;r<u;r+=1)if((m=this.shapes[r]).shape._mdf||this._mdf||t||2===this.m){if(l=(i=m.shape.paths)._length,d=0,!m.shape._mdf&&m.pathsData.length)d=m.totalShapeLength;else{for(c=this.releasePathsData(m.pathsData),s=0;s<l;s+=1)h=bez.getSegmentsLength(i.shapes[s]),c.push(h),d+=h.totalLength;m.totalShapeLength=d,m.pathsData=c}p+=d,m.shape._mdf=!0}else m.shape.paths=m.localShapeCollection;var y,v=e,w=n,b=0;for(r=u-1;r>=0;r-=1)if((m=this.shapes[r]).shape._mdf){for((g=m.localShapeCollection).releaseShapes(),2===this.m&&u>1?(y=this.calculateShapeEdges(e,n,m.totalShapeLength,b,p),b+=m.totalShapeLength):y=[[v,w]],l=y.length,s=0;s<l;s+=1){v=y[s][0],w=y[s][1],f.length=0,w<=1?f.push({s:m.totalShapeLength*v,e:m.totalShapeLength*w}):v>=1?f.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(w-1)}):(f.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),f.push({s:0,e:m.totalShapeLength*(w-1)}));var x=this.addShapes(m,f[0]);if(f[0].s!==f[0].e){if(f.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var S=x.pop();this.addPaths(x,g),x=this.addShapes(m,f[1],S)}else this.addPaths(x,g),x=this.addShapes(m,f[1]);this.addPaths(x,g)}}m.shape.paths=g}}},TrimModifier.prototype.addPaths=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)e.addShape(t[n])},TrimModifier.prototype.addSegment=function(t,e,n,i,r,a,o){r.setXYAt(e[0],e[1],"o",a),r.setXYAt(n[0],n[1],"i",a+1),o&&r.setXYAt(t[0],t[1],"v",a),r.setXYAt(i[0],i[1],"v",a+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,n,i){e.setXYAt(t[1],t[5],"o",n),e.setXYAt(t[2],t[6],"i",n+1),i&&e.setXYAt(t[0],t[4],"v",n),e.setXYAt(t[3],t[7],"v",n+1)},TrimModifier.prototype.addShapes=function(t,e,n){var i,r,a,o,s,l,c,h,d=t.pathsData,u=t.shape.paths.shapes,p=t.shape.paths._length,m=0,g=[],f=!0;for(n?(s=n._length,h=n._length):(n=shapePool.newElement(),s=0,h=0),g.push(n),i=0;i<p;i+=1){for(l=d[i].lengths,n.c=u[i].c,a=u[i].c?l.length:l.length+1,r=1;r<a;r+=1)if(m+(o=l[r-1]).addedLength<e.s)m+=o.addedLength,n.c=!1;else{if(m>e.e){n.c=!1;break}e.s<=m&&e.e>=m+o.addedLength?(this.addSegment(u[i].v[r-1],u[i].o[r-1],u[i].i[r],u[i].v[r],n,s,f),f=!1):(c=bez.getNewSegment(u[i].v[r-1],u[i].v[r],u[i].o[r-1],u[i].i[r],(e.s-m)/o.addedLength,(e.e-m)/o.addedLength,l[r-1]),this.addSegmentFromArray(c,n,s,f),f=!1,n.c=!1),m+=o.addedLength,s+=1}if(u[i].c&&l.length){if(o=l[r-1],m<=e.e){var y=l[r-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(u[i].v[r-1],u[i].o[r-1],u[i].i[0],u[i].v[0],n,s,f),f=!1):(c=bez.getNewSegment(u[i].v[r-1],u[i].v[0],u[i].o[r-1],u[i].i[0],(e.s-m)/y,(e.e-m)/y,l[r-1]),this.addSegmentFromArray(c,n,s,f),f=!1,n.c=!1)}else n.c=!1;m+=o.addedLength,s+=1}if(n._length&&(n.setXYAt(n.v[h][0],n.v[h][1],"i",h),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),m>e.e)break;i<p-1&&(n=shapePool.newElement(),f=!0,g.push(n),s=0)}return g},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var n=e/100,i=[0,0],r=t._length,a=0;for(a=0;a<r;a+=1)i[0]+=t.v[a][0],i[1]+=t.v[a][1];i[0]/=r,i[1]/=r;var o,s,l,c,h,d,u=shapePool.newElement();for(u.c=t.c,a=0;a<r;a+=1)o=t.v[a][0]+(i[0]-t.v[a][0])*n,s=t.v[a][1]+(i[1]-t.v[a][1])*n,l=t.o[a][0]+(i[0]-t.o[a][0])*-n,c=t.o[a][1]+(i[1]-t.o[a][1])*-n,h=t.i[a][0]+(i[0]-t.i[a][0])*-n,d=t.i[a][1]+(i[1]-t.i[a][1])*-n,u.setTripleAt(o,s,l,c,h,d,a);return u},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.amount.v;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,n){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var i,r=e.or.k.length;for(i=0;i<r;i+=1)e.or.k[i].to=null,e.or.k[i].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var n;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var i,r;if(n=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/n,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/n,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(i=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],r=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(i[0]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),i[1]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),r[0]=a.getValueAtTime(a.keyframes[0].t/n,0),r[1]=o.getValueAtTime(o.keyframes[0].t/n,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(i[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),i[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),r[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0),r[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0)):(i=[a.pv,o.pv],r[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime),r[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime))}else i=r=t;this.v.rotate(-Math.atan2(i[1]-r[1],i[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,n,i){return new e(t,n,i)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,n){return t*(1-n)+e*n}function lerpPoint(t,e,n){return[lerp(t[0],e[0],n),lerp(t[1],e[1],n)]}function quadRoots(t,e,n){if(0===t)return[];var i=e*e-4*t*n;if(i<0)return[];var r=-e/(2*t);if(0===i)return[r];var a=Math.sqrt(i)/(2*t);return[r-a,r+a]}function polynomialCoefficients(t,e,n,i){return[3*e-t-3*n+i,3*t-6*e+3*n,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,n,i,r){r&&pointEqual(t,e)&&(e=lerpPoint(t,i,1/3)),r&&pointEqual(n,i)&&(n=lerpPoint(t,i,2/3));var a=polynomialCoefficients(t[0],e[0],n[0],i[0]),o=polynomialCoefficients(t[1],e[1],n[1],i[1]);this.a=[a[0],o[0]],this.b=[a[1],o[1]],this.c=[a[2],o[2]],this.d=[a[3],o[3]],this.points=[t,e,n,i]}function extrema(t,e){var n=t.points[0][e],i=t.points[t.points.length-1][e];if(n>i){var r=i;i=n,n=r}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),o=0;o<a.length;o+=1)if(a[o]>0&&a[o]<1){var s=t.point(a[o])[e];s<n?n=s:s>i&&(i=s)}return{min:n,max:i}}function intersectData(t,e,n){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+n)/2,t1:e,t2:n}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height}function intersectsImpl(t,e,n,i,r,a){if(boxIntersect(t,e))if(n>=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)r.push([t.t,e.t]);else{var o=splitData(t),s=splitData(e);intersectsImpl(o[0],s[0],n+1,i,r,a),intersectsImpl(o[0],s[1],n+1,i,r,a),intersectsImpl(o[1],s[0],n+1,i,r,a),intersectsImpl(o[1],s[1],n+1,i,r,a)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,n,i){var r=[t[0],t[1],1],a=[e[0],e[1],1],o=[n[0],n[1],1],s=[i[0],i[1],1],l=crossProduct(crossProduct(r,a),crossProduct(o,s));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(t,e,n){return[t[0]+Math.cos(e)*n,t[1]-Math.sin(e)*n]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,n,i,r,a,o){var s=n-Math.PI/2,l=n+Math.PI/2,c=e[0]+Math.cos(n)*i*r,h=e[1]-Math.sin(n)*i*r;t.setTripleAt(c,h,c+Math.cos(s)*a,h-Math.sin(s)*a,c+Math.cos(l)*o,h-Math.sin(l)*o,t.length())}function getPerpendicularVector(t,e){var n=[e[0]-t[0],e[1]-t[1]],i=.5*-Math.PI;return[Math.cos(i)*n[0]-Math.sin(i)*n[1],Math.sin(i)*n[0]+Math.cos(i)*n[1]]}function getProjectingAngle(t,e){var n=0===e?t.length()-1:e-1,i=(e+1)%t.length(),r=getPerpendicularVector(t.v[n],t.v[i]);return Math.atan2(0,1)-Math.atan2(r[1],r[0])}function zigZagCorner(t,e,n,i,r,a,o){var s=getProjectingAngle(e,n),l=e.v[n%e._length],c=e.v[0===n?e._length-1:n-1],h=e.v[(n+1)%e._length],d=2===a?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,u=2===a?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0;setPoint(t,e.v[n%e._length],s,o,i,u/(2*(r+1)),d/(2*(r+1)),a)}function zigZagSegment(t,e,n,i,r,a){for(var o=0;o<i;o+=1){var s=(o+1)/(i+1),l=2===r?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,c=e.normalAngle(s);setPoint(t,e.point(s),c,a,n,l/(2*(i+1)),l/(2*(i+1)),r),a=-a}return a}function linearOffset(t,e,n){var i=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,i,n),polarOffset(e,i,n)]}function offsetSegment(t,e){var n,i,r,a,o,s,l;n=(l=linearOffset(t.points[0],t.points[1],e))[0],i=l[1],r=(l=linearOffset(t.points[1],t.points[2],e))[0],a=l[1],o=(l=linearOffset(t.points[2],t.points[3],e))[0],s=l[1];var c=lineIntersection(n,i,r,a);null===c&&(c=i);var h=lineIntersection(o,s,r,a);return null===h&&(h=o),new PolynomialBezier(n,c,h,s)}function joinLines(t,e,n,i,r){var a=e.points[3],o=n.points[0];if(3===i)return a;if(pointEqual(a,o))return a;if(2===i){var s=-e.tangentAngle(1),l=-n.tangentAngle(0)+Math.PI,c=lineIntersection(a,polarOffset(a,s+Math.PI/2,100),o,polarOffset(o,s+Math.PI/2,100)),h=c?pointDistance(c,a):pointDistance(a,o)/2,d=polarOffset(a,s,2*h*roundCorner);return t.setXYAt(d[0],d[1],"o",t.length()-1),d=polarOffset(o,l,2*h*roundCorner),t.setTripleAt(o[0],o[1],o[0],o[1],d[0],d[1],t.length()),o}var u=lineIntersection(pointEqual(a,e.points[2])?e.points[0]:e.points[2],a,o,pointEqual(o,n.points[1])?n.points[3]:n.points[1]);return u&&pointDistance(u,a)<r?(t.setTripleAt(u[0],u[1],u[0],u[1],u[0],u[1],t.length()),u):a}function getIntersection(t,e){var n=t.intersections(e);return n.length&&floatEqual(n[0][0],1)&&n.shift(),n.length?n[0]:null}function pruneSegmentIntersection(t,e){var n=t.slice(),i=e.slice(),r=getIntersection(t[t.length-1],e[0]);return r&&(n[t.length-1]=t[t.length-1].split(r[0])[0],i[0]=e[0].split(r[1])[1]),t.length>1&&e.length>1&&(r=getIntersection(t[0],e[e.length-1]))?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[n,i]}function pruneIntersections(t){for(var e,n=1;n<t.length;n+=1)e=pruneSegmentIntersection(t[n-1],t[n]),t[n-1]=e[0],t[n]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var n,i,r,a,o=t.inflectionPoints();if(0===o.length)return[offsetSegment(t,e)];if(1===o.length||floatEqual(o[1],1))return n=(r=t.split(o[0]))[0],i=r[1],[offsetSegment(n,e),offsetSegment(i,e)];n=(r=t.split(o[0]))[0];var s=(o[1]-o[0])/(1-o[0]);return a=(r=r[1].split(s))[0],i=r[1],[offsetSegment(n,e),offsetSegment(a,e),offsetSegment(i,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],n="normal",i="normal",r=e.length,a=0;a<r;a+=1)switch(e[a].toLowerCase()){case"italic":i="italic";break;case"bold":n="700";break;case"black":n="900";break;case"medium":n="500";break;case"regular":case"normal":n="400";break;case"light":case"thin":n="200"}return{style:i,weight:t.fWeight||n}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,n,i,r,a){var o=a?-1:1,s=i.s.v[0]+(1-i.s.v[0])*(1-r),l=i.s.v[1]+(1-i.s.v[1])*(1-r);t.translate(i.p.v[0]*o*r,i.p.v[1]*o*r,i.p.v[2]),e.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),e.rotate(-i.r.v*o*r),e.translate(i.a.v[0],i.a.v[1],i.a.v[2]),n.translate(-i.a.v[0],-i.a.v[1],i.a.v[2]),n.scale(a?1/s:s,a?1/l:l),n.translate(i.a.v[0],i.a.v[1],i.a.v[2])},RepeaterModifier.prototype.init=function(t,e,n,i){for(this.elem=t,this.arr=e,this.pos=n,this.elemsData=i,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[n]);n>0;)n-=1,this._elements.unshift(e[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,n=t.length;for(e=0;e<n;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)t[n]._render=e,"gr"===t[n].ty&&this.changeGroupRender(t[n].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,n,i,r,a,o=!1;if(this._mdf||t){var s,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}for(a=0,i=0;i<=this._groups.length-1;i+=1){if(s=a<l,this._groups[i]._render=s,this.changeGroupRender(this._groups[i].it,s),!s){var h=this.elemsData[i].it,d=h[h.length-1];0!==d.transform.op.v?(d.transform.op._mdf=!0,d.transform.op.v=0):d.transform.op._mdf=!1}a+=1}this._currentCopies=l;var u=this.o.v,p=u%1,m=u>0?Math.floor(u):Math.ceil(u),g=this.pMatrix.props,f=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,w,b=0;if(u>0){for(;b<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),b+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),b+=p)}else if(u<0){for(;b>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),b-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),b-=p)}for(i=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,a=this._currentCopies;a;){if(w=(n=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==b){for((0!==i&&1===r||i!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9],f[10],f[11],f[12],f[13],f[14],f[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),v=0;v<w;v+=1)n[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<w;v+=1)n[v]=this.matrix.props[v];b+=1,a-=1,i+=r}}else for(a=this._currentCopies,i=0,r=1;a;)n=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,a-=1,i+=r;return o},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var n,i=shapePool.newElement();i.c=t.c;var r,a,o,s,l,c,h,d,u,p,m,g,f=t._length,y=0;for(n=0;n<f;n+=1)r=t.v[n],o=t.o[n],a=t.i[n],r[0]===o[0]&&r[1]===o[1]&&r[0]===a[0]&&r[1]===a[1]?0!==n&&n!==f-1||t.c?(s=0===n?t.v[f-1]:t.v[n-1],c=(l=Math.sqrt(Math.pow(r[0]-s[0],2)+Math.pow(r[1]-s[1],2)))?Math.min(l/2,e)/l:0,h=m=r[0]+(s[0]-r[0])*c,d=g=r[1]-(r[1]-s[1])*c,u=h-(h-r[0])*roundCorner,p=d-(d-r[1])*roundCorner,i.setTripleAt(h,d,u,p,m,g,y),y+=1,s=n===f-1?t.v[0]:t.v[n+1],c=(l=Math.sqrt(Math.pow(r[0]-s[0],2)+Math.pow(r[1]-s[1],2)))?Math.min(l/2,e)/l:0,h=u=r[0]+(s[0]-r[0])*c,d=p=r[1]+(s[1]-r[1])*c,m=h-(h-r[0])*roundCorner,g=d-(d-r[1])*roundCorner,i.setTripleAt(h,d,u,p,m,g,y),y+=1):(i.setTripleAt(r[0],r[1],o[0],o[1],a[0],a[1],y),y+=1):(i.setTripleAt(t.v[n][0],t.v[n][1],t.o[n][0],t.o[n][1],t.i[n][0],t.i[n][1],y),y+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.rd.v;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,n=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(n<0)return[];var i=Math.sqrt(n);return floatZero(i)?i>0&&i<1?[e]:[]:[e-i,e+i].filter((function(t){return t>0&&t<1}))},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),n=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),r=lerpPoint(e,n,t),a=lerpPoint(n,i,t),o=lerpPoint(r,a,t);return[new PolynomialBezier(this.points[0],e,r,o,!0),new PolynomialBezier(o,a,i,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,n){void 0===e&&(e=2),void 0===n&&(n=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,n),i},PolynomialBezier.shapeSegment=function(t,e){var n=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[n],t.v[n],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var n=(e+1)%t.length();return new PolynomialBezier(t.v[n],t.i[n],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(t,e,n,i){var r=t._length,a=shapePool.newElement();if(a.c=t.c,t.c||(r-=1),0===r)return a;var o=-1,s=PolynomialBezier.shapeSegment(t,0);zigZagCorner(a,t,0,e,n,i,o);for(var l=0;l<r;l+=1)o=zigZagSegment(a,s,e,n,i,-o),s=l!==r-1||t.c?PolynomialBezier.shapeSegment(t,(l+1)%r):null,zigZagCorner(a,t,l+1,e,n,i,o);return a},ZigZagModifier.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),h=this.pointsType.v;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l,c,h));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(t,e,n,i){var r=shapePool.newElement();r.c=t.c;var a,o,s,l=t.length();t.c||(l-=1);var c=[];for(a=0;a<l;a+=1)s=PolynomialBezier.shapeSegment(t,a),c.push(offsetSegmentSplit(s,e));if(!t.c)for(a=l-1;a>=0;a-=1)s=PolynomialBezier.shapeSegmentInverted(t,a),c.push(offsetSegmentSplit(s,e));c=pruneIntersections(c);var h=null,d=null;for(a=0;a<c.length;a+=1){var u=c[a];for(d&&(h=joinLines(r,d,u[0],n,i)),d=u[u.length-1],o=0;o<u.length;o+=1)s=u[o],h&&pointEqual(s.points[0],h)?r.setXYAt(s.points[1][0],s.points[1][1],"o",r.length()-1):r.setTripleAt(s.points[0][0],s.points[0][1],s.points[1][0],s.points[1][1],s.points[0][0],s.points[0][1],r.length()),r.setTripleAt(s.points[3][0],s.points[3][1],s.points[3][0],s.points[3][1],s.points[2][0],s.points[2][1],r.length()),h=s.points[3]}return c.length&&joinLines(r,d,c[0][0],n,i),r},OffsetPathModifier.prototype.processShapes=function(t){var e,n,i,r,a,o,s=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,h=this.lineJoin;if(0!==l)for(n=0;n<s;n+=1){if(o=(a=this.shapes[n]).localShapeCollection,a.shape._mdf||this._mdf||t)for(o.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,r=a.shape.paths._length,i=0;i<r;i+=1)o.addShape(this.processPath(e[i],l,h,c));a.shape.paths=a.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=127988,i=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function r(t,e){var n=createTag("span");n.setAttribute("aria-hidden",!0),n.style.fontFamily=e;var i=createTag("span");i.innerText="giItT1WQy@!-/#",n.style.position="absolute",n.style.left="-10000px",n.style.top="-10000px",n.style.fontSize="300px",n.style.fontVariant="normal",n.style.fontStyle="normal",n.style.fontWeight="normal",n.style.letterSpacing="0",n.appendChild(i),document.body.appendChild(n);var r=i.offsetWidth;return i.style.fontFamily=function(t){var e,n=t.split(","),i=n.length,r=[];for(e=0;e<i;e+=1)"sans-serif"!==n[e]&&"monospace"!==n[e]&&r.push(n[e]);return r.join(",")}(t)+", "+e,{node:i,w:r,parent:n}}function a(t,e){var n,i=document.body&&e?"svg":"canvas",r=getFontProperties(t);if("svg"===i){var a=createNS("text");a.style.fontSize="100px",a.setAttribute("font-family",t.fFamily),a.setAttribute("font-style",r.style),a.setAttribute("font-weight",r.weight),a.textContent="1",t.fClass?(a.style.fontFamily="inherit",a.setAttribute("class",t.fClass)):a.style.fontFamily=t.fFamily,e.appendChild(a),n=a}else{var o=new OffscreenCanvas(500,500).getContext("2d");o.font=r.style+" "+r.weight+" 100px "+t.fFamily,n=o}return{measureText:function(t){return"svg"===i?(n.textContent=t,n.getComputedTextLength()):n.measureText(t).width}}}function o(t){var e=0,n=t.charCodeAt(0);if(n>=55296&&n<=56319){var i=t.charCodeAt(1);i>=56320&&i<=57343&&(e=1024*(n-55296)+i-56320+65536)}return e}function s(t){var e=o(t);return e>=127462&&e<=127487}var l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};l.isModifier=function(t,e){var n=t.toString(16)+e.toString(16);return-1!==i.indexOf(n)},l.isZeroWidthJoiner=function(t){return 8205===t},l.isFlagEmoji=function(t){return s(t.substr(0,2))&&s(t.substr(2,2))},l.isRegionalCode=s,l.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},l.isRegionalFlag=function(t,e){var i=o(t.substr(e,2));if(i!==n)return!1;var r=0;for(e+=2;r<5;){if((i=o(t.substr(e,2)))<917601||i>917626)return!1;r+=1,e+=2}return 917631===o(t.substr(e,2))},l.isVariationSelector=function(t){return 65039===t},l.BLACK_FLAG_CODE_POINT=n;var c={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var n,i,r=t.length,a=this.chars.length;for(e=0;e<r;e+=1){for(n=0,i=!1;n<a;)this.chars[n].style===t[e].style&&this.chars[n].fFamily===t[e].fFamily&&this.chars[n].ch===t[e].ch&&(i=!0),n+=1;i||(this.chars.push(t[e]),a+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);if(!document.body)return this.isLoaded=!0,t.list.forEach((function(t){t.helper=a(t),t.cache={}})),void(this.fonts=t.list);var n,i=t.list,o=i.length,s=o;for(n=0;n<o;n+=1){var l,c,h=!0;if(i[n].loaded=!1,i[n].monoCase=r(i[n].fFamily,"monospace"),i[n].sansCase=r(i[n].fFamily,"sans-serif"),i[n].fPath){if("p"===i[n].fOrigin||3===i[n].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+i[n].fFamily+'"], style[f-origin="3"][f-family="'+i[n].fFamily+'"]')).length>0&&(h=!1),h){var d=createTag("style");d.setAttribute("f-forigin",i[n].fOrigin),d.setAttribute("f-origin",i[n].origin),d.setAttribute("f-family",i[n].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+i[n].fFamily+"; font-style: normal; src: url('"+i[n].fPath+"');}",e.appendChild(d)}}else if("g"===i[n].fOrigin||1===i[n].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(i[n].fPath)&&(h=!1);if(h){var u=createTag("link");u.setAttribute("f-forigin",i[n].fOrigin),u.setAttribute("f-origin",i[n].origin),u.type="text/css",u.rel="stylesheet",u.href=i[n].fPath,document.body.appendChild(u)}}else if("t"===i[n].fOrigin||2===i[n].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)i[n].fPath===l[c].src&&(h=!1);if(h){var p=createTag("link");p.setAttribute("f-forigin",i[n].fOrigin),p.setAttribute("f-origin",i[n].origin),p.setAttribute("rel","stylesheet"),p.setAttribute("href",i[n].fPath),e.appendChild(p)}}}else i[n].loaded=!0,s-=1;i[n].helper=a(i[n],e),i[n].cache={},this.fonts.push(i[n])}0===s?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,n,i){for(var r=0,a=this.chars.length;r<a;){if(this.chars[r].ch===e&&this.chars[r].style===n&&this.chars[r].fFamily===i)return this.chars[r];r+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,n,i)),t},getFontByName:function(t){for(var e=0,n=this.fonts.length;e<n;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]},measureText:function(t,e,n){var i=this.getFontByName(e),r=t;if(!i.cache[r]){var a=i.helper;if(" "===t){var o=a.measureText("|"+t+"|"),s=a.measureText("||");i.cache[r]=(o-s)/100}else i.cache[r]=a.measureText(t)/100}return i.cache[r]*n},checkLoadedFonts:function(){var t,e,n,i=this.fonts.length,r=i;for(t=0;t<i;t+=1)this.fonts[t].loaded?r-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,n=this.fonts[t].monoCase.w,e.offsetWidth!==n?(r-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,n=this.fonts[t].sansCase.w,e.offsetWidth!==n&&(r-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return l.prototype=c,l}();function SlotManager(t){this.animationData=t}function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,0,0,n)}function AngleEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,0,0,n)}function ColorEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,1,0,n)}function PointEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,1,0,n)}function LayerIndexEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,0,0,n)}function MaskIndexEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,0,0,n)}function CheckboxEffect(t,e,n){this.p=PropertyFactory.getProp(e,t.v,0,0,n)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var n,i=t.ef||[];this.effectElements=[];var r,a=i.length;for(n=0;n<a;n+=1)r=new GroupEffect(i[n],e),this.effectElements.push(r)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function FootageElement(t,e,n){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,n)}function AudioElement(t,e,n){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,n),this._isPlaying=!1,this._canPlay=!1;var i=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(i),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var n;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,r=this.data.ef.length,a=this.data.ef;for(n=0;n<r;n+=1){switch(i=null,a[n].ty){case 0:i=new SliderEffect(a[n],e,this);break;case 1:i=new AngleEffect(a[n],e,this);break;case 2:i=new ColorEffect(a[n],e,this);break;case 3:i=new PointEffect(a[n],e,this);break;case 4:case 7:i=new CheckboxEffect(a[n],e,this);break;case 10:i=new LayerIndexEffect(a[n],e,this);break;case 11:i=new MaskIndexEffect(a[n],e,this);break;case 5:i=new EffectsManager(a[n],e,this);break;default:i=new NoValueEffect(a[n],e,this)}i&&this.effectElements.push(i)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var e=t("layer"),n=t("effects"),i=t("shape"),r=t("text"),a=t("comp");this.layerInterface=e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var o=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(o),0===this.data.ty||this.data.xt?this.compInterface=a(this):4===this.data.ty?(this.layerInterface.shapeInterface=i(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=r(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,n){this.globalData=e,this.comp=n,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var n,i=this.dynamicProperties.length;for(n=0;n<i;n+=1)(e||this._isParent&&"transform"===this.dynamicProperties[n].propType)&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,n,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(n=this.layers[e]).ip-n.st<=t-this.layers[e].st&&n.op-n.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var n,i=t.length,r=this.layers.length;for(e=0;e<i;e+=1)for(n=0;n<r;){if(this.layers[n].id===t[e].id){this.layers[n]=t[e];break}n+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,n){for(var i=this.elements,r=this.layers,a=0,o=r.length;a<o;)r[a].ind==e&&(i[a]&&!0!==i[a]?(n.push(i[a]),i[a].setAsParent(),void 0!==r[a].parent?this.buildElementParenting(t,r[a].parent,n):t.setHierarchy(n)):(this.buildItem(a),this.addPendingElement(t))),a+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,n=t.length;for(e=0;e<n;e+=1)if(t[e].xt){var i=this.createComp(t[e]);i.initExpressions(),this.globalData.projectInterface.registerComposition(i)}},BaseRenderer.prototype.getElementById=function(t){var e,n=this.elements.length;for(e=0;e<n;e+=1)if(this.elements[e].data.ind===t)return this.elements[e];return null},BaseRenderer.prototype.getElementByPath=function(t){var e,n=t.shift();if("number"==typeof n)e=this.elements[n];else{var i,r=this.elements.length;for(i=0;i<r;i+=1)if(this.elements[i].data.nm===n){e=this.elements[i];break}}return 0===t.length?e:e.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(t,e,n){this.data=t,this.element=e,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var i,r,a=this.globalData.defs,o=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(o),this.solidPath="";var s,l,c,h,d,u,p=this.masksProperties,m=0,g=[],f=createElementID(),y="clipPath",v="clip-path";for(i=0;i<o;i+=1)if(("a"!==p[i].mode&&"n"!==p[i].mode||p[i].inv||100!==p[i].o.k||p[i].o.x)&&(y="mask",v="mask"),"s"!==p[i].mode&&"i"!==p[i].mode||0!==m?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),g.push(c)),r=createNS("path"),"n"===p[i].mode)this.viewData[i]={op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),elem:r,lastPath:""},a.appendChild(r);else{var w;if(m+=1,r.setAttribute("fill","s"===p[i].mode?"#000000":"#ffffff"),r.setAttribute("clip-rule","nonzero"),0!==p[i].x.k?(y="mask",v="mask",u=PropertyFactory.getProp(this.element,p[i].x,0,null,this.element),w=createElementID(),(h=createNS("filter")).setAttribute("id",w),(d=createNS("feMorphology")).setAttribute("operator","erode"),d.setAttribute("in","SourceGraphic"),d.setAttribute("radius","0"),h.appendChild(d),a.appendChild(h),r.setAttribute("stroke","s"===p[i].mode?"#000000":"#ffffff")):(d=null,u=null),this.storedData[i]={elem:r,x:u,expan:d,lastPath:"",lastOperator:"",filterId:w,lastRadius:0},"i"===p[i].mode){l=g.length;var b=createNS("g");for(s=0;s<l;s+=1)b.appendChild(g[s]);var x=createNS("mask");x.setAttribute("mask-type","alpha"),x.setAttribute("id",f+"_"+m),x.appendChild(r),a.appendChild(x),b.setAttribute("mask","url("+getLocationHref()+"#"+f+"_"+m+")"),g.length=0,g.push(b)}else g.push(r);p[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:r,lastPath:"",op:PropertyFactory.getProp(this.element,p[i].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,p[i],3),invRect:c},this.viewData[i].prop.k||this.drawPath(p[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=createNS(y),o=g.length,i=0;i<o;i+=1)this.maskElement.appendChild(g[i]);m>0&&(this.maskElement.setAttribute("id",f),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+f+")"),a.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,n=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<i;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),n=0;n<i;n+=1)e.multiply(this.hierarchy[n].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var t=0,e=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<e;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),t+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),t=1;t<e;t+=1){var i=this.localTransforms[t].matrix;n.multiply(i)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var r=this.finalTransform.localOpacity;for(t=0;t<e;t+=1)r*=.01*this.localTransforms[t].opacity;this.finalTransform.localOpacity=r}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var t=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(t.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var e=0,n=t.length;for(e=0;e<n;e+=1)this.localTransforms.push(t[e])}}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var n,i=!0,r=this.comp;i;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):i=!1;var a,o=e.length;for(n=0;n<o;n+=1)a=e[n].mat.applyToPointArray(0,0,0),t=[t[0]-a[0],t[1]-a[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,n=this.element.finalTransform.mat,i=this.masksProperties.length;for(e=0;e<i;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",n.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var r=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),r.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,(t+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,n){var i,r,a=" M"+e.v[0][0]+","+e.v[0][1];for(r=e._length,i=1;i<r;i+=1)a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[i][0]+","+e.i[i][1]+" "+e.v[i][0]+","+e.v[i][1];if(e.c&&r>1&&(a+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),n.lastPath!==a){var o="";n.elem&&(e.c&&(o=t.inv?this.solidPath+a:a),n.elem.setAttribute("d",o)),n.lastPath=a}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory={createFilter:function(t,e){var n=createNS("filter");return n.setAttribute("id",t),!0!==e&&(n.setAttribute("filterUnits","objectBoundingBox"),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%")),n},createAlphaToLuminanceFilter:function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t}},featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,n,i="SourceGraphic",r=t.data.ef?t.data.ef.length:0,a=createElementID(),o=filtersFactory.createFilter(a,!0),s=0;for(this.filters=[],e=0;e<r;e+=1){n=null;var l=t.data.ef[e].ty;registeredEffects$1[l]&&(n=new(0,registeredEffects$1[l].effect)(o,t.effectsManager.effectElements[e],t,idPrefix+s,i),i=idPrefix+s,registeredEffects$1[l].countsAsEffect&&(s+=1)),n&&this.filters.push(n)}s&&(t.globalData.defs.appendChild(o),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+a+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect$1(t,e,n){registeredEffects$1[t]={effect:e,countsAsEffect:n}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(t,e,n){this.assetData=e.getAssetData(t.refId),this.assetData&&this.assetData.sid&&(this.assetData=e.slotManager.getProp(this.assetData)),this.initElement(t,e,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,n=this.filters.length;for(e=0;e<n;e+=1)this.filters[e].renderFrame(t)},SVGEffects.prototype.getEffects=function(t){var e,n=this.filters.length,i=[];for(e=0;e<n;e+=1)this.filters[e].type===t&&i.push(this.filters[e]);return i},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var e=createNS("g");e.setAttribute("id",this.layerId),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var n=createNS("clipPath"),i=createNS("path");i.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var r=createElementID();if(n.setAttribute("id",r),n.appendChild(i),this.globalData.defs.appendChild(n),this.checkMasks()){var a=createNS("g");a.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),a.appendChild(this.layerElement),this.transformedElement=a,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(t){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[t]){var e,n,i,r,a=this.layerId+"_"+t;if(1===t||3===t){var o=createNS("mask");o.setAttribute("id",a),o.setAttribute("mask-type",3===t?"luminance":"alpha"),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),o.appendChild(i),this.globalData.defs.appendChild(o),featureSupport.maskType||1!==t||(o.setAttribute("mask-type","luminance"),e=createElementID(),n=filtersFactory.createFilter(e),this.globalData.defs.appendChild(n),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(i),o.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+e+")"))}else if(2===t){var s=createNS("mask");s.setAttribute("id",a),s.setAttribute("mask-type","alpha");var l=createNS("g");s.appendChild(l),e=createElementID(),n=filtersFactory.createFilter(e);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),n.appendChild(c);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),c.appendChild(h),this.globalData.defs.appendChild(n);var d=createNS("rect");d.setAttribute("width",this.comp.data.w),d.setAttribute("height",this.comp.data.h),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("fill","#ffffff"),d.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+e+")"),l.appendChild(d),(i=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(i),featureSupport.maskType||(s.setAttribute("mask-type","luminance"),n.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),l.appendChild(d),r.appendChild(this.layerElement),l.appendChild(r)),this.globalData.defs.appendChild(s)}this.matteMasks[t]=a}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initTransform(t,e,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,n=this.shapeModifiers.length;for(e=0;e<n;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,n=0,i=e.length;n<i;){if(e[n].elem===t)return e[n].pos;n+=1}return 0},addProcessedElement:function(t,e){for(var n=this.processedElements,i=n.length;i;)if(n[i-=1].elem===t)return void(n[i].pos=e);n.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,n){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=n,this.lvl=e,this._isAnimated=!!n.k;for(var i=0,r=t.length;i<r;){if(t[i].mProps.dynamicProperties.length){this._isAnimated=!0;break}i+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,n,i){var r;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=n,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(i);var a,o=e.length||0;for(r=0;r<o;r+=1)a=PropertyFactory.getProp(t,e[r].v,0,0,this),this.k=a.k||this.k,this.dataProps[r]={n:e[r].n,p:a};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=n}function SVGNoStyleData(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=n}function GradientProperty(t,e,n){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var i=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",i),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=i,this.initDynamicPropertyContainer(n),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,n)}function SVGGradientStrokeStyleData(t,e,n){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,n),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,n){this.transform={mProps:t,op:e,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,n=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<n;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var n=0,i=this.o.length/2;n<i;){if(Math.abs(t[4*n]-t[4*e+2*n])>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,n,i,r=4*this.data.p;for(e=0;e<r;e+=1)n=e%4==0?100:255,i=Math.round(this.prop.v[e]*n),this.c[e]!==i&&(this.c[e]=i,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=4*this.data.p;e<r;e+=1)n=e%2==0?100:1,i=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==i&&(this.o[e-4*this.data.p]=i,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,n){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,e),this.setGradientOpacity(e,n),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var n=createElementID(),i=createNS(1===e.t?"linearGradient":"radialGradient");i.setAttribute("id",n),i.setAttribute("spreadMethod","pad"),i.setAttribute("gradientUnits","userSpaceOnUse");var r,a,o,s=[];for(o=4*e.g.p,a=0;a<o;a+=4)r=createNS("stop"),i.appendChild(r),s.push(r);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+n+")"),this.gf=i,this.cst=s},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var n,i,r,a=createNS("mask"),o=createNS("path");a.appendChild(o);var s=createElementID(),l=createElementID();a.setAttribute("id",l);var c=createNS(1===t.t?"linearGradient":"radialGradient");c.setAttribute("id",s),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),r=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var h=this.stops;for(i=4*t.g.p;i<r;i+=2)(n=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(n),h.push(n);o.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+s+")"),"gs"===t.ty&&(o.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=c,this.ms=a,this.ost=h,this.maskId=l,e.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,n,i){if(0===e)return"";var r,a=t.o,o=t.i,s=t.v,l=" M"+i.applyToPointStringified(s[0][0],s[0][1]);for(r=1;r<e;r+=1)l+=" C"+i.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+i.applyToPointStringified(o[r][0],o[r][1])+" "+i.applyToPointStringified(s[r][0],s[r][1]);return n&&e&&(l+=" C"+i.applyToPointStringified(a[r-1][0],a[r-1][1])+" "+i.applyToPointStringified(o[0][0],o[0][1])+" "+i.applyToPointStringified(s[0][0],s[0][1]),l+="z"),l},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function n(t,e,n){(n||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(n||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(){}function r(n,i,r){var a,o,s,l,c,h,d,u,p,m,g=i.styles.length,f=i.lvl;for(h=0;h<g;h+=1){if(l=i.sh._mdf||r,i.styles[h].lvl<f){for(u=e.reset(),p=f-i.styles[h].lvl,m=i.transformers.length-1;!l&&p>0;)l=i.transformers[m].mProps._mdf||l,p-=1,m-=1;if(l)for(p=f-i.styles[h].lvl,m=i.transformers.length-1;p>0;)u.multiply(i.transformers[m].mProps.v),p-=1,m-=1}else u=t;if(o=(d=i.sh.paths)._length,l){for(s="",a=0;a<o;a+=1)(c=d.shapes[a])&&c._length&&(s+=buildShapeString(c,c._length,c.c,u));i.caches[h]=s}else s=i.caches[h];i.styles[h].d+=!0===n.hd?"":s,i.styles[h]._mdf=l||i.styles[h]._mdf}}function a(t,e,n){var i=e.style;(e.c._mdf||n)&&i.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||n)&&i.pElem.setAttribute("fill-opacity",e.o.v)}function o(t,e,n){s(t,e,n),l(0,e,n)}function s(t,e,n){var i,r,a,o,s,l=e.gf,c=e.g._hasOpacity,h=e.s.v,d=e.e.v;if(e.o._mdf||n){var u="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(u,e.o.v)}if(e.s._mdf||n){var p=1===t.t?"x1":"cx",m="x1"===p?"y1":"cy";l.setAttribute(p,h[0]),l.setAttribute(m,h[1]),c&&!e.g._collapsable&&(e.of.setAttribute(p,h[0]),e.of.setAttribute(m,h[1]))}if(e.g._cmdf||n){i=e.cst;var g=e.g.c;for(a=i.length,r=0;r<a;r+=1)(o=i[r]).setAttribute("offset",g[4*r]+"%"),o.setAttribute("stop-color","rgb("+g[4*r+1]+","+g[4*r+2]+","+g[4*r+3]+")")}if(c&&(e.g._omdf||n)){var f=e.g.o;for(a=(i=e.g._collapsable?e.cst:e.ost).length,r=0;r<a;r+=1)o=i[r],e.g._collapsable||o.setAttribute("offset",f[2*r]+"%"),o.setAttribute("stop-opacity",f[2*r+1])}if(1===t.t)(e.e._mdf||n)&&(l.setAttribute("x2",d[0]),l.setAttribute("y2",d[1]),c&&!e.g._collapsable&&(e.of.setAttribute("x2",d[0]),e.of.setAttribute("y2",d[1])));else if((e.s._mdf||e.e._mdf||n)&&(s=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2)),l.setAttribute("r",s),c&&!e.g._collapsable&&e.of.setAttribute("r",s)),e.e._mdf||e.h._mdf||e.a._mdf||n){s||(s=Math.sqrt(Math.pow(h[0]-d[0],2)+Math.pow(h[1]-d[1],2)));var y=Math.atan2(d[1]-h[1],d[0]-h[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var w=s*v,b=Math.cos(y+e.a.v)*w+h[0],x=Math.sin(y+e.a.v)*w+h[1];l.setAttribute("fx",b),l.setAttribute("fy",x),c&&!e.g._collapsable&&(e.of.setAttribute("fx",b),e.of.setAttribute("fy",x))}}function l(t,e,n){var i=e.style,r=e.d;r&&(r._mdf||n)&&r.dashStr&&(i.pElem.setAttribute("stroke-dasharray",r.dashStr),i.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||n)&&i.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||n)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||n)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return a;case"gf":return s;case"gs":return o;case"st":return l;case"sh":case"el":case"rc":case"sr":return r;case"tr":return n;case"no":return i;default:return null}}}}();function SVGShapeElement(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,n),this.prevViewData=[]}function LetterProps(t,e,n,i,r,a){this.o=t,this.sw=e,this.sc=n,this.fc=i,this.m=r,this.p=a,this._mdf={o:!0,sw:!!e,sc:!!n,fc:!!i,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,n,i,r=this.shapes.length,a=this.stylesList.length,o=[],s=!1;for(n=0;n<a;n+=1){for(i=this.stylesList[n],s=!1,o.length=0,t=0;t<r;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(i)&&(o.push(e),s=e._isAnimated||s);o.length>1&&s&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,n=t.length;for(e=0;e<n;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var n,i=new SVGStyleData(t,e),r=i.pElem;return"st"===t.ty?n=new SVGStrokeStyleData(this,t,i):"fl"===t.ty?n=new SVGFillStyleData(this,t,i):"gf"===t.ty||"gs"===t.ty?(n=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,i),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),r.setAttribute("mask","url("+getLocationHref()+"#"+n.maskId+")"))):"no"===t.ty&&(n=new SVGNoStyleData(this,t,i)),"st"!==t.ty&&"gs"!==t.ty||(r.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),r.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),r.setAttribute("fill-opacity","0"),1===t.lj&&r.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&r.setAttribute("id",t.ln),t.cl&&r.setAttribute("class",t.cl),t.bm&&(r.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(i),this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var n=TransformPropertyFactory.getTransformProperty(this,t,this),i=new SVGTransformData(n,n.o,e);return this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createShapeElement=function(t,e,n){var i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7);var r=new SVGShapeData(e,n,ShapePropertyFactory.getShapeProp(this,t,i,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var n=0,i=this.animatedContents.length;n<i;){if(this.animatedContents[n].element===e)return;n+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,n=t.styles,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||n.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,n,i,r,a,o){var s,l,c,h,d,u,p=[].concat(a),m=t.length-1,g=[],f=[];for(s=m;s>=0;s-=1){if((u=this.searchProcessedElement(t[s]))?e[s]=n[u-1]:t[s]._render=o,"fl"===t[s].ty||"st"===t[s].ty||"gf"===t[s].ty||"gs"===t[s].ty||"no"===t[s].ty)u?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],r),t[s]._render&&e[s].style.pElem.parentNode!==i&&i.appendChild(e[s].style.pElem),g.push(e[s].style);else if("gr"===t[s].ty){if(u)for(c=e[s].it.length,l=0;l<c;l+=1)e[s].prevViewData[l]=e[s].it[l];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,e[s].gr,r+1,p,o),t[s]._render&&e[s].gr.parentNode!==i&&i.appendChild(e[s].gr)}else"tr"===t[s].ty?(u||(e[s]=this.createTransformElement(t[s],i)),h=e[s].transform,p.push(h)):"sh"===t[s].ty||"rc"===t[s].ty||"el"===t[s].ty||"sr"===t[s].ty?(u||(e[s]=this.createShapeElement(t[s],p,r)),this.setElementStyles(e[s])):"tm"===t[s].ty||"rd"===t[s].ty||"ms"===t[s].ty||"pb"===t[s].ty||"zz"===t[s].ty||"op"===t[s].ty?(u?(d=e[s]).closed=!1:((d=ShapeModifiers.getModifier(t[s].ty)).init(this,t[s]),e[s]=d,this.shapeModifiers.push(d)),f.push(d)):"rp"===t[s].ty&&(u?(d=e[s]).closed=!0:(d=ShapeModifiers.getModifier(t[s].ty),e[s]=d,d.init(this,t,s,e),this.shapeModifiers.push(d),o=!1),f.push(d));this.addProcessedElement(t[s],s+1)}for(m=g.length,s=0;s<m;s+=1)g[s].closed=!0;for(m=f.length,s=0;s<m;s+=1)f[s].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,n=this.animatedContents.length;for(t=0;t<n;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,n,i,r,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,o=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,o=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,o=!0),this.fc!==i&&(this.fc=i,this._mdf.fc=!0,o=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,o=!0),!a.length||this.p[0]===a[0]&&this.p[1]===a[1]&&this.p[4]===a[4]&&this.p[5]===a[5]&&this.p[12]===a[12]&&this.p[13]===a[13]||(this.p=a,this._mdf.p=!0,o=!0),o},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;i<r;i+=1)a=n!==this.keysIndex?this.effectsSequence[i](a,a.t):this.effectsSequence[i](this.currentData,a.t);e!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,n=0,i=t.length;n<=i-1&&!(n===i-1||t[n+1].t>e);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,n,i=[],r=0,a=t.length,o=!1,s=!1,l="";r<a;)o=s,s=!1,e=t.charCodeAt(r),l=t.charAt(r),FontManager.isCombinedCharacter(e)?o=!0:e>=55296&&e<=56319?FontManager.isRegionalFlag(t,r)?l=t.substr(r,14):(n=t.charCodeAt(r+1))>=56320&&n<=57343&&(FontManager.isModifier(e,n)?(l=t.substr(r,2),o=!0):l=FontManager.isFlagEmoji(t.substr(r,4))?t.substr(r,4):t.substr(r,2)):e>56319?(n=t.charCodeAt(r+1),FontManager.isVariationSelector(e)&&(o=!0)):FontManager.isZeroWidthJoiner(e)&&(o=!0,s=!0),o?(i[i.length-1]+=l,o=!1):i.push(l),r+=l.length;return i},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,n,i,r,a,o,s,l=this.elem.globalData.fontManager,c=this.data,h=[],d=0,u=c.m.g,p=0,m=0,g=0,f=[],y=0,v=0,w=l.getFontByName(t.f),b=0,x=getFontProperties(w);t.fWeight=x.weight,t.fStyle=x.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),n=t.finalText.length,t.finalLineHeight=t.lh;var S,A=t.tr/1e3*t.finalSize;if(t.sz)for(var C,k,I=!0,E=t.sz[0],_=t.sz[1];I;){C=0,y=0,n=(k=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var M=-1;for(e=0;e<n;e+=1)S=k[e].charCodeAt(0),i=!1," "===k[e]?M=e:13!==S&&3!==S||(y=0,i=!0,C+=t.finalLineHeight||1.2*t.finalSize),l.chars?(s=l.getCharData(k[e],w.fStyle,w.fFamily),b=i?0:s.w*t.finalSize/100):b=l.measureText(k[e],t.f,t.finalSize),y+b>E&&" "!==k[e]?(-1===M?n+=1:e=M,C+=t.finalLineHeight||1.2*t.finalSize,k.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=b,y+=A);C+=w.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&_<C?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=k,n=t.finalText.length,I=!1)}y=-A,b=0;var D,P=0;for(e=0;e<n;e+=1)if(i=!1,13===(S=(D=t.finalText[e]).charCodeAt(0))||3===S?(P=0,f.push(y),v=y>v?y:v,y=-2*A,r="",i=!0,g+=1):r=D,l.chars?(s=l.getCharData(D,w.fStyle,l.getFontByName(t.f).fFamily),b=i?0:s.w*t.finalSize/100):b=l.measureText(r,t.f,t.finalSize)," "===D?P+=b+A:(y+=b+A+P,P=0),h.push({l:b,an:b,add:p,n:i,anIndexes:[],val:r,line:g,animatorJustifyOffset:0}),2==u){if(p+=b,""===r||" "===r||e===n-1){for(""!==r&&" "!==r||(p-=b);m<=e;)h[m].an=p,h[m].ind=d,h[m].extra=b,m+=1;d+=1,p=0}}else if(3==u){if(p+=b,""===r||e===n-1){for(""===r&&(p-=b);m<=e;)h[m].an=p,h[m].ind=d,h[m].extra=b,m+=1;p=0,d+=1}}else h[d].ind=d,h[d].extra=0,d+=1;if(t.l=h,v=y>v?y:v,f.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=f;var T,L,B,F,R=c.a;o=R.length;var N=[];for(a=0;a<o;a+=1){for((T=R[a]).a.sc&&(t.strokeColorAnim=!0),T.a.sw&&(t.strokeWidthAnim=!0),(T.a.fc||T.a.fh||T.a.fs||T.a.fb)&&(t.fillColorAnim=!0),F=0,B=T.s.b,e=0;e<n;e+=1)(L=h[e]).anIndexes[a]=F,(1==B&&""!==L.val||2==B&&""!==L.val&&" "!==L.val||3==B&&(L.n||" "==L.val||e==n-1)||4==B&&(L.n||e==n-1))&&(1===T.s.rn&&N.push(F),F+=1);c.a[a].s.totalChars=F;var V,z=-1;if(1===T.s.rn)for(e=0;e<n;e+=1)z!=(L=h[e]).anIndexes[a]&&(z=L.anIndexes[a],V=N.splice(Math.floor(Math.random()*N.length),1)[0]),L.anIndexes[a]=V}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=w.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var n=this.copyData({},this.data.d.k[e].s);n=this.copyData(n,t),this.data.d.k[e].s=n,this.recalculate(e),this.setCurrentData(n),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,n=Math.floor;function i(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return i.prototype={getMult:function(i){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,a=0,o=1,s=1;this.ne.v>0?r=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:s=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(r,a,o,s).get,c=0,h=this.finalS,d=this.finalE,u=this.data.sh;if(2===u)c=l(c=d===h?i>=d?1:0:t(0,e(.5/(d-h)+(i-h)/(d-h),1)));else if(3===u)c=l(c=d===h?i>=d?0:1:1-t(0,e(.5/(d-h)+(i-h)/(d-h),1)));else if(4===u)d===h?c=0:(c=t(0,e(.5/(d-h)+(i-h)/(d-h),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===u){if(d===h)c=0;else{var p=d-h,m=-p/2+(i=e(t(0,i+.5-h),d-h)),g=p/2;c=Math.sqrt(1-m*m/(g*g))}c=l(c)}else 6===u?(d===h?c=0:(i=e(t(0,i+.5-h),d-h),c=(1+Math.cos(Math.PI+2*Math.PI*i/(d-h)))/2),c=l(c)):(i>=n(h)&&(c=t(0,e(i-h<0?e(d,1)-(h-i):d-i,1))),c=l(c));if(100!==this.sm.v){var f=.01*this.sm.v;0===f&&(f=1e-8);var y=.5-.5*f;c<y?c=0:(c=(c-y)/f)>1&&(c=1)}return c*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,n=this.o.v/e,i=this.s.v/e+n,r=this.e.v/e+n;if(i>r){var a=i;i=r,r=a}this.finalS=i,this.finalE=r}},extendPrototype([DynamicPropertyContainer],i),{getTextSelectorProp:function(t,e,n){return new i(t,e,n)}}}();function TextAnimatorDataProperty(t,e,n){var i={propType:!1},r=PropertyFactory.getProp,a=e.a;this.a={r:a.r?r(t,a.r,0,degToRads,n):i,rx:a.rx?r(t,a.rx,0,degToRads,n):i,ry:a.ry?r(t,a.ry,0,degToRads,n):i,sk:a.sk?r(t,a.sk,0,degToRads,n):i,sa:a.sa?r(t,a.sa,0,degToRads,n):i,s:a.s?r(t,a.s,1,.01,n):i,a:a.a?r(t,a.a,1,0,n):i,o:a.o?r(t,a.o,0,.01,n):i,p:a.p?r(t,a.p,1,0,n):i,sw:a.sw?r(t,a.sw,0,0,n):i,sc:a.sc?r(t,a.sc,1,0,n):i,fc:a.fc?r(t,a.fc,1,0,n):i,fh:a.fh?r(t,a.fh,0,0,n):i,fs:a.fs?r(t,a.fs,0,.01,n):i,fb:a.fb?r(t,a.fb,0,.01,n):i,t:a.t?r(t,a.t,0,0,n):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,n),this.s.t=e.s.t}function TextAnimatorProperty(t,e,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,n=this._textData.a.length,i=PropertyFactory.getProp;for(t=0;t<n;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:i(this._elem,this._textData.p.a,0,0,this),f:i(this._elem,this._textData.p.f,0,0,this),l:i(this._elem,this._textData.p.l,0,0,this),r:i(this._elem,this._textData.p.r,0,0,this),p:i(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=i(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var n,i,r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b,x=this._moreOptions.alignment.v,S=this._animatorsData,A=this._textData,C=this.mHelper,k=this._renderType,I=this.renderedLetters.length,E=t.l;if(this._hasMaskedPath){if(b=this._pathData.m,!this._pathData.n||this._pathData._mdf){var _,M=b.v;for(this._pathData.r.v&&(M=M.reverse()),o={tLength:0,segments:[]},a=M._length-1,y=0,r=0;r<a;r+=1)_=bez.buildBezierData(M.v[r],M.v[r+1],[M.o[r][0]-M.v[r][0],M.o[r][1]-M.v[r][1]],[M.i[r+1][0]-M.v[r+1][0],M.i[r+1][1]-M.v[r+1][1]]),o.tLength+=_.segmentLength,o.segments.push(_),y+=_.segmentLength;r=a,b.v.c&&(_=bez.buildBezierData(M.v[r],M.v[0],[M.o[r][0]-M.v[r][0],M.o[r][1]-M.v[r][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),o.tLength+=_.segmentLength,o.segments.push(_),y+=_.segmentLength),this._pathData.pi=o}if(o=this._pathData.pi,s=this._pathData.f.v,u=0,d=1,c=0,h=!0,g=o.segments,s<0&&b.v.c)for(o.tLength<Math.abs(s)&&(s=-Math.abs(s)%o.tLength),d=(m=g[u=g.length-1].points).length-1;s<0;)s+=m[d].partialLength,(d-=1)<0&&(d=(m=g[u-=1].points).length-1);p=(m=g[u].points)[d-1],f=(l=m[d]).partialLength}a=E.length,n=0,i=0;var D,P,T,L,B,F=1.2*t.finalSize*.714,R=!0;T=S.length;var N,V,z,G,W,O,Z,Y,H,j,X,U,K=-1,J=s,q=u,$=d,Q=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var nt=0,it=0,rt=2===t.j?-.5:-1,at=0,ot=!0;for(r=0;r<a;r+=1)if(E[r].n){for(nt&&(nt+=it);at<r;)E[at].animatorJustifyOffset=nt,at+=1;nt=0,ot=!0}else{for(P=0;P<T;P+=1)(D=S[P].a).t.propType&&(ot&&2===t.j&&(it+=D.t.v*rt),(B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars)).length?nt+=D.t.v*B[0]*rt:nt+=D.t.v*B*rt);ot=!1}for(nt&&(nt+=it);at<r;)E[at].animatorJustifyOffset=nt,at+=1}for(r=0;r<a;r+=1){if(C.reset(),G=1,E[r].n)n=0,i+=t.yOffset,i+=R?1:0,s=J,R=!1,this._hasMaskedPath&&(d=$,p=(m=g[u=q].points)[d-1],f=(l=m[d]).partialLength,c=0),tt="",X="",H="",U="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Q!==E[r].line){switch(t.j){case 1:s+=y-t.lineWidths[E[r].line];break;case 2:s+=(y-t.lineWidths[E[r].line])/2}Q=E[r].line}K!==E[r].ind&&(E[K]&&(s+=E[K].extra),s+=E[r].an/2,K=E[r].ind),s+=x[0]*E[r].an*.005;var st=0;for(P=0;P<T;P+=1)(D=S[P].a).p.propType&&((B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars)).length?st+=D.p.v[0]*B[0]:st+=D.p.v[0]*B),D.a.propType&&((B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars)).length?st+=D.a.v[0]*B[0]:st+=D.a.v[0]*B);for(h=!0,this._pathData.a.v&&(s=.5*E[0].an+(y-this._pathData.f.v-.5*E[0].an-.5*E[E.length-1].an)*K/(a-1),s+=this._pathData.f.v);h;)c+f>=s+st||!m?(v=(s+st-c)/l.partialLength,V=p.point[0]+(l.point[0]-p.point[0])*v,z=p.point[1]+(l.point[1]-p.point[1])*v,C.translate(-x[0]*E[r].an*.005,-x[1]*F*.01),h=!1):m&&(c+=l.partialLength,(d+=1)>=m.length&&(d=0,g[u+=1]?m=g[u].points:b.v.c?(d=0,m=g[u=0].points):(c-=l.partialLength,m=null)),m&&(p=l,f=(l=m[d]).partialLength));N=E[r].an/2-E[r].add,C.translate(-N,0,0)}else N=E[r].an/2-E[r].add,C.translate(-N,0,0),C.translate(-x[0]*E[r].an*.005,-x[1]*F*.01,0);for(P=0;P<T;P+=1)(D=S[P].a).t.propType&&(B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars),0===n&&0===t.j||(this._hasMaskedPath?B.length?s+=D.t.v*B[0]:s+=D.t.v*B:B.length?n+=D.t.v*B[0]:n+=D.t.v*B));for(t.strokeWidthAnim&&(O=t.sw||0),t.strokeColorAnim&&(W=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(Z=[t.fc[0],t.fc[1],t.fc[2]]),P=0;P<T;P+=1)(D=S[P].a).a.propType&&((B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars)).length?C.translate(-D.a.v[0]*B[0],-D.a.v[1]*B[1],D.a.v[2]*B[2]):C.translate(-D.a.v[0]*B,-D.a.v[1]*B,D.a.v[2]*B));for(P=0;P<T;P+=1)(D=S[P].a).s.propType&&((B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars)).length?C.scale(1+(D.s.v[0]-1)*B[0],1+(D.s.v[1]-1)*B[1],1):C.scale(1+(D.s.v[0]-1)*B,1+(D.s.v[1]-1)*B,1));for(P=0;P<T;P+=1){if(D=S[P].a,B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars),D.sk.propType&&(B.length?C.skewFromAxis(-D.sk.v*B[0],D.sa.v*B[1]):C.skewFromAxis(-D.sk.v*B,D.sa.v*B)),D.r.propType&&(B.length?C.rotateZ(-D.r.v*B[2]):C.rotateZ(-D.r.v*B)),D.ry.propType&&(B.length?C.rotateY(D.ry.v*B[1]):C.rotateY(D.ry.v*B)),D.rx.propType&&(B.length?C.rotateX(D.rx.v*B[0]):C.rotateX(D.rx.v*B)),D.o.propType&&(B.length?G+=(D.o.v*B[0]-G)*B[0]:G+=(D.o.v*B-G)*B),t.strokeWidthAnim&&D.sw.propType&&(B.length?O+=D.sw.v*B[0]:O+=D.sw.v*B),t.strokeColorAnim&&D.sc.propType)for(Y=0;Y<3;Y+=1)B.length?W[Y]+=(D.sc.v[Y]-W[Y])*B[0]:W[Y]+=(D.sc.v[Y]-W[Y])*B;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(Y=0;Y<3;Y+=1)B.length?Z[Y]+=(D.fc.v[Y]-Z[Y])*B[0]:Z[Y]+=(D.fc.v[Y]-Z[Y])*B;D.fh.propType&&(Z=B.length?addHueToRGB(Z,D.fh.v*B[0]):addHueToRGB(Z,D.fh.v*B)),D.fs.propType&&(Z=B.length?addSaturationToRGB(Z,D.fs.v*B[0]):addSaturationToRGB(Z,D.fs.v*B)),D.fb.propType&&(Z=B.length?addBrightnessToRGB(Z,D.fb.v*B[0]):addBrightnessToRGB(Z,D.fb.v*B))}}for(P=0;P<T;P+=1)(D=S[P].a).p.propType&&(B=S[P].s.getMult(E[r].anIndexes[P],A.a[P].s.totalChars),this._hasMaskedPath?B.length?C.translate(0,D.p.v[1]*B[0],-D.p.v[2]*B[1]):C.translate(0,D.p.v[1]*B,-D.p.v[2]*B):B.length?C.translate(D.p.v[0]*B[0],D.p.v[1]*B[1],-D.p.v[2]*B[2]):C.translate(D.p.v[0]*B,D.p.v[1]*B,-D.p.v[2]*B));if(t.strokeWidthAnim&&(H=O<0?0:O),t.strokeColorAnim&&(j="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),t.fillColorAnim&&t.fc&&(X="rgb("+Math.round(255*Z[0])+","+Math.round(255*Z[1])+","+Math.round(255*Z[2])+")"),this._hasMaskedPath){if(C.translate(0,-t.ls),C.translate(0,x[1]*F*.01+i,0),this._pathData.p.v){w=(l.point[1]-p.point[1])/(l.point[0]-p.point[0]);var lt=180*Math.atan(w)/Math.PI;l.point[0]<p.point[0]&&(lt+=180),C.rotate(-lt*Math.PI/180)}C.translate(V,z,0),s-=x[0]*E[r].an*.005,E[r+1]&&K!==E[r+1].ind&&(s+=E[r].an/2,s+=.001*t.tr*t.finalSize)}else{switch(C.translate(n,i,0),t.ps&&C.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:C.translate(E[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[E[r].line]),0,0);break;case 2:C.translate(E[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[E[r].line])/2,0,0)}C.translate(0,-t.ls),C.translate(N,0,0),C.translate(x[0]*E[r].an*.005,x[1]*F*.01,0),n+=E[r].l+.001*t.tr*t.finalSize}"html"===k?tt=C.toCSS():"svg"===k?tt=C.to2dCSS():et=[C.props[0],C.props[1],C.props[2],C.props[3],C.props[4],C.props[5],C.props[6],C.props[7],C.props[8],C.props[9],C.props[10],C.props[11],C.props[12],C.props[13],C.props[14],C.props[15]],U=G}I<=r?(L=new LetterProps(U,H,j,X,tt,et),this.renderedLetters.push(L),I+=1,this.lettersChangedFlag=!0):(L=this.renderedLetters[r],this.lettersChangedFlag=L.update(U,H,j,X,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,n),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},ITextElement.prototype.createPathShape=function(t,e){var n,i,r=e.length,a="";for(n=0;n<r;n+=1)"sh"===e[n].ty&&(i=e[n].ks.k,a+=buildShapeString(i,i.i.length,!0,t));return a},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,n,i,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[n]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[n])/2,0,0)}e.translate(i,r,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,n){this.textSpans=[],this.renderType="svg",this.initElement(t,e,n)}function ISolidElement(t,e,n){this.initElement(t,e,n)}function NullElement(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initFrame(),this.initTransform(t,e,n),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,n){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,n),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var n="";if(e&&e.title){var i=createNS("title"),r=createElementID();i.setAttribute("id",r),i.textContent=e.title,this.svgElement.appendChild(i),n+=r}if(e&&e.description){var a=createNS("desc"),o=createElementID();a.setAttribute("id",o),a.textContent=e.description,this.svgElement.appendChild(a),n+=" "+o}n&&this.svgElement.setAttribute("aria-labelledby",n);var s=createNS("defs");this.svgElement.appendChild(s);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:s,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,n=t.length,i=[],r="";e<n;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(i.push(r),r=""):r+=t[e],e+=1;return i.push(r),i},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var n=t.shapes[0];if(n.it){var i=n.it[n.it.length-1];i.s&&(i.s.k[0]=e,i.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var n=this.textProperty.currentData;this.renderedLetters=createSizedArray(n?n.l.length:0),n.fc?this.layerElement.setAttribute("fill",this.buildColor(n.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),n.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(n.sc)),this.layerElement.setAttribute("stroke-width",n.sw)),this.layerElement.setAttribute("font-size",n.finalSize);var i=this.globalData.fontManager.getFontByName(n.f);if(i.fClass)this.layerElement.setAttribute("class",i.fClass);else{this.layerElement.setAttribute("font-family",i.fFamily);var r=n.fWeight,a=n.fStyle;this.layerElement.setAttribute("font-style",a),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",n.t);var o,s=n.l||[],l=!!this.globalData.fontManager.chars;e=s.length;var c=this.mHelper,h=this.data.singleShape,d=0,u=0,p=!0,m=.001*n.tr*n.finalSize;if(!h||l||n.sz){var g,f=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!l||!h||0===t){if(o=f>t?this.textSpans[t].span:createNS(l?"g":"text"),f<=t){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=o,l){var y=createNS("g");o.appendChild(y),this.textSpans[t].childSpan=y}this.textSpans[t].span=o,this.layerElement.appendChild(o)}o.style.display="inherit"}if(c.reset(),h&&(s[t].n&&(d=-m,u+=n.yOffset,u+=p?1:0,p=!1),this.applyTextPropertiesToMatrix(n,c,s[t].line,d,u),d+=s[t].l||0,d+=m),l){var v;if(1===(g=this.globalData.fontManager.getCharData(n.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t)v=new SVGCompElement(g.data,this.globalData,this);else{var w=emptyShapeData;g.data&&g.data.shapes&&(w=this.buildShapeData(g.data,n.finalSize)),v=new SVGShapeElement(w,this.globalData,this)}if(this.textSpans[t].glyph){var b=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(b.layerElement),b.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),1===g.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else h&&o.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),o.textContent=s[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&o&&o.setAttribute("d","")}else{var x=this.textContainer,S="start";switch(n.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}x.setAttribute("text-anchor",S),x.setAttribute("letter-spacing",m);var A=this.buildTextContents(n.finalText);for(e=A.length,u=n.ps?n.ps[1]+n.ascent:0,t=0;t<e;t+=1)(o=this.textSpans[t].span||createNS("tspan")).textContent=A[t],o.setAttribute("x",0),o.setAttribute("y",u),o.style.display="inherit",x.appendChild(o),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=o,u+=n.finalLineHeight;this.layerElement.appendChild(x)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,n=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<n;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var n,i,r,a=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;for(e=o.length,t=0;t<e;t+=1)o[t].n||(n=a[t],i=this.textSpans[t].span,(r=this.textSpans[t].glyph)&&r.renderFrame(),n._mdf.m&&i.setAttribute("transform",n.m),n._mdf.o&&i.setAttribute("opacity",n.o),n._mdf.sw&&i.setAttribute("stroke-width",n.sw),n._mdf.sc&&i.setAttribute("stroke",n.sc),n._mdf.fc&&i.setAttribute("fill",n.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var n=createNS("clipPath"),i=createNS("rect");i.setAttribute("width",t.w),i.setAttribute("height",t.h),i.setAttribute("x",0),i.setAttribute("y",0);var r=createElementID();n.setAttribute("id",r),n.appendChild(i),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),e.appendChild(n),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,n=this.layers.length;for(e=0;e<n;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var n=this.createItem(this.layers[t]);if(e[t]=n,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,t),this.layers[t].tt){var i="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(-1===i)return;if(this.elements[i]&&!0!==this.elements[i]){var r=e[i].getMatte(this.layers[t].tt);n.setMatte(r)}else this.buildItem(i),this.addPendingElement(n)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,n=this.elements.length;e<n;){if(this.elements[e]===t){var i="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,r=this.elements[i].getMatte(this.layers[e].tt);t.setMatte(r);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var n=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=n-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<n;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var n=t.getBaseElement();if(n){for(var i,r=0;r<e;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initTransform(t,e,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var n,i=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,n=t.length,i="_";for(e=0;e<n;e+=1)i+=t[e].transform.key+"_";var r=this.sequences[i];return r||(r={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[i]=r,this.sequenceList.push(r)),r},processSequence:function(t,e){for(var n=0,i=t.transforms.length,r=e;n<i&&!e;){if(t.transforms[n].transform.mProps._mdf){r=!0;break}n+=1}if(r)for(t.finalTransform.reset(),n=i-1;n>=0;n-=1)t.finalTransform.multiply(t.transforms[n].transform.mProps.v);t._mdf=r},processSequences:function(t){var e,n=this.sequenceList.length;for(e=0;e<n;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var t="__lottie_element_luma_buffer",e=null,n=null,i=null;function r(){var r,a,o;e||(r=createNS("svg"),a=createNS("filter"),o=createNS("feColorMatrix"),a.setAttribute("id",t),o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),a.appendChild(o),r.appendChild(a),r.setAttribute("id",t+"_svg"),featureSupport.svgLumaHidden&&(r.style.display="none"),i=r,document.body.appendChild(i),e=createTag("canvas"),(n=e.getContext("2d")).filter="url(#"+t+")",n.fillStyle="rgba(0,0,0,0)",n.fillRect(0,0,1,1))}return{load:r,get:function(i){return e||r(),e.width=i.width,e.height=i.height,n.filter="url(#"+t+")",e}}};function createCanvas(t,e){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(t,e);var n=createTag("canvas");return n.width=t,n.height=e,n}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas},registeredEffects={};function CVEffects(t){var e,n,i=t.data.ef?t.data.ef.length:0;for(this.filters=[],e=0;e<i;e+=1){n=null;var r=t.data.ef[e].ty;registeredEffects[r]&&(n=new(0,registeredEffects[r].effect)(t.effectsManager.effectElements[e],t)),n&&this.filters.push(n)}this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e){registeredEffects[t]={effect:e}}function CVMaskElement(t,e){var n;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i=this.masksProperties.length,r=!1;for(n=0;n<i;n+=1)"n"!==this.masksProperties[n].mode&&(r=!0),this.viewData[n]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=r,r&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(t){var e,n=this.filters.length;for(e=0;e<n;e+=1)this.filters[e].renderFrame(t)},CVEffects.prototype.getEffects=function(t){var e,n=this.filters.length,i=[];for(e=0;e<n;e+=1)this.filters[e].type===t&&i.push(this.filters[e]);return i},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,n,i,r=this.element.finalTransform.mat,a=this.element.canvasContext,o=this.masksProperties.length;for(a.beginPath(),t=0;t<o;t+=1)if("n"!==this.masksProperties[t].mode){var s;this.masksProperties[t].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),i=this.viewData[t].v,e=r.applyToPointArray(i.v[0][0],i.v[0][1],0),a.moveTo(e[0],e[1]);var l=i._length;for(s=1;s<l;s+=1)n=r.applyToTriplePoints(i.o[s-1],i.i[s],i.v[s]),a.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);n=r.applyToTriplePoints(i.o[s-1],i.i[0],i.v[0]),a.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(t,e,n,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var r,a=4;"rc"===e.ty?a=5:"el"===e.ty?a=6:"sr"===e.ty&&(a=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,a,t);var o,s=n.length;for(r=0;r<s;r+=1)n[r].closed||(o={transforms:i.addTransformSequence(n[r].transforms),trNodes:[]},this.styledShapes.push(o),n[r].elements.push(o))}function CVShapeElement(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,n)}function CVTextElement(t,e,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,n)}function CVImageElement(t,e,n){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,n)}function CVSolidElement(t,e,n){this.initElement(t,e,n)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var t;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,t=0;t<15;t+=1){var e=new CanvasContext;this.stack[t]=e}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(t,e,n){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,n),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(t,e,n){this.initElement(t,e,n)}function HShapeElement(t,e,n){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,n),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,n){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,n)}function HCameraElement(t,e,n){this.initFrame(),this.initBaseData(t,e,n),this.initHierarchy();var i=PropertyFactory.getProp;if(this.pe=i(this,t.pe,0,0,this),t.ks.p.s?(this.px=i(this,t.ks.p.x,1,0,this),this.py=i(this,t.ks.p.y,1,0,this),this.pz=i(this,t.ks.p.z,1,0,this)):this.p=i(this,t.ks.p,1,0,this),t.ks.a&&(this.a=i(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var r,a=t.ks.or.k.length;for(r=0;r<a;r+=1)t.ks.or.k[r].to=null,t.ks.or.k[r].ti=null}this.or=i(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=i(this,t.ks.rx,0,degToRads,this),this.ry=i(this,t.ks.ry,0,degToRads,this),this.rz=i(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,n){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,n)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,n){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,n),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var n=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=assetLoader.getLumaCanvas(this.canvasContext.canvas);n.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var n={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=PropertyFactory.getProp(this,t.c,1,255,this),i.c.k||(n.co="rgb("+bmFloor(i.c.v[0])+","+bmFloor(i.c.v[1])+","+bmFloor(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=PropertyFactory.getProp(this,t.s,1,null,this),i.e=PropertyFactory.getProp(this,t.e,1,null,this),i.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),i.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),i.g=new GradientProperty(this,t.g,this)),i.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(n.lc=lineCapEnum[t.lc||2],n.lj=lineJoinEnum[t.lj||2],1==t.lj&&(n.ml=t.ml),i.w=PropertyFactory.getProp(this,t.w,0,null,this),i.w.k||(n.wi=i.w.v),t.d){var r=new DashProperty(this,t.d,"canvas",this);i.d=r,i.d.k||(n.da=i.d.dashArray,n.do=i.d.dashoffset[0])}}else n.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(n),i.style=n,i},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,n=this.stylesList.length;for(e=0;e<n;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,n=t.length;for(e=0;e<n;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,n,i,r){var a,o,s,l,c,h,d=t.length-1,u=[],p=[],m=[].concat(r);for(a=d;a>=0;a-=1){if((l=this.searchProcessedElement(t[a]))?e[a]=n[l-1]:t[a]._shouldRender=i,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)l?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],m),u.push(e[a].style);else if("gr"===t[a].ty){if(l)for(s=e[a].it.length,o=0;o<s;o+=1)e[a].prevViewData[o]=e[a].it[o];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,i,m)}else"tr"===t[a].ty?(l||(h=this.createTransformElement(t[a]),e[a]=h),m.push(e[a]),this.addTransformToStyleList(e[a])):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?l||(e[a]=this.createShapeElement(t[a])):"tm"===t[a].ty||"rd"===t[a].ty||"pb"===t[a].ty||"zz"===t[a].ty||"op"===t[a].ty?(l?(c=e[a]).closed=!1:((c=ShapeModifiers.getModifier(t[a].ty)).init(this,t[a]),e[a]=c,this.shapeModifiers.push(c)),p.push(c)):"rp"===t[a].ty&&(l?(c=e[a]).closed=!0:(c=ShapeModifiers.getModifier(t[a].ty),e[a]=c,c.init(this,t,a,e),this.shapeModifiers.push(c),i=!1),p.push(c));this.addProcessedElement(t[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(u),d=p.length,a=0;a<d;a+=1)p[a].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,n,i,r,a,o,s,l,c=this.stylesList.length,h=this.globalData.renderer,d=this.globalData.canvasContext;for(t=0;t<c;t+=1)if(("st"!==(s=(l=this.stylesList[t]).type)&&"gs"!==s||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(h.save(),a=l.elements,"st"===s||"gs"===s?(h.ctxStrokeStyle("st"===s?l.co:l.grd),h.ctxLineWidth(l.wi),h.ctxLineCap(l.lc),h.ctxLineJoin(l.lj),h.ctxMiterLimit(l.ml||0)):h.ctxFillStyle("fl"===s?l.co:l.grd),h.ctxOpacity(l.coOp),"st"!==s&&"gs"!==s&&d.beginPath(),h.ctxTransform(l.preTransforms.finalTransform.props),n=a.length,e=0;e<n;e+=1){for("st"!==s&&"gs"!==s||(d.beginPath(),l.da&&(d.setLineDash(l.da),d.lineDashOffset=l.do)),r=(o=a[e].trNodes).length,i=0;i<r;i+=1)"m"===o[i].t?d.moveTo(o[i].p[0],o[i].p[1]):"c"===o[i].t?d.bezierCurveTo(o[i].pts[0],o[i].pts[1],o[i].pts[2],o[i].pts[3],o[i].pts[4],o[i].pts[5]):d.closePath();"st"!==s&&"gs"!==s||(h.ctxStroke(),l.da&&d.setLineDash(this.dashResetter))}"st"!==s&&"gs"!==s&&this.globalData.renderer.ctxFill(l.r),h.restore()}},CVShapeElement.prototype.renderShape=function(t,e,n,i){var r,a;for(a=t,r=e.length-1;r>=0;r-=1)"tr"===e[r].ty?(a=n[r].transform,this.renderShapeTransform(t,a)):"sh"===e[r].ty||"el"===e[r].ty||"rc"===e[r].ty||"sr"===e[r].ty?this.renderPath(e[r],n[r]):"fl"===e[r].ty?this.renderFill(e[r],n[r],a):"st"===e[r].ty?this.renderStroke(e[r],n[r],a):"gf"===e[r].ty||"gs"===e[r].ty?this.renderGradientFill(e[r],n[r],a):"gr"===e[r].ty?this.renderShape(a,e[r].it,n[r].it):e[r].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var n,i,r,a=t.trNodes,o=e.paths,s=o._length;a.length=0;var l=t.transforms.finalTransform;for(r=0;r<s;r+=1){var c=o.shapes[r];if(c&&c.v){for(i=c._length,n=1;n<i;n+=1)1===n&&a.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),a.push({t:"c",pts:l.applyToTriplePoints(c.o[n-1],c.i[n],c.v[n])});1===i&&a.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&i&&(a.push({t:"c",pts:l.applyToTriplePoints(c.o[n-1],c.i[0],c.v[0])}),a.push({t:"z"}))}}t.trNodes=a}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var n,i=e.styledShapes.length;for(n=0;n<i;n+=1)this.renderStyledShape(e.styledShapes[n],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,n){var i=e.style;(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*n.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,n){var i,r=e.style;if(!r.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var a,o=this.globalData.canvasContext,s=e.s.v,l=e.e.v;if(1===t.t)i=o.createLinearGradient(s[0],s[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(s[0]-l[0],2)+Math.pow(s[1]-l[1],2)),h=Math.atan2(l[1]-s[1],l[0]-s[0]),d=e.h.v;d>=1?d=.99:d<=-1&&(d=-.99);var u=c*d,p=Math.cos(h+e.a.v)*u+s[0],m=Math.sin(h+e.a.v)*u+s[1];i=o.createRadialGradient(p,m,0,s[0],s[1],c)}var g=t.g.p,f=e.g.c,y=1;for(a=0;a<g;a+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*a+1]),i.addColorStop(f[4*a]/100,"rgba("+f[4*a+1]+","+f[4*a+2]+","+f[4*a+3]+","+y+")");r.grd=i}r.coOp=e.o.v*n.opacity},CVShapeElement.prototype.renderStroke=function(t,e,n){var i=e.style,r=e.d;r&&(r._mdf||this._isFirstFrame)&&(i.da=r.dashArray,i.do=r.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(i.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||n._opMdf||this._isFirstFrame)&&(i.coOp=e.o.v*n.opacity),(e.w._mdf||this._isFirstFrame)&&(i.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var n=!1;t.sc&&(n=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var i,r,a,o,s,l,c,h,d,u,p,m,g=this.globalData.fontManager.getFontByName(t.f),f=t.l,y=this.mHelper;this.stroke=n,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,r=t.finalText.length;var v=this.data.singleShape,w=.001*t.tr*t.finalSize,b=0,x=0,S=!0,A=0;for(i=0;i<r;i+=1){o=(a=this.globalData.fontManager.getCharData(t.finalText[i],g.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&a.data||{},y.reset(),v&&f[i].n&&(b=-w,x+=t.yOffset,x+=S?1:0,S=!1),d=(c=o.shapes?o.shapes[0].it:[]).length,y.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,y,f[i].line,b,x),p=createSizedArray(d-1);var C=0;for(h=0;h<d;h+=1)if("sh"===c[h].ty){for(l=c[h].ks.k.i.length,u=c[h].ks.k,m=[],s=1;s<l;s+=1)1===s&&m.push(y.applyToX(u.v[0][0],u.v[0][1],0),y.applyToY(u.v[0][0],u.v[0][1],0)),m.push(y.applyToX(u.o[s-1][0],u.o[s-1][1],0),y.applyToY(u.o[s-1][0],u.o[s-1][1],0),y.applyToX(u.i[s][0],u.i[s][1],0),y.applyToY(u.i[s][0],u.i[s][1],0),y.applyToX(u.v[s][0],u.v[s][1],0),y.applyToY(u.v[s][0],u.v[s][1],0));m.push(y.applyToX(u.o[s-1][0],u.o[s-1][1],0),y.applyToY(u.o[s-1][0],u.o[s-1][1],0),y.applyToX(u.i[0][0],u.i[0][1],0),y.applyToY(u.i[0][0],u.i[0][1],0),y.applyToX(u.v[0][0],u.v[0][1],0),y.applyToY(u.v[0][0],u.v[0][1],0)),p[C]=m,C+=1}v&&(b+=f[i].l,b+=w),this.textSpans[A]?this.textSpans[A].elem=p:this.textSpans[A]={elem:p},A+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,n,i,r,a;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var o,s=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var c,h,d=null,u=null,p=null,m=this.globalData.renderer;for(t=0;t<e;t+=1)if(!l[t].n){if((o=s[t])&&(m.save(),m.ctxTransform(o.p),m.ctxOpacity(o.o)),this.fill){for(o&&o.fc?d!==o.fc&&(m.ctxFillStyle(o.fc),d=o.fc):d!==this.values.fill&&(d=this.values.fill,m.ctxFillStyle(this.values.fill)),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(a=(h=c[n]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),r=2;r<a;r+=6)this.globalData.canvasContext.bezierCurveTo(h[r],h[r+1],h[r+2],h[r+3],h[r+4],h[r+5]);this.globalData.canvasContext.closePath(),m.ctxFill()}if(this.stroke){for(o&&o.sw?p!==o.sw&&(p=o.sw,m.ctxLineWidth(o.sw)):p!==this.values.sWidth&&(p=this.values.sWidth,m.ctxLineWidth(this.values.sWidth)),o&&o.sc?u!==o.sc&&(u=o.sc,m.ctxStrokeStyle(o.sc)):u!==this.values.stroke&&(u=this.values.stroke,m.ctxStrokeStyle(this.values.stroke)),i=(c=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),n=0;n<i;n+=1)for(a=(h=c[n]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),r=2;r<a;r+=6)this.globalData.canvasContext.bezierCurveTo(h[r],h[r+1],h[r+2],h[r+3],h[r+4],h[r+5]);this.globalData.canvasContext.closePath(),m.ctxStroke()}o&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,n,i=t.getContext("2d"),r=this.img.width,a=this.img.height,o=r/a,s=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o>s&&"xMidYMid slice"===l||o<s&&"xMidYMid slice"!==l?e=(n=a)*s:n=(e=r)/s,i.drawImage(this.img,(r-e)/2,(a-n)/2,e,n,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){1===t[0]&&0===t[1]&&0===t[4]&&1===t[5]&&0===t[12]&&0===t[13]||this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){this.canvasContext.globalAlpha*=t<0?0:t},CanvasRendererBase.prototype.ctxFillStyle=function(t){this.canvasContext.fillStyle=t},CanvasRendererBase.prototype.ctxStrokeStyle=function(t){this.canvasContext.strokeStyle=t},CanvasRendererBase.prototype.ctxLineWidth=function(t){this.canvasContext.lineWidth=t},CanvasRendererBase.prototype.ctxLineCap=function(t){this.canvasContext.lineCap=t},CanvasRendererBase.prototype.ctxLineJoin=function(t){this.canvasContext.lineJoin=t},CanvasRendererBase.prototype.ctxMiterLimit=function(t){this.canvasContext.miterLimit=t},CanvasRendererBase.prototype.ctxFill=function(t){this.canvasContext.fill(t)},CanvasRendererBase.prototype.ctxFillRect=function(t,e,n,i){this.canvasContext.fillRect(t,e,n,i)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){this.renderConfig.clearCanvas?(t&&(this.globalData.blendMode="source-over"),this.contextData.restore(t)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var n="0px 0px 0px";e.transformOrigin=n,e.mozTransformOrigin=n,e.webkitTransformOrigin=n,e["-webkit-transform"]=n,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){var n,i,r,a;if(this.reset(),t?(n=t,i=e,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=i):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,i=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=i*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var o=this.renderConfig.preserveAspectRatio.split(" "),s=o[1]||"meet",l=o[0]||"xMidYMid",c=l.substr(0,4),h=l.substr(4);r=n/i,(a=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===s||a<r&&"slice"===s?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(a<r&&"meet"===s||a>r&&"slice"===s)?(n-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(a<r&&"meet"===s||a>r&&"slice"===s)?(n-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(a>r&&"meet"===s||a<r&&"slice"===s)?(i-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(a>r&&"meet"===s||a<r&&"slice"===s)?(i-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var n;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(t-this.layers[n].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=i-1;n>=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var n=this.createItem(this.layers[t],this,this.globalData);e[t]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e<t;e+=1)this.stack[e]=new CanvasContext;this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(t){this.cArrPos-=1;var e,n=this.stack[this.cArrPos],i=n.transform,r=this.cTr.props;for(e=0;e<16;e+=1)r[e]=i[e];if(t){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),(t||-1!==n.opacity&&this.currentOpacity!==n.opacity)&&(this.nativeContext.globalAlpha=n.opacity,this.currentOpacity=n.opacity),this.currentFillStyle=n.fillStyle,this.currentStrokeStyle=n.strokeStyle,this.currentLineWidth=n.lineWidth,this.currentLineCap=n.lineCap,this.currentLineJoin=n.lineJoin,this.currentMiterLimit=n.miterLimit},CVContextData.prototype.save=function(t){t&&this.nativeContext.save();var e=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n,i=this.stack[this.cArrPos];for(n=0;n<16;n+=1)i.transform[n]=e[n];this.cArrPos+=1;var r=this.stack[this.cArrPos];r.opacity=i.opacity,r.fillStyle=i.fillStyle,r.strokeStyle=i.strokeStyle,r.lineWidth=i.lineWidth,r.lineCap=i.lineCap,r.lineJoin=i.lineJoin,r.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(t){this.stack[this.cArrPos].opacity=t},CVContextData.prototype.setContext=function(t){this.nativeContext=t},CVContextData.prototype.fillStyle=function(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)},CVContextData.prototype.strokeStyle=function(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)},CVContextData.prototype.lineWidth=function(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)},CVContextData.prototype.lineCap=function(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)},CVContextData.prototype.lineJoin=function(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)},CVContextData.prototype.miterLimit=function(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)},CVContextData.prototype.transform=function(t){this.transformMat.cloneFromProps(t);var e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);var n=e.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},CVContextData.prototype.opacity=function(t){var e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)},CVContextData.prototype.fill=function(t){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(t)},CVContextData.prototype.fillRect=function(t,e,n,i){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(t,e,n,i)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)e=t[n].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var n,i,r,a,o,s=t.sh.v,l=t.transformers,c=s._length;if(!(c<=1)){for(n=0;n<c-1;n+=1)i=this.getTransformedPoint(l,s.v[n]),r=this.getTransformedPoint(l,s.o[n]),a=this.getTransformedPoint(l,s.i[n+1]),o=this.getTransformedPoint(l,s.v[n+1]),this.checkBounds(i,r,a,o,e);s.c&&(i=this.getTransformedPoint(l,s.v[n]),r=this.getTransformedPoint(l,s.o[n]),a=this.getTransformedPoint(l,s.i[0]),o=this.getTransformedPoint(l,s.v[0]),this.checkBounds(i,r,a,o,e))}},HShapeElement.prototype.checkBounds=function(t,e,n,i,r){this.getBoundsOfCurve(t,e,n,i);var a=this.shapeBoundingBox;r.x=bmMin(a.left,r.x),r.xMax=bmMax(a.right,r.xMax),r.y=bmMin(a.top,r.y),r.yMax=bmMax(a.bottom,r.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,n,i){for(var r,a,o,s,l,c,h,d=[[t[0],i[0]],[t[1],i[1]]],u=0;u<2;++u)a=6*t[u]-12*e[u]+6*n[u],r=-3*t[u]+9*e[u]-9*n[u]+3*i[u],o=3*e[u]-3*t[u],a|=0,o|=0,0==(r|=0)&&0===a||(0===r?(s=-o/a)>0&&s<1&&d[u].push(this.calculateF(s,t,e,n,i,u)):(l=a*a-4*o*r)>=0&&((c=(-a+bmSqrt(l))/(2*r))>0&&c<1&&d[u].push(this.calculateF(c,t,e,n,i,u)),(h=(-a-bmSqrt(l))/(2*r))>0&&h<1&&d[u].push(this.calculateF(h,t,e,n,i,u))));this.shapeBoundingBox.left=bmMin.apply(null,d[0]),this.shapeBoundingBox.top=bmMin.apply(null,d[1]),this.shapeBoundingBox.right=bmMax.apply(null,d[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,d[1])},HShapeElement.prototype.calculateF=function(t,e,n,i,r,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*n[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*r[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var n,i=t.length;for(n=0;n<i;n+=1)t[n]&&t[n].sh?this.calculateShapeBoundingBox(t[n],e):t[n]&&t[n].it?this.calculateBoundingBox(t[n].it,e):t[n]&&t[n].style&&t[n].w&&this.expandStrokeBoundingBox(t[n].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var n=0;if(t.keyframes){for(var i=0;i<t.keyframes.length;i+=1){var r=t.keyframes[i].s;r>n&&(n=r)}n*=t.mult}else n=t.v*t.mult;e.x-=n,e.xMax+=n,e.y-=n,e.yMax+=n},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var n=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),n=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),n=!0),n||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var i=this.shapeCont.style,r="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";i.transform=r,i.webkitTransform=r}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,n=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=n,e.color=n,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var i,r,a=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",a.fClass)this.innerElem.className=a.fClass;else{e.fontFamily=a.fFamily;var o=t.fWeight,s=t.fStyle;e.fontStyle=s,e.fontWeight=o}var l,c,h,d=t.l;r=d.length;var u,p=this.mHelper,m="",g=0;for(i=0;i<r;i+=1){if(this.globalData.fontManager.chars?(this.textPaths[g]?l=this.textPaths[g]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[g]?h=(c=this.textSpans[g]).children[0]:((c=createTag("div")).style.lineHeight=0,(h=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[g]?this.textPaths[g]:createNS("text"):this.textSpans[g]?(c=this.textSpans[g],l=this.textPaths[g]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var f,y=this.globalData.fontManager.getCharData(t.finalText[i],a.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(f=y?y.data:null,p.reset(),f&&f.shapes&&f.shapes.length&&(u=f.shapes[0].it,p.scale(t.finalSize/100,t.finalSize/100),m=this.createPathShape(p,u),l.setAttribute("d",m)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),f&&f.shapes){document.body.appendChild(h);var v=h.getBBox();h.setAttribute("width",v.width+2),h.setAttribute("height",v.height+2),h.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var w=h.style,b="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";w.transform=b,w.webkitTransform=b,d[i].yOffset=v.y-1}else h.setAttribute("width",1),h.setAttribute("height",1);c.appendChild(h)}}else if(l.textContent=d[i].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var x=l.style,S="translate3d(0,"+-t.finalSize/1.2+"px,0)";x.transform=S,x.webkitTransform=S}this.isMasked?this.textSpans[g]=l:this.textSpans[g]=c,this.textSpans[g].style.display="block",this.textPaths[g]=l,g+=1}for(;g<this.textSpans.length;)this.textSpans[g].style.display="none",g+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var n,i,r,a,o,s=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(i=c.length,n=0;n<i;n+=1)c[n].n?s+=1:(a=this.textSpans[n],o=this.textPaths[n],r=l[s],s+=1,r._mdf.m&&(this.isMasked?a.setAttribute("transform",r.m):(a.style.webkitTransform=r.m,a.style.transform=r.m)),a.style.opacity=r.o,r.sw&&r._mdf.sw&&o.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&o.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(o.setAttribute("fill",r.fc),o.style.color=r.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var h=this.innerElem.getBBox();if(this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.svgElement.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.svgElement.setAttribute("height",h.height)),this.currentBBox.w!==h.width+2||this.currentBBox.h!==h.height+2||this.currentBBox.x!==h.x-1||this.currentBBox.y!==h.y-1){this.currentBBox.w=h.width+2,this.currentBBox.h=h.height+2,this.currentBBox.x=h.x-1,this.currentBBox.y=h.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var d="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=d,t.webkitTransform=d}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,n,i,r=this.comp.threeDElements.length;for(t=0;t<r;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){n=e.perspectiveElem.style,i=e.container.style;var a=this.pe.v+"px",o="0px 0px 0px",s="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.perspective=a,n.webkitPerspective=a,i.transformOrigin=o,i.mozTransformOrigin=o,i.webkitTransformOrigin=o,n.transform=s,n.webkitTransform=s}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,n=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)n=this.hierarchy[t].finalTransform.mProp._mdf||n;if(n||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var i=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r;r=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),o=[r[0]/a,r[1]/a,r[2]/a],s=Math.sqrt(o[2]*o[2]+o[0]*o[0]),l=Math.atan2(o[1],s),c=Math.atan2(o[0],-o[2]);this.mat.rotateY(c).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var h=!this._prevMat.equals(this.mat);if((h||this.pe._mdf)&&this.comp.threeDElements){var d,u,p;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(d=this.comp.threeDElements[t]).type){if(h){var m=this.mat.toCSS();(p=d.container.style).transform=m,p.webkitTransform=m}this.pe._mdf&&((u=d.perspectiveElem.style).perspective=this.pe.v+"px",u.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(t,e){var n=t.getBaseElement();if(n){var i=this.layers[e];if(i.ddd&&this.supports3d)this.addTo3dContainer(n,e);else if(this.threeDElements)this.addTo3dContainer(n,e);else{for(var r,a,o=0;o<e;)this.elements[o]&&!0!==this.elements[o]&&this.elements[o].getBaseElement&&(a=this.elements[o],r=(this.layers[o].ddd?this.getThreeDContainerByPos(o):a.getBaseElement())||r),o+=1;r?i.ddd&&this.supports3d||this.layerElement.insertBefore(n,r):i.ddd&&this.supports3d||this.layerElement.appendChild(n)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,n=this.threeDElements.length;e<n;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var n,i,r=createTag("div");styleDiv(r);var a=createTag("div");if(styleDiv(a),"3d"===e){(n=r.style).width=this.globalData.compSize.w+"px",n.height=this.globalData.compSize.h+"px";var o="50% 50%";n.webkitTransformOrigin=o,n.mozTransformOrigin=o,n.transformOrigin=o;var s="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(i=a.style).transform=s,i.webkitTransform=s}r.appendChild(a);var l={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var t,e,n=this.layers.length,i="";for(t=0;t<n;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==i&&(i="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==i&&(i="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(n=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var n=0,i=this.threeDElements.length;n<i;){if(e<=this.threeDElements[n].endPos){for(var r,a=this.threeDElements[n].startPos;a<e;)this.elements[a]&&this.elements[a].getBaseElement&&(r=this.elements[a].getBaseElement()),a+=1;r?this.threeDElements[n].container.insertBefore(t,r):this.threeDElements[n].container.appendChild(t);break}n+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),n=this.animationItem.wrapper,i=e.style;i.width=t.w+"px",i.height=t.h+"px",this.resizerElem=e,styleDiv(e),i.transformStyle="flat",i.mozTransformStyle="flat",i.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),n.appendChild(e),i.overflow="hidden";var r=createNS("svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.resizerElem.appendChild(r);var a=createNS("defs");r.appendChild(a),this.data=t,this.setupGlobalData(t,r),this.globalData.defs=a,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,n,i,r=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,o=r/a;this.globalData.compSize.w/this.globalData.compSize.h>o?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,n=0,i=(a-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=a/this.globalData.compSize.h,e=a/this.globalData.compSize.h,n=(r-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,i=0);var s=this.resizerElem.style;s.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+n+","+i+",0,1)",s.transform=s.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,n=this.globalData.compSize.h,i=this.threeDElements.length;for(t=0;t<i;t+=1){var r=this.threeDElements[t].perspectiveElem.style;r.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(n,2))+"px",r.perspective=r.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,n=t.length,i=createTag("div");for(e=0;e<n;e+=1)if(t[e].xt){var r=this.createComp(t[e],i,this.globalData.comp,null);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var n,i=0;i<e;)this.elements[i]&&this.elements[i].getBaseElement&&(n=this.elements[i].getBaseElement()),i+=1;n?this.layerElement.insertBefore(t,n):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=function(t){function e(e){for(var n=0,i=t.layers.length;n<i;){if(t.layers[n].nm===e||t.layers[n].ind===e)return t.elements[n].layerInterface;n+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e};function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}function seedRandom(t,e){var n=this,i=256,r="random",a=e.pow(i,6),o=e.pow(2,52),s=2*o,l=255;function c(t){var e,n=t.length,r=this,a=0,o=r.i=r.j=0,s=r.S=[];for(n||(t=[n++]);a<i;)s[a]=a++;for(a=0;a<i;a++)s[a]=s[o=l&o+t[a%n]+(e=s[a])],s[o]=e;r.g=function(t){for(var e,n=0,a=r.i,o=r.j,s=r.S;t--;)e=s[a=l&a+1],n=n*i+s[l&(s[a]=s[o=l&o+e])+(s[o]=e)];return r.i=a,r.j=o,n}}function h(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function d(t,e){var n,i=[],r=_typeof$2(t);if(e&&"object"==r)for(n in t)try{i.push(d(t[n],e-1))}catch(t){}return i.length?i:"string"==r?t:t+"\0"}function u(t,e){for(var n,i=t+"",r=0;r<i.length;)e[l&r]=l&(n^=19*e[l&r])+i.charCodeAt(r++);return p(e)}function p(t){return String.fromCharCode.apply(0,t)}e["seed"+r]=function(l,m,g){var f=[],y=u(d((m=!0===m?{entropy:!0}:m||{}).entropy?[l,p(t)]:null===l?function(){try{var e=new Uint8Array(i);return(n.crypto||n.msCrypto).getRandomValues(e),p(e)}catch(e){var r=n.navigator,a=r&&r.plugins;return[+new Date,n,a,n.screen,p(t)]}}():l,3),f),v=new c(f),w=function(){for(var t=v.g(6),e=a,n=0;t<o;)t=(t+n)*i,e*=i,n=v.g(1);for(;t>=s;)t/=2,e/=2,n>>>=1;return(t+n)/e};return w.int32=function(){return 0|v.g(4)},w.quick=function(){return v.g(4)/4294967296},w.double=w,u(p(v.S),t),(m.pass||g||function(t,n,i,a){return a&&(a.S&&h(a,v),t.state=function(){return h(v,{})}),i?(e[r]=t,n):t})(w,y,"global"in m?m.global:this==e,m.state)},u(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function $bm_neg(t){var e=_typeof$1(t);if("number"===e||t instanceof Number||"boolean"===e)return-t;if($bm_isInstanceOfArray(t)){var n,i=t.length,r=[];for(n=0;n<i;n+=1)r[n]=-t[n];return r}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var n=_typeof$1(t),i=_typeof$1(e);if(isNumerable(n,t)&&isNumerable(i,e)||"string"===n||"string"===i)return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(n,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var r=0,a=t.length,o=e.length,s=[];r<a||r<o;)("number"==typeof t[r]||t[r]instanceof Number)&&("number"==typeof e[r]||e[r]instanceof Number)?s[r]=t[r]+e[r]:s[r]=void 0===e[r]?t[r]:t[r]||e[r],r+=1;return s}return 0}var add=sum;function sub(t,e){var n=_typeof$1(t),i=_typeof$1(e);if(isNumerable(n,t)&&isNumerable(i,e))return"string"===n&&(t=parseInt(t,10)),"string"===i&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(i,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(n,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var r=0,a=t.length,o=e.length,s=[];r<a||r<o;)("number"==typeof t[r]||t[r]instanceof Number)&&("number"==typeof e[r]||e[r]instanceof Number)?s[r]=t[r]-e[r]:s[r]=void 0===e[r]?t[r]:t[r]||e[r],r+=1;return s}return 0}function mul(t,e){var n,i,r,a=_typeof$1(t),o=_typeof$1(e);if(isNumerable(a,t)&&isNumerable(o,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(o,e)){for(r=t.length,n=createTypedArray("float32",r),i=0;i<r;i+=1)n[i]=t[i]*e;return n}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(r=e.length,n=createTypedArray("float32",r),i=0;i<r;i+=1)n[i]=t*e[i];return n}return 0}function div(t,e){var n,i,r,a=_typeof$1(t),o=_typeof$1(e);if(isNumerable(a,t)&&isNumerable(o,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(o,e)){for(r=t.length,n=createTypedArray("float32",r),i=0;i<r;i+=1)n[i]=t[i]/e;return n}if(isNumerable(a,t)&&$bm_isInstanceOfArray(e)){for(r=e.length,n=createTypedArray("float32",r),i=0;i<r;i+=1)n[i]=t/e[i];return n}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(t,e,n){if(e>n){var i=n;n=e,e=i}return Math.min(Math.max(t,e),n)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var n;e||(e=helperLengthArray);var i=Math.min(t.length,e.length),r=0;for(n=0;n<i;n+=1)r+=Math.pow(e[n]-t[n],2);return Math.sqrt(r)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,n,i=t[0],r=t[1],a=t[2],o=Math.max(i,r,a),s=Math.min(i,r,a),l=(o+s)/2;if(o===s)e=0,n=0;else{var c=o-s;switch(n=l>.5?c/(2-o-s):c/(o+s),o){case i:e=(r-a)/c+(r<a?6:0);break;case r:e=(a-i)/c+2;break;case a:e=(i-r)/c+4}e/=6}return[e,n,l,t[3]]}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t){var e,n,i,r=t[0],a=t[1],o=t[2];if(0===a)e=o,i=o,n=o;else{var s=o<.5?o*(1+a):o+a-o*a,l=2*o-s;e=hue2rgb(l,s,r+1/3),n=hue2rgb(l,s,r),i=hue2rgb(l,s,r-1/3)}return[e,n,i,t[3]]}function linear(t,e,n,i,r){if(void 0!==i&&void 0!==r||(i=e,r=n,e=0,n=1),n<e){var a=n;n=e,e=a}if(t<=e)return i;if(t>=n)return r;var o,s=n===e?0:(t-e)/(n-e);if(!i.length)return i+(r-i)*s;var l=i.length,c=createTypedArray("float32",l);for(o=0;o<l;o+=1)c[o]=i[o]+(r[o]-i[o])*s;return c}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var n,i=e.length;t||(t=createTypedArray("float32",i));var r=createTypedArray("float32",i),a=BMMath.random();for(n=0;n<i;n+=1)r[n]=t[n]+a*(e[n]-t[n]);return r}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,n,i){var r,a=t.length,o=shapePool.newElement();o.setPathData(!!i,a);var s,l,c=[0,0];for(r=0;r<a;r+=1)s=e&&e[r]?e[r]:c,l=n&&n[r]?n[r]:c,o.setTripleAt(t[r][0],t[r][1],l[0]+t[r][0],l[1]+t[r][1],s[0]+t[r][0],s[1]+t[r][1],r,!0);return o}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var n,i,r=this.pv.length?this.pv.length:1,a=createTypedArray("float32",r),o=Math.floor(5*time);for(n=0,i=0;n<o;){for(i=0;i<r;i+=1)a[i]+=-e+2*e*BMMath.random();n+=1}var s=5*time,l=s-Math.floor(s),c=createTypedArray("float32",r);if(r>1){for(i=0;i<r;i+=1)c[i]=this.pv[i]+a[i]+(-e+2*e*BMMath.random())*l;return c}return this.pv+a[0]+(-e+2*e*BMMath.random())*l}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var n=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],i=Math.atan2(n[0],Math.sqrt(n[1]*n[1]+n[2]*n[2]))/degToRads;return[-Math.atan2(n[1],n[2])/degToRads,i,0]}function easeOut(t,e,n,i,r){return applyEase(easeOutBez,t,e,n,i,r)}function easeIn(t,e,n,i,r){return applyEase(easeInBez,t,e,n,i,r)}function ease(t,e,n,i,r){return applyEase(easeInOutBez,t,e,n,i,r)}function applyEase(t,e,n,i,r,a){void 0===r?(r=n,a=i):e=(e-n)/(i-n),e>1?e=1:e<0&&(e=0);var o=t(e);if($bm_isInstanceOfArray(r)){var s,l=r.length,c=createTypedArray("float32",l);for(s=0;s<l;s+=1)c[s]=(a[s]-r[s])*o+r[s];return c}return(a-r)*o+r}function nearestKey(t){var e,n,i,r=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(n=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)n=1,i=data.k[0].t;else{for(e=0;e<r-1;e+=1){if(t===data.k[e].t){n=e+1,i=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(n=e+2,i=data.k[e+1].t):(n=e+1,i=data.k[e].t);break}}-1===n&&(n=e+1,i=data.k[e].t)}else n=0,i=0;var a={};return a.index=n,a.time=i/elem.comp.globalData.frameRate,a}function key(t){var e,n,i;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var r=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(i=r.length,n=0;n<i;n+=1)e[n]=r[n],e.value[n]=r[n];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var t={initExpressions:function(t){var e=0,n=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=n.length;for(t=0;t<e;t+=1)n[t].release();n.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===n.indexOf(t)&&n.push(t)}}};return t.resetFrame=ExpressionManager.resetFrame,t}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}return Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(e){var n,i=createSizedArray(e.viewData.length),r=e.viewData.length;for(n=0;n<r;n+=1)i[n]=new t(e.viewData[n],e.masksProperties[n]);return function(t){for(n=0;n<r;){if(e.masksProperties[n].nm===t)return i[n];n+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function n(t,e,n){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(i){if(!t.numKeys)return 0;var r;r="s"in e.keyframes[i-1]?e.keyframes[i-1].s:"e"in e.keyframes[i-2]?e.keyframes[i-2].e:e.keyframes[i-2].s;var a="unidimensional"===n?new Number(r):Object.assign({},r);return a.time=e.keyframes[i-1].t/e.elem.comp.globalData.frameRate,a.value="unidimensional"===n?r[0]:r,a},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function i(){return t}return function(r){return r?"unidimensional"===r.propType?function(e){e&&"pv"in e||(e=t);var i=1/e.mult,r=e.pv*i,a=new Number(r);return a.value=r,n(a,e,"unidimensional"),function(){return e.k&&e.getValue(),r=e.v*i,a.value!==r&&((a=new Number(r)).value=r,n(a,e,"unidimensional")),a}}(r):function(t){t&&"pv"in t||(t=e);var i=1/t.mult,r=t.data&&t.data.l||t.pv.length,a=createTypedArray("float32",r),o=createTypedArray("float32",r);return a.value=o,n(a,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<r;e+=1)o[e]=t.v[e]*i,a[e]=o[e];return a}}(r):i}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var n,i,r,a;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?a=ExpressionPropertyInterface(t.p):(n=ExpressionPropertyInterface(t.px),i=ExpressionPropertyInterface(t.py),t.pz&&(r=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?a():[n(),i(),r?r():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;return void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e),e}function e(t,e){var n=this.getMatrix(e);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.applyPoint(n,t)}function n(t,e){var n=this.getMatrix(e);return this.applyPoint(n,t)}function i(t,e){var n=this.getMatrix(e);return n.props[12]=0,n.props[13]=0,n.props[14]=0,this.invertPoint(n,t)}function r(t,e){var n=this.getMatrix(e);return this.invertPoint(n,t)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,i=this._elem.hierarchy.length;for(n=0;n<i;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function o(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var n,i=this._elem.hierarchy.length;for(n=0;n<i;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function s(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var n,i=this._elem.hierarchy.length;for(n=0;n<i;n+=1)this._elem.hierarchy[n].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(c){var h;function d(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return d.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return h;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return d.effect;case"ADBE Text Properties":return d.textInterface;default:return null}}d.getMatrix=t,d.invertPoint=o,d.applyPoint=a,d.toWorld=n,d.toWorldVec=e,d.fromWorld=r,d.fromWorldVec=i,d.toComp=n,d.fromComp=s,d.sampleImage=l,d.sourceRectAtTime=c.sourceRectAtTime.bind(c),d._elem=c;var u=getDescriptor(h=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(d,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(h,"rotation"),scale:getDescriptor(h,"scale"),position:getDescriptor(h,"position"),opacity:getDescriptor(h,"opacity"),anchorPoint:u,anchor_point:u,transform:{get:function(){return h}},active:{get:function(){return c.isInRange}}}),d.startTime=c.data.st,d.index=c.data.ind,d.source=c.data.refId,d.height=0===c.data.ty?c.data.h:100,d.width=0===c.data.ty?c.data.w:100,d.inPoint=c.data.ip/c.comp.globalData.frameRate,d.outPoint=c.data.op/c.comp.globalData.frameRate,d._name=c.data.nm,d.registerMaskInterface=function(t){d.mask=new MaskManagerInterface(t,c)},d.registerEffectsInterface=function(t){d.effect=t},d}}(),propertyGroupFactory=function(t,e){return function(n){return(n=void 0===n?1:n)<=0?t:e(n-1)}},PropertyInterface=function(t,e){var n={_name:t};return function(t){return(t=void 0===t?1:t)<=0?n:e(t-1)}},EffectsExpressionInterface=function(){function t(n,i,r,a){function o(t){for(var e=n.ef,i=0,r=e.length;i<r;){if(t===e[i].nm||t===e[i].mn||t===e[i].ix)return 5===e[i].ty?c[i]:c[i]();i+=1}throw new Error}var s,l=propertyGroupFactory(o,r),c=[],h=n.ef.length;for(s=0;s<h;s+=1)5===n.ef[s].ty?c.push(t(n.ef[s],i.effectElements[s],i.effectElements[s].propertyGroup,a)):c.push(e(i.effectElements[s],n.ef[s].ty,a,l));return"ADBE Color Control"===n.mn&&Object.defineProperty(o,"color",{get:function(){return c[0]()}}),Object.defineProperties(o,{numProperties:{get:function(){return n.np}},_name:{value:n.nm},propertyGroup:{value:l}}),o.enabled=0!==n.en,o.active=o.enabled,o}function e(t,e,n,i){var r=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",i)),function(){return 10===e?n.comp.compInterface(t.p.v):r()}}return{createEffectsInterface:function(e,n){if(e.effectsManager){var i,r=[],a=e.data.ef,o=e.effectsManager.effectElements.length;for(i=0;i<o;i+=1)r.push(t(a[i],e.effectsManager.effectElements[i],n,e));var s=e.data.ef||[],l=function(t){for(i=0,o=s.length;i<o;){if(t===s[i].nm||t===s[i].mn||t===s[i].ix)return r[i];i+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return s.length}}),l}return null}}}(),ShapePathInterface=function(t,e,n){var i=e.sh;function r(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?r.path:null}var a=propertyGroupFactory(r,n);return i.setGroupProperty(PropertyInterface("Path",a)),Object.defineProperties(r,{path:{get:function(){return i.k&&i.getValue(),i}},shape:{get:function(){return i.k&&i.getValue(),i}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:n}}),r},ShapeExpressionInterface=function(){function t(t,o,u){var p,m=[],g=t?t.length:0;for(p=0;p<g;p+=1)"gr"===t[p].ty?m.push(e(t[p],o[p],u)):"fl"===t[p].ty?m.push(n(t[p],o[p],u)):"st"===t[p].ty?m.push(r(t[p],o[p],u)):"tm"===t[p].ty?m.push(a(t[p],o[p],u)):"tr"===t[p].ty||("el"===t[p].ty?m.push(s(t[p],o[p],u)):"sr"===t[p].ty?m.push(l(t[p],o[p],u)):"sh"===t[p].ty?m.push(ShapePathInterface(t[p],o[p],u)):"rc"===t[p].ty?m.push(c(t[p],o[p],u)):"rd"===t[p].ty?m.push(h(t[p],o[p],u)):"rp"===t[p].ty?m.push(d(t[p],o[p],u)):"gf"===t[p].ty?m.push(i(t[p],o[p],u)):m.push((t[p],o[p],function(){return null})));return m}function e(e,n,i){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=propertyGroupFactory(r,i);var a=function(e,n,i){var r,a=function(t){for(var e=0,n=r.length;e<n;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}return"number"==typeof t?r[t-1]:null};a.propertyGroup=propertyGroupFactory(a,i),r=t(e.it,n.it,a.propertyGroup),a.numProperties=r.length;var s=o(e.it[e.it.length-1],n.it[n.it.length-1],a.propertyGroup);return a.transform=s,a.propertyIndex=e.cix,a._name=e.nm,a}(e,n,r.propertyGroup),s=o(e.it[e.it.length-1],n.it[n.it.length-1],r.propertyGroup);return r.content=a,r.transform=s,Object.defineProperty(r,"_name",{get:function(){return e.nm}}),r.numProperties=e.np,r.propertyIndex=e.ix,r.nm=e.nm,r.mn=e.mn,r}function n(t,e,n){function i(t){return"Color"===t||"color"===t?i.color:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",n)),e.o.setGroupProperty(PropertyInterface("Opacity",n)),i}function i(t,e,n){function i(t){return"Start Point"===t||"start point"===t?i.startPoint:"End Point"===t||"end point"===t?i.endPoint:"Opacity"===t||"opacity"===t?i.opacity:null}return Object.defineProperties(i,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",n)),e.e.setGroupProperty(PropertyInterface("End Point",n)),e.o.setGroupProperty(PropertyInterface("Opacity",n)),i}function r(t,e,n){var i,r=propertyGroupFactory(c,n),a=propertyGroupFactory(l,r);function o(n){Object.defineProperty(l,t.d[n].nm,{get:ExpressionPropertyInterface(e.d.dataProps[n].p)})}var s=t.d?t.d.length:0,l={};for(i=0;i<s;i+=1)o(i),e.d.dataProps[i].p.setGroupProperty(a);function c(t){return"Color"===t||"color"===t?c.color:"Opacity"===t||"opacity"===t?c.opacity:"Stroke Width"===t||"stroke width"===t?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return l}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),e.w.setGroupProperty(PropertyInterface("Stroke Width",r)),c}function a(t,e,n){function i(e){return e===t.e.ix||"End"===e||"end"===e?i.end:e===t.s.ix?i.start:e===t.o.ix?i.offset:null}var r=propertyGroupFactory(i,n);return i.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",r)),e.e.setGroupProperty(PropertyInterface("End",r)),e.o.setGroupProperty(PropertyInterface("Offset",r)),i.propertyIndex=t.ix,i.propertyGroup=n,Object.defineProperties(i,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),i.mn=t.mn,i}function o(t,e,n){function i(e){return t.a.ix===e||"Anchor Point"===e?i.anchorPoint:t.o.ix===e||"Opacity"===e?i.opacity:t.p.ix===e||"Position"===e?i.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?i.rotation:t.s.ix===e||"Scale"===e?i.scale:t.sk&&t.sk.ix===e||"Skew"===e?i.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?i.skewAxis:null}var r=propertyGroupFactory(i,n);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",r)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",r)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",r)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",r)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",r)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",r)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",r))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",r)),Object.defineProperties(i,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),i.ty="tr",i.mn=t.mn,i.propertyGroup=n,i}function s(t,e,n){function i(e){return t.p.ix===e?i.position:t.s.ix===e?i.size:null}var r=propertyGroupFactory(i,n);i.propertyIndex=t.ix;var a="tm"===e.sh.ty?e.sh.prop:e.sh;return a.s.setGroupProperty(PropertyInterface("Size",r)),a.p.setGroupProperty(PropertyInterface("Position",r)),Object.defineProperties(i,{size:{get:ExpressionPropertyInterface(a.s)},position:{get:ExpressionPropertyInterface(a.p)},_name:{value:t.nm}}),i.mn=t.mn,i}function l(t,e,n){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.rotation:t.pt.ix===e?i.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?i.outerRadius:t.os.ix===e?i.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?i.innerRoundness:null:i.innerRadius}var r=propertyGroupFactory(i,n),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.or.setGroupProperty(PropertyInterface("Outer Radius",r)),a.os.setGroupProperty(PropertyInterface("Outer Roundness",r)),a.pt.setGroupProperty(PropertyInterface("Points",r)),a.p.setGroupProperty(PropertyInterface("Position",r)),a.r.setGroupProperty(PropertyInterface("Rotation",r)),t.ir&&(a.ir.setGroupProperty(PropertyInterface("Inner Radius",r)),a.is.setGroupProperty(PropertyInterface("Inner Roundness",r))),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},rotation:{get:ExpressionPropertyInterface(a.r)},points:{get:ExpressionPropertyInterface(a.pt)},outerRadius:{get:ExpressionPropertyInterface(a.or)},outerRoundness:{get:ExpressionPropertyInterface(a.os)},innerRadius:{get:ExpressionPropertyInterface(a.ir)},innerRoundness:{get:ExpressionPropertyInterface(a.is)},_name:{value:t.nm}}),i.mn=t.mn,i}function c(t,e,n){function i(e){return t.p.ix===e?i.position:t.r.ix===e?i.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?i.size:null}var r=propertyGroupFactory(i,n),a="tm"===e.sh.ty?e.sh.prop:e.sh;return i.propertyIndex=t.ix,a.p.setGroupProperty(PropertyInterface("Position",r)),a.s.setGroupProperty(PropertyInterface("Size",r)),a.r.setGroupProperty(PropertyInterface("Rotation",r)),Object.defineProperties(i,{position:{get:ExpressionPropertyInterface(a.p)},roundness:{get:ExpressionPropertyInterface(a.r)},size:{get:ExpressionPropertyInterface(a.s)},_name:{value:t.nm}}),i.mn=t.mn,i}function h(t,e,n){function i(e){return t.r.ix===e||"Round Corners 1"===e?i.radius:null}var r=propertyGroupFactory(i,n),a=e;return i.propertyIndex=t.ix,a.rd.setGroupProperty(PropertyInterface("Radius",r)),Object.defineProperties(i,{radius:{get:ExpressionPropertyInterface(a.rd)},_name:{value:t.nm}}),i.mn=t.mn,i}function d(t,e,n){function i(e){return t.c.ix===e||"Copies"===e?i.copies:t.o.ix===e||"Offset"===e?i.offset:null}var r=propertyGroupFactory(i,n),a=e;return i.propertyIndex=t.ix,a.c.setGroupProperty(PropertyInterface("Copies",r)),a.o.setGroupProperty(PropertyInterface("Offset",r)),Object.defineProperties(i,{copies:{get:ExpressionPropertyInterface(a.c)},offset:{get:ExpressionPropertyInterface(a.o)},_name:{value:t.nm}}),i.mn=t.mn,i}return function(e,n,i){var r;function a(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?i:r[t-1];for(var e=0,n=r.length;e<n;){if(r[e]._name===t)return r[e];e+=1}return null}return a.propertyGroup=propertyGroupFactory(a,(function(){return i})),r=t(e,n,a.propertyGroup),a.numProperties=r.length,a._name="Contents",a}}(),TextExpressionInterface=function(t){var e;function n(t){return"ADBE Text Document"===t?n.sourceText:null}return Object.defineProperty(n,"sourceText",{get:function(){t.textProperty.getValue();var n=t.textProperty.currentData.t;return e&&n===e.value||((e=new String(n)).value=n||new String(n),Object.defineProperty(e,"style",{get:function(){return{fillColor:t.textProperty.currentData.fc}}})),e}}),n};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",n=t.getFootageData();function i(t){if(n[t])return e=t,"object"===_typeof(n=n[t])?i:n;var r=t.indexOf(e);if(-1!==r){var a=parseInt(t.substr(r+e.length),10);return"object"===_typeof(n=n[a])?i:n}return""}return function(){return e="",n=t.getFootageData(),i}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}var expressionHelpers={searchExpressions:function(t,e,n){e.x&&(n.k=!0,n.x=!0,n.initiateExpression=ExpressionManager.initiateExpression,n.effectsSequence.push(n.initiateExpression(t,e,n).bind(n)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),n=this.getValueAtTime(t+-.01),i=0;if(e.length){var r;for(r=0;r<e.length;r+=1)i+=Math.pow(n[r]-e[r],2);i=100*Math.sqrt(i)}else i=0;return i},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,n,i=-.001,r=this.getValueAtTime(t),a=this.getValueAtTime(t+i);if(r.length)for(e=createTypedArray("float32",r.length),n=0;n<r.length;n+=1)e[n]=(a[n]-r[n])/i;else e=(a-r)/i;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,n){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var i,r,a,o,s,l=this.comp.renderedFrame,c=this.keyframes,h=c[c.length-1].t;if(l<=h)return this.pv;if(n?r=h-(i=e?Math.abs(h-this.elem.comp.globalData.frameRate*e):Math.max(0,h-this.elem.data.ip)):((!e||e>c.length-1)&&(e=c.length-1),i=h-(r=c[c.length-1-e].t)),"pingpong"===t){if(Math.floor((l-r)/i)%2!=0)return this.getValueAtTime((i-(l-r)%i+r)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(r/this.comp.globalData.frameRate,0),u=this.getValueAtTime(h/this.comp.globalData.frameRate,0),p=this.getValueAtTime(((l-r)%i+r)/this.comp.globalData.frameRate,0),m=Math.floor((l-r)/i);if(this.pv.length){for(o=(s=new Array(d.length)).length,a=0;a<o;a+=1)s[a]=(u[a]-d[a])*m+p[a];return s}return(u-d)*m+p}if("continue"===t){var g=this.getValueAtTime(h/this.comp.globalData.frameRate,0),f=this.getValueAtTime((h-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(o=(s=new Array(g.length)).length,a=0;a<o;a+=1)s[a]=g[a]+(g[a]-f[a])*((l-h)/this.comp.globalData.frameRate)/5e-4;return s}return g+(l-h)/.001*(g-f)}}return this.getValueAtTime(((l-r)%i+r)/this.comp.globalData.frameRate,0)}function e(t,e,n){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var i,r,a,o,s,l=this.comp.renderedFrame,c=this.keyframes,h=c[0].t;if(l>=h)return this.pv;if(n?r=h+(i=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-h)):((!e||e>c.length-1)&&(e=c.length-1),i=(r=c[e].t)-h),"pingpong"===t){if(Math.floor((h-l)/i)%2==0)return this.getValueAtTime(((h-l)%i+h)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(h/this.comp.globalData.frameRate,0),u=this.getValueAtTime(r/this.comp.globalData.frameRate,0),p=this.getValueAtTime((i-(h-l)%i+h)/this.comp.globalData.frameRate,0),m=Math.floor((h-l)/i)+1;if(this.pv.length){for(o=(s=new Array(d.length)).length,a=0;a<o;a+=1)s[a]=p[a]-(u[a]-d[a])*m;return s}return p-(u-d)*m}if("continue"===t){var g=this.getValueAtTime(h/this.comp.globalData.frameRate,0),f=this.getValueAtTime((h+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(o=(s=new Array(g.length)).length,a=0;a<o;a+=1)s[a]=g[a]+(g[a]-f[a])*(h-l)/.001;return s}return g+(g-f)*(h-l)/.001}}return this.getValueAtTime((i-((h-l)%i+h))/this.comp.globalData.frameRate,0)}function n(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var n,i,r=this.comp.renderedFrame/this.comp.globalData.frameRate,a=r-t,o=e>1?(r+t-a)/(e-1):1,s=0,l=0;for(n=this.pv.length?createTypedArray("float32",this.pv.length):0;s<e;){if(i=this.getValueAtTime(a+s*o),this.pv.length)for(l=0;l<this.pv.length;l+=1)n[l]+=i[l];else n+=i;s+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)n[l]/=e;else n/=e;return n}function i(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var n=this.a.getValueAtTime(t);e.translate(-n[0]*this.a.mult,-n[1]*this.a.mult,n[2]*this.a.mult)}if(this.appliedTransformations<2){var i=this.s.getValueAtTime(t);e.scale(i[0]*this.s.mult,i[1]*this.s.mult,i[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var r=this.sk.getValueAtTime(t),a=this.sa.getValueAtTime(t);e.skewFromAxis(-r*this.sk.mult,a*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var o=this.r.getValueAtTime(t);e.rotate(-o*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var s=this.rz.getValueAtTime(t),l=this.ry.getValueAtTime(t),c=this.rx.getValueAtTime(t),h=this.or.getValueAtTime(t);e.rotateZ(-s*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-h[2]*this.or.mult).rotateY(h[1]*this.or.mult).rotateX(h[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var d=this.px.getValueAtTime(t),u=this.py.getValueAtTime(t);if(this.data.p.z){var p=this.pz.getValueAtTime(t);e.translate(d*this.px.mult,u*this.py.mult,-p*this.pz.mult)}else e.translate(d*this.px.mult,u*this.py.mult,0)}else{var m=this.p.getValueAtTime(t);e.translate(m[0]*this.p.mult,m[1]*this.p.mult,-m[2]*this.p.mult)}return e}function r(){return this.v.clone(new Matrix)}var a=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,n){var o=a(t,e,n);return o.dynamicProperties.length?o.getValueAtTime=i.bind(o):o.getValueAtTime=r.bind(o),o.setGroupProperty=expressionHelpers.setGroupProperty,o};var o=PropertyFactory.getProp;PropertyFactory.getProp=function(i,r,a,s,l){var c=o(i,r,a,s,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=t,c.loopIn=e,c.smooth=n,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===r.a?r.k.length:0,c.propertyIndex=r.ix;var h=0;return 0!==a&&(h=createTypedArray("float32",1===r.a?r.k[0].s.length:r.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:h},expressionHelpers.searchExpressions(i,r,c),c.k&&l.addDynamicProperty(c),c};var s=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(t,e){this.k&&this.getValue();var n,i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0));var r=i._length,a=i[t],o=i.v,s=createSizedArray(r);for(n=0;n<r;n+=1)s[n]="i"===t||"o"===t?[a[n][0]-o[n][0],a[n][1]-o[n][1]]:[a[n][0],a[n][1]];return s},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var n=this.v;void 0!==e&&(n=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(n));for(var i,r=this._segmentsLength,a=r.lengths,o=r.totalLength*t,s=0,l=a.length,c=0;s<l;){if(c+a[s].addedLength>o){var h=s,d=n.c&&s===l-1?0:s+1,u=(o-c)/a[s].addedLength;i=bez.getPointInSegment(n.v[h],n.v[d],n.o[h],n.i[d],u,a[s]);break}c+=a[s].addedLength,s+=1}return i||(i=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]]),i},vectorOnPath:function(t,e,n){1==t?t=this.v.c:0==t&&(t=.999);var i=this.pointOnPath(t,e),r=this.pointOnPath(t+.001,e),a=r[0]-i[0],o=r[1]-i[1],s=Math.sqrt(Math.pow(a,2)+Math.pow(o,2));return 0===s?[0,0]:"tangent"===n?[a/s,o/s]:[-o/s,a/s]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],s),extendPrototype([c],l),l.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var h=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,n,i,r){var a=h(t,e,n,i,r);return a.propertyIndex=e.ix,a.lock=!1,3===n?expressionHelpers.searchExpressions(t,e.pt,a):4===n&&expressionHelpers.searchExpressions(t,e.ks,a),a.k&&t.addDynamicProperty(a),a}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var n=this.calculateExpression(e);if(t.t!==n){var i={};return this.copyData(i,t),i.t=n.toString(),i.__complete=!1,i}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(t,e){var n,i,r=createNS("feMerge");for(r.setAttribute("result",t),i=0;i<e.length;i+=1)(n=createNS("feMergeNode")).setAttribute("in",e[i]),r.appendChild(n),r.appendChild(n);return r}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(t,e,n,i,r){this.filterManager=e;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=a,a.setAttribute("result",i+"_tint_1"),t.appendChild(a),(a=createNS("feColorMatrix")).setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",i+"_tint_2"),t.appendChild(a),this.matrixFilter=a;var o=this.createMergeNode(i,[r,i+"_tint_1",i+"_tint_2"]);t.appendChild(o)}function SVGFillFilter(t,e,n,i){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",i),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e,n){this.initialized=!1,this.filterManager=e,this.elem=n,this.paths=[]}function SVGTritoneFilter(t,e,n,i){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(r);var a=createNS("feComponentTransfer");a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),this.matrixFilter=a;var o=createNS("feFuncR");o.setAttribute("type","table"),a.appendChild(o),this.feFuncR=o;var s=createNS("feFuncG");s.setAttribute("type","table"),a.appendChild(s),this.feFuncG=s;var l=createNS("feFuncB");l.setAttribute("type","table"),a.appendChild(l),this.feFuncB=l,t.appendChild(a)}function SVGProLevelsFilter(t,e,n,i){this.filterManager=e;var r=this.filterManager.effectElements,a=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",a)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",a)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",a)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",a)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(a.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(a)),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&((a=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("result",i),t.appendChild(a),this.feFuncRComposed=this.createFeFunc("feFuncR",a),this.feFuncGComposed=this.createFeFunc("feFuncG",a),this.feFuncBComposed=this.createFeFunc("feFuncB",a))}function SVGDropShadowEffect(t,e,n,i,r){var a=e.container.globalData.renderConfig.filterSize,o=e.data.fs||a;t.setAttribute("x",o.x||a.x),t.setAttribute("y",o.y||a.y),t.setAttribute("width",o.width||a.width),t.setAttribute("height",o.height||a.height),this.filterManager=e;var s=createNS("feGaussianBlur");s.setAttribute("in","SourceAlpha"),s.setAttribute("result",i+"_drop_shadow_1"),s.setAttribute("stdDeviation","0"),this.feGaussianBlur=s,t.appendChild(s);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",i+"_drop_shadow_1"),l.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=l,t.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=c,t.appendChild(c);var h=createNS("feComposite");h.setAttribute("in",i+"_drop_shadow_3"),h.setAttribute("in2",i+"_drop_shadow_2"),h.setAttribute("operator","in"),h.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(h);var d=this.createMergeNode(i,[i+"_drop_shadow_4",r]);t.appendChild(d)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+i+" 0"),this.matrixFilter.setAttribute("values",n[0]-e[0]+" 0 0 0 "+e[0]+" "+(n[1]-e[1])+" 0 0 0 "+e[1]+" "+(n[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,n=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+n+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,n,i,r=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(i=this.elem.maskManager.masksProperties.length,n=0):i=1+(n=this.filterManager.effectElements[0].p.v-1),(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);n<i;n+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:n});if(3===this.filterManager.effectElements[10].p.v){var a=createNS("mask"),o=createElementID();a.setAttribute("id",o),a.setAttribute("mask-type","alpha"),a.appendChild(e),this.elem.globalData.defs.appendChild(a);var s=createNS("g");for(s.setAttribute("mask","url("+getLocationHref()+"#"+o+")");r[0];)s.appendChild(r[0]);this.elem.layerElement.appendChild(s),this.masker=a,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(r=this.elem.layerElement.children||this.elem.layerElement.childNodes;r.length;)this.elem.layerElement.removeChild(r[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var n,i,r=this.paths.length;for(e=0;e<r;e+=1)if(-1!==this.paths[e].m&&(n=this.elem.maskManager.viewData[this.paths[e].m],i=this.paths[e].p,(t||this.filterManager._mdf||n.prop._mdf)&&i.setAttribute("d",n.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||n.prop._mdf)){var a;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var o=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),s=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=i.getTotalLength();a="0 0 0 "+l*o+" ";var c,h=l*(s-o),d=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,u=Math.floor(h/d);for(c=0;c<u;c+=1)a+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";a+="0 "+10*l+" 0 0"}else a="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;i.setAttribute("stroke-dasharray",a)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*p[0])+","+bmFloor(255*p[1])+","+bmFloor(255*p[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=this.filterManager.effectElements[2].p.v,r=i[0]+" "+n[0]+" "+e[0],a=i[1]+" "+n[1]+" "+e[1],o=i[2]+" "+n[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",a),this.feFuncB.setAttribute("tableValues",o)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var n=createNS(t);return n.setAttribute("type","table"),e.appendChild(n),n},SVGProLevelsFilter.prototype.getTableValue=function(t,e,n,i,r){for(var a,o,s=0,l=Math.min(t,e),c=Math.max(t,e),h=Array.call(null,{length:256}),d=0,u=r-i,p=e-t;s<=256;)o=(a=s/256)<=l?p<0?r:i:a>=c?p<0?i:r:i+u*Math.pow((a-t)/p,1/n),h[d]=o,d+=1,s+=256/255;return h.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,n=this.filterManager.effectElements;this.feFuncRComposed&&(t||n[3].p._mdf||n[4].p._mdf||n[5].p._mdf||n[6].p._mdf||n[7].p._mdf)&&(e=this.getTableValue(n[3].p.v,n[4].p.v,n[5].p.v,n[6].p.v,n[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||n[10].p._mdf||n[11].p._mdf||n[12].p._mdf||n[13].p._mdf||n[14].p._mdf)&&(e=this.getTableValue(n[10].p.v,n[11].p.v,n[12].p.v,n[13].p.v,n[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||n[17].p._mdf||n[18].p._mdf||n[19].p._mdf||n[20].p._mdf||n[21].p._mdf)&&(e=this.getTableValue(n[17].p.v,n[18].p.v,n[19].p.v,n[20].p.v,n[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||n[24].p._mdf||n[25].p._mdf||n[26].p._mdf||n[27].p._mdf||n[28].p._mdf)&&(e=this.getTableValue(n[24].p.v,n[25].p.v,n[26].p.v,n[27].p.v,n[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||n[31].p._mdf||n[32].p._mdf||n[33].p._mdf||n[34].p._mdf||n[35].p._mdf)&&(e=this.getTableValue(n[31].p.v,n[32].p.v,n[33].p.v,n[34].p.v,n[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var n=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,r=n*Math.cos(i),a=n*Math.sin(i);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,n){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=n,n.matteElement=createNS("g"),n.matteElement.appendChild(n.layerElement),n.matteElement.appendChild(n.transformedElement),n.baseElement=n.matteElement}function SVGGaussianBlurEffect(t,e,n,i){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");r.setAttribute("result",i),t.appendChild(r),this.feGaussianBlur=r}function TransformEffect(){}function SVGTransformEffect(t,e){this.init(e)}function CVTransformEffect(t){this.init(t)}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,n=_svgMatteSymbols.length;e<n;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var n=t.layerElement.parentNode;if(n){for(var i,r=n.children,a=0,o=r.length;a<o&&r[a]!==t.layerElement;)a+=1;a<=o-2&&(i=r[a+1]);var s=createNS("use");s.setAttribute("href","#"+e),i?n.insertBefore(s,i):n.appendChild(s)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var n=createElementID(),i=createNS("mask");i.setAttribute("id",e.layerId),i.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var r=t.globalData.defs;r.appendChild(i);var a=createNS("symbol");a.setAttribute("id",n),this.replaceInParent(e,n),a.appendChild(e.layerElement),r.appendChild(a);var o=createNS("use");o.setAttribute("href","#"+n),i.appendChild(o),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,n=0,i=e.length;n<i;)e[n]&&e[n].data.ind===t&&this.setElementAsMask(this.elem,e[n]),n+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,n=this.filterManager.effectElements[1].p.v,i=3==n?0:e,r=2==n?0:e;this.feGaussianBlur.setAttribute("stdDeviation",i+" "+r);var a=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",a)}},TransformEffect.prototype.init=function(t){this.effectsManager=t,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(t){if(this._opMdf=!1,this._mdf=!1,t||this.effectsManager._mdf){var e=this.effectsManager.effectElements,n=e[0].p.v,i=e[1].p.v,r=1===e[2].p.v,a=e[3].p.v,o=r?a:e[4].p.v,s=e[5].p.v,l=e[6].p.v,c=e[7].p.v;this.matrix.reset(),this.matrix.translate(-n[0],-n[1],n[2]),this.matrix.scale(.01*o,.01*a,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-s*degToRads,(l+90)*degToRads),this.matrix.translate(i[0],i[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie},module.exports=factory())}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.amdO={},__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),__webpack_require__.nc=void 0;var __webpack_exports__={};(()=>{"use strict";__webpack_require__.d(__webpack_exports__,{default:()=>wn});var t=__webpack_require__(3899),e=new(__webpack_require__(7007).EventEmitter);e.setMaxListeners(20);const n=e;function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,s(i.key),i)}}function s(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return e=t,n=[{key:"validateRequired",value:function(t,e){if(null==t)throw new Error("".concat(e," is required"));return t}},{key:"validateString",value:function(e,n){if(t.validateRequired(e,n),"string"!=typeof e)throw new Error("".concat(n," must be a string"));if(0===e.trim().length)throw new Error("".concat(n," cannot be empty"));return e}},{key:"validateEnum",value:function(e,n,i){if(t.validateString(e,n),!i.includes(e))throw new Error("".concat(n," must be one of: ").concat(i.join(", ")));return e}},{key:"validateNumber",value:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null==t)return null!==(n=i.default)&&void 0!==n?n:0;if("number"!=typeof t)throw new Error("".concat(e," must be a number"));if(!Number.isFinite(t))throw new Error("".concat(e," must be a finite number"));if(void 0!==i.min&&t<i.min)throw new Error("".concat(e," must be greater than or equal to ").concat(i.min));if(void 0!==i.max&&t>i.max)throw new Error("".concat(e," must be less than or equal to ").concat(i.max));return t}},{key:"validateBoolean",value:function(t,e){if(null==t)return arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("boolean"!=typeof t)throw new Error("".concat(e," must be a boolean"));return t}},{key:"validateUrl",value:function(e,n){t.validateString(e,n);try{return new URL(e),e}catch(t){throw new Error("".concat(n," must be a valid URL"))}}},{key:"validatePinataServerKey",value:function(e){return t.validateString(e,"Pinata IPFS server key")}},{key:"validatePinataGatewayUrl",value:function(e){if(null==e)return null;var n=t.validateString(e,"Pinata IPFS gateway URL");if(n.startsWith("http://")||n.startsWith("https://"))throw new Error("Pinata IPFS gateway URL must not include http:// or https://");if(n.includes("/"))throw new Error("Pinata IPFS gateway URL must not contain any forward slashes");try{return new URL("https://".concat(n)),n}catch(t){throw new Error("Pinata IPFS gateway URL must be a valid URL")}}},{key:"validateEnvironment",value:function(e){return t.validateEnum(e,"Environment",["testnet","mainnet"])}},{key:"validateMarketplaceType",value:function(e){return t.validateEnum(e,"marketplaceType",["FT","NFT"])}},{key:"validateNamespace",value:function(e){var n=t.validateString(e,"Namespace");if(5!==n.length)throw new Error("Namespace must be exactly 5 characters long");if(!/^[A-Z]+$/.test(n))throw new Error("Namespace must contain only uppercase letters");return n}},{key:"validateRevenueWalletAddress",value:function(e){var n=t.validateString(e,"Revenue wallet address");if(58!==n.length)throw new Error("Revenue wallet address must be 58 characters long");if(!/^[A-Z2-7]{58}$/.test(n))throw new Error("Invalid Algorand wallet address format");return n}},{key:"validateFee",value:function(e,n){return t.validateNumber(e,n,{min:0})}},{key:"validateDisableToast",value:function(e){return t.validateBoolean(e,"disableToast",!1)}},{key:"validateDisableUi",value:function(e){return t.validateBoolean(e,"disableUi",!1)}},{key:"validateMinimizeUILocation",value:function(e){return t.validateEnum(e,"minimizeUILocation",["left","right"])||"right"}},{key:"validateLogo",value:function(e){if(null==e)return null;var n=t.validateString(e,"Logo");if(n.startsWith("http://")||n.startsWith("https://"))return t.validateUrl(n,"Logo");if(n.startsWith("./")||n.startsWith("../")||n.startsWith("/")){if(!/^[./\\a-zA-Z0-9_-]+\.(png|jpg|jpeg|gif|svg|webp)$/i.test(n))throw new Error("Invalid logo file path. Must be a valid image file path");return n}throw new Error("Logo must be either a valid URL or a valid local file path")}},{key:"validateToastLocation",value:function(e){return t.validateEnum(e,"Toast location",["TOP_LEFT","TOP_RIGHT"])}},{key:"validateSupportedMediaFormats",value:function(t){if(!Array.isArray(t))throw new Error("supportedMediaFormats must be an array");var e=["IMAGE","VIDEO","AUDIO"],n=t.filter((function(t){return!e.includes(t)}));if(n.length>0)throw new Error("Invalid media formats: ".concat(n.join(", "),". Valid formats are: ").concat(e.join(", ")));return t}},{key:"validateFileType",value:function(t,e){var n,i,a={IMAGE:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml"],VIDEO:["video/mp4","video/webm","video/ogg","video/quicktime"],AUDIO:["audio/mpeg","audio/wav","audio/ogg","audio/mp4","audio/webm"]},o=e.reduce((function(t,e){return[].concat(r(t),r(a[e]))}),[]),s=t.type||t.mimetype;if(!s||!o.includes(s)){var l=e.map((function(t){return t.toLowerCase()})).join(", ");return{valid:!1,message:"Please upload a supported file type (".concat(l,")")}}var c=null!==(n=t.size)&&void 0!==n?n:t.data instanceof Uint8Array?t.data.byteLength:null===(i=t.data)||void 0===i?void 0:i.length;return null!=c&&c>104857600?{valid:!1,message:"File size must be less than 100MB"}:{valid:!0}}},{key:"sanitizeInput",value:function(t){return(t=(t=(t=(t=t.replace(/<[^>]*>/g,"")).replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"")).replace(/[^a-zA-Z0-9\s.,!?@#$%^&*()_+\-=\[\]{};':"\\|<>\/]/g,"")).replace(/\s+/g," ")).trim()}},{key:"validateNFTName",value:function(t){return t.length<1||t.length>50?{valid:!1,message:"NFT name must be between 1 and 50 characters"}:{valid:!0}}},{key:"validateNFTDescription",value:function(t){return t.length<1||t.length>500?{valid:!1,message:"NFT description must be between 1 and 500 characters"}:{valid:!0}}},{key:"validateFTName",value:function(t){return t.length<1||t.length>50?{valid:!1,message:"FT name must be between 1 and 50 characters"}:{valid:!0}}},{key:"validateFTDescription",value:function(t){return t.length<1||t.length>500?{valid:!1,message:"FT description must be between 1 and 500 characters"}:{valid:!0}}},{key:"validateFTDecimals",value:function(t){if(null==t||""===t)return{valid:!1,message:"Decimals is required"};var e=Number(t);return Number.isInteger(e)?e<0||e>19?{valid:!1,message:"Decimals must be between 0 and 19"}:{valid:!0}:{valid:!1,message:"Decimals must be a whole number"}}},{key:"validateFTTotalSupply",value:function(t){if(null==t||""===t)return{valid:!1,message:"Total supply is required"};var e=Number(t);return Number.isInteger(e)?e<1?{valid:!1,message:"Total supply must be at least 1"}:e>Number.MAX_SAFE_INTEGER?{valid:!1,message:"Total supply is too large"}:{valid:!0}:{valid:!1,message:"Total supply must be a whole number"}}}],null&&o(e.prototype,null),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}(),c=__webpack_require__(5072),h=__webpack_require__.n(c),d=__webpack_require__(7825),u=__webpack_require__.n(d),p=__webpack_require__(7659),m=__webpack_require__.n(p),g=__webpack_require__(5056),f=__webpack_require__.n(g),y=__webpack_require__(540),v=__webpack_require__.n(y),w=__webpack_require__(1113),b=__webpack_require__.n(w),x=__webpack_require__(8333),S={};S.styleTagTransform=b(),S.setAttributes=f(),S.insert=m().bind(null,"head"),S.domAPI=u(),S.insertStyleElement=v(),h()(x.A,S),x.A&&x.A.locals&&x.A.locals;var A=__webpack_require__(4143),C={};function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function I(){I=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new T(i||[]);return r(o,"_invoke",{value:_(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var u="suspendedStart",p="suspendedYield",m="executing",g="completed",f={};function y(){}function v(){}function w(){}var b={};c(b,o,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(L([])));S&&S!==n&&i.call(S,o)&&(b=S);var A=w.prototype=y.prototype=Object.create(b);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(r,a,o,s){var l=d(t[r],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==k(h)&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(h).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,s)}))}s(l.arg)}var a;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,r){n(t,i,e,r)}))}return a=a?a.then(r,r):r()}})}function _(e,n,i){var r=u;return function(a,o){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===a)throw o;return{value:t,done:!0}}for(i.method=a,i.arg=o;;){var s=i.delegate;if(s){var l=M(s,i);if(l){if(l===f)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===u)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=d(e,n,i);if("normal"===c.type){if(r=i.done?g:p,c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=g,i.method="throw",i.arg=c.arg)}}}function M(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),f;var a=d(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(k(e)+" is not iterable")}return v.prototype=w,r(A,"constructor",{value:w,configurable:!0}),r(w,"constructor",{value:v,configurable:!0}),v.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},C(E.prototype),c(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new E(h(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(A),c(A,l,"Generator"),c(A,o,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=L,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;P(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:L(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),f}},e}function E(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function _(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){E(a,i,r,o,s,"next",t)}function s(t){E(a,i,r,o,s,"throw",t)}o(void 0)}))}}function M(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,D(i.key),i)}}function D(t){var e=function(t){if("object"!=k(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==k(e)?e:e+""}function P(t,e,n){T(t,e),e.set(t,n)}function T(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function L(t,e){return t.get(F(t,e))}function B(t,e,n){return t.set(F(t,e),n),n}function F(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}C.styleTagTransform=b(),C.setAttributes=f(),C.insert=m().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=v(),h()(A.A,C),A.A&&A.A.locals&&A.A.locals;var R=new WeakMap,N=new WeakMap,V=new WeakMap,z=new WeakMap,G=new WeakMap,W=new WeakMap,O=new WeakMap,Z=new WeakMap,Y=new WeakMap,H=new WeakMap,j=new WeakSet,X=function(){return t=function t(e,n){var i;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),T(this,i=j),i.add(this),P(this,R,void 0),P(this,N,void 0),P(this,V,void 0),P(this,z,void 0),P(this,G,void 0),P(this,W,void 0),P(this,O,void 0),P(this,Z,void 0),P(this,Y,void 0),P(this,H,void 0),B(R,this,e),B(N,this,n.disableUi),B(V,this,n.disableToast),B(z,this,n.logo),B(G,this,n.minimizeUILocation),B(W,this,n.toastLocation),B(O,this,null),B(Z,this,n.marketplaceType||"NFT"),B(Y,this,null),B(H,this,null)},e=[{key:"initUI",value:function(t){if(!L(N,this)){var e=document.getElementById("algox-sdk-container");e&&e.remove();var n=document.createElement("div");n.id="algox-sdk-container",n.style.display=L(R,this).isMinimized?"none":"flex";var i='\n <div id="algox-header">\n <div class="header-left">\n '.concat(L(z,this)?'<img src="'.concat(L(z,this),'" alt="AlgoMintX" onerror="this.style.display=\'none\'; this.nextElementSibling.style.display=\'block\';" />'):"",'\n <h3 style="').concat(L(z,this)?"display: none;":"display: block;",'">AlgoMintX</h3>\n </div>\n <div class="header-right">\n <button id="algox-theme-btn" title="Toggle Theme">🌓</button>\n <button id="algox-logout-btn" title="Logout" style="display: none;">⏻</button>\n <button id="algox-minimize-btn" title="Minimize">&#x2013;</button>\n </div>\n </div>\n \n <div id="algox-wallet-choice">\n <button class="algox-wallet-btn" data-wallet="pera">\n <img src="https://perawallet.s3.amazonaws.com/images/media-kit/logomark-white.svg" alt="Pera Wallet" />\n Connect Pera Wallet\n </button>\n <button class="algox-wallet-btn" data-wallet="defly">\n <img src="https://docs.defly.app/~gitbook/image?url=https%3A%2F%2F2700986753-files.gitbook.io%2F~%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fcollections%252FWDbwYIFtoiPa3JoJufCw%252Ficon%252FbQUUOW6VhH6vKR0XH7UB%252Flogo-notext-whiteonblack.png%3Falt%3Dmedia%26token%3D7d62c65b-fd29-47b6-a83b-162caac2fc8f&width=32&dpr=2&quality=100&sign=952138fe&sv=2" alt="Defly Wallet" />\n Connect Defly Wallet\n </button>\n </div>'),r="NFT"===L(Z,this),a="FT"===L(Z,this),o='\n <div id="algox-mintx-content">\n <div class="algox-tabs-container">\n <button class="algox-tab-nav-btn" id="algox-tab-prev">‹</button>\n <div class="algox-tabs-wrapper">\n <div class="algox-tabs-track">\n '.concat(r?'<button class="algox-tab-btn active" data-tab="nft">Mint NFT</button>':"","\n ").concat(a?'<button class="algox-tab-btn'.concat(r?"":" active",'" data-tab="ft">Mint FT</button>'):"",'\n </div>\n </div>\n <button class="algox-tab-nav-btn" id="algox-tab-next">›</button>\n </div>\n\n <div class="algox-tab-content">\n ').concat(r?'<div id="algox-nft-tab" class="algox-tab-pane active">\n <div id="algox-mintx-nft-form">\n <input type="text" id="algox-mintx-nft-name" placeholder="NFT Name" />\n <textarea id="algox-mintx-nft-description" placeholder="NFT Description"></textarea>\n <input type="file" id="algox-mintx-nft-file" accept="image/*,video/*" />\n <button id="algox-mintx-mint-btn" title="Mint NFT">Mint NFT</button>\n <button id="algox-mintx-reset-btn">Mint another NFT</button>\n <div id="algox-mintx-messages" title="Click to copy"></div>\n </div>\n </div>':"","\n ").concat(a?'<div id="algox-ft-tab" class="algox-tab-pane'.concat(r?"":" active",'">\n <div id="algox-mintx-ft-content">\n <input type="text" id="algox-mintx-ft-name" placeholder="Token Name" />\n <textarea id="algox-mintx-ft-description" placeholder="Token Description"></textarea>\n <input type="number" id="algox-mintx-ft-decimals" placeholder="Decimals (0 - 19)" min="0" max="19" step="1" />\n <input type="number" id="algox-mintx-ft-supply" placeholder="Total Supply" min="1" step="1" />\n <label class="algox-mintx-ft-file-label" for="algox-mintx-ft-file">Token Icon (optional)</label>\n <input type="file" id="algox-mintx-ft-file" accept="image/*" />\n <button id="algox-mintx-ft-mint-btn" title="Mint FT">Mint FT</button>\n <button id="algox-mintx-ft-reset-btn">Mint another FT</button>\n <div id="algox-mintx-ft-messages" title="Click to copy"></div>\n </div>\n </div>'):"","\n </div>\n </div>"),s=L(z,this)?"":'\n <div id="algox-footer">\n <span>AlgoMintX crafted with ❤️ by <a href="https://ibhagyesh.com/" target="_blank" rel="noopener noreferrer">ibhagyesh</a></span>\n </div>',l='\n <div id="algox-wallet-address" title="Click to copy connected wallet address"></div>\n '.concat(s,'\n\n <div id="algox-loading-overlay">\n <div id="algox-loader"></div>\n <div id="algox-processing-message"></div>\n </div>');n.innerHTML=i+o+l,document.body.appendChild(n);var c=document.getElementById("algox-minimized-btn");c&&c.remove();var h=document.createElement("button");h.id="algox-minimized-btn",h.innerHTML=L(z,this)?'<img src="'.concat(L(z,this),'" alt="AMX" onerror="this.style.display=\'none\'; this.nextElementSibling.style.display=\'block\';" /><span style="display: none;">AMX</span>'):"AMX",document.body.appendChild(h),this.applyTheme(),this.setupThemeListener(),F(j,this,U).call(this,t),F(j,this,J).call(this,t),this.setupToastContainer()}}},{key:"showSDKUI",value:function(){L(N,this)||(L(R,this)&&L(R,this).account?(document.getElementById("algox-sdk-container").style.display="flex",document.getElementById("algox-header").style.display="flex",document.getElementById("algox-logout-btn").style.display="contents",document.getElementById("algox-wallet-choice").style.display="none",document.getElementById("algox-mintx-content").style.display="flex",this.updateWalletAddressBar(),L(R,this).isMinimized?this.minimizeSDK(!0):this.maximizeSDK(!0)):this.resetToLoginUI())}},{key:"resetToLoginUI",value:function(){L(N,this)||(this.clearMessage(),this.clearFTMessage(),this.updateWalletAddressBar(),document.getElementById("algox-sdk-container").style.display="flex",document.getElementById("algox-header").style.display="flex",document.getElementById("algox-logout-btn").style.display="none",document.getElementById("algox-wallet-choice").style.display="flex",document.getElementById("algox-mintx-content").style.display="none",L(R,this).isMinimized?this.minimizeSDK(!0):this.maximizeSDK(!0))}},{key:"updateWalletAddressBar",value:function(){if(!L(N,this)){var t=document.getElementById("algox-wallet-address");t&&(L(R,this).account?(t.innerText=L(R,this).account,t.style.display="block"):(t.innerText="",t.style.display="none"))}}},{key:"setupToastContainer",value:function(){if(!L(V,this)&&!L(N,this)){var t=document.getElementById("algox-toast-container");t||((t=document.createElement("div")).id="algox-toast-container",t.className="TOP_LEFT"===L(W,this)?"top-left":"top-right",document.body.appendChild(t))}}},{key:"showToast",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";if(n.emit("toast:show",{message:t,type:e}),!L(V,this)&&!L(N,this)){var i="algox-toast",r=document.getElementById(i);r&&r.remove();var a=document.createElement("div");a.id=i;var o=document.createElement("div");o.className="toast-content",o.innerText=t;var s=document.createElement("button");s.className="toast-close",s.innerHTML="×",s.onclick=function(){a.style.opacity="0",a.addEventListener("transitionend",(function(){return a.remove()}),{once:!0})},a.appendChild(o),a.appendChild(s),a.classList.add("error"===e?"error":"success"===e?"success":"warning"===e?"warning":"info"),a.classList.add(L(W,this).toLowerCase().replace("_","-")),document.body.appendChild(a),requestAnimationFrame((function(){a.style.opacity="1"})),setTimeout((function(){return s.onclick()}),3500)}}},{key:"showLoadingOverlay",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Processing...";if(!L(N,this)){var e=document.getElementById("algox-loading-overlay"),n=document.getElementById("algox-minimized-btn"),i=document.getElementById("algox-processing-message");e&&i&&(i.textContent=t,B(O,this,t),"dark"===L(R,this).theme?e.classList.add("dark-theme"):e.classList.remove("dark-theme"),requestAnimationFrame((function(){e.classList.add("visible"),n&&n.classList.add("processing")})))}}},{key:"hideLoadingOverlay",value:function(){if(!L(N,this)){var t=document.getElementById("algox-loading-overlay"),e=document.getElementById("algox-minimized-btn");t?requestAnimationFrame((function(){t.classList.remove("visible"),e&&e.classList.remove("processing")})):e&&e.classList.remove("processing")}}},{key:"updateLoadingMessage",value:function(t){if(!L(N,this)){var e=document.getElementById("algox-processing-message");e&&(e.textContent=t,B(O,this,t))}}},{key:"getSystemTheme",value:function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}},{key:"setupThemeListener",value:function(){var t=this;L(N,this)||window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",(function(e){var n=localStorage.getItem("amx");if(n)try{JSON.parse(n).theme||(L(R,t).theme=e.matches?"dark":"light",t.saveUIState(),t.applyTheme())}catch(t){console.error("Failed to parse saved state:",t)}}))}},{key:"applyTheme",value:function(){if(!L(N,this)){var t=document.getElementById("algox-sdk-container"),e=document.getElementById("algox-minimized-btn");t&&("dark"===L(R,this).theme?(t.classList.add("dark-theme"),e&&e.classList.add("dark-theme")):(t.classList.remove("dark-theme"),e&&e.classList.remove("dark-theme")))}}},{key:"saveUIState",value:function(){L(N,this)||localStorage.setItem("axs",JSON.stringify({minimized:L(R,this).isMinimized,theme:L(R,this).theme}))}},{key:"minimizeSDK",value:function(t){if(!L(N,this)&&(t||!L(R,this).isMinimized)){var e=document.getElementById("algox-sdk-container"),i=document.getElementById("algox-minimized-btn");e&&i&&(i.style.right="right"===L(G,this)?"20px":"auto",i.style.left="left"===L(G,this)?"20px":"auto",e.classList.add("minimizing"),i.style.display="block",setTimeout((function(){e.style.display="none",e.classList.remove("minimizing"),i.classList.add("showing")}),300),L(R,this).isMinimized=!0,this.saveUIState(),n.emit("window:size:minimized",{minimized:L(R,this).isMinimized}))}}},{key:"maximizeSDK",value:function(t){if(!L(N,this)&&(t||L(R,this).isMinimized)){var e=document.getElementById("algox-sdk-container"),i=document.getElementById("algox-minimized-btn");e&&i&&(i.classList.remove("showing"),i.classList.add("hiding"),setTimeout((function(){i.style.display="none",i.classList.remove("hiding"),e.style.display="flex",e.classList.add("maximizing"),setTimeout((function(){e.classList.remove("maximizing")}),300)}),200),L(R,this).isMinimized=!1,this.saveUIState(),n.emit("window:size:maximized",{minimized:L(R,this).isMinimized}))}}},{key:"setupNFTInputValidation",value:function(t){var e=this;if(!L(N,this)){var n=document.getElementById("algox-mintx-nft-name"),i=document.getElementById("algox-mintx-nft-description"),r=document.getElementById("algox-mintx-nft-file"),a={IMAGE:"image/jpeg,image/png,image/gif,image/webp,image/svg+xml",VIDEO:"video/mp4,video/webm,video/ogg,video/quicktime",AUDIO:"audio/mpeg,audio/wav,audio/ogg,audio/mp4,audio/webm"},o=t.getSupportedMediaFormats().map((function(t){return a[t]})).join(",");r.setAttribute("accept",o),n.addEventListener("input",(function(n){if(n.target.value.length>50)return n.target.value=n.target.value.slice(0,50),void e.showToast("NFT name cannot exceed 50 characters","error");if(n.target.value.includes("<")||n.target.value.includes(">")){var i=t.sanitizeInput(n.target.value);i!==n.target.value&&(n.target.value=i)}e.validateMintButton()})),i.addEventListener("input",(function(n){if(n.target.value.length>500)return n.target.value=n.target.value.slice(0,500),void e.showToast("NFT description cannot exceed 500 characters","error");if(n.target.value.includes("<")||n.target.value.includes(">")){var i=t.sanitizeInput(n.target.value);i!==n.target.value&&(n.target.value=i)}e.validateMintButton()})),r.addEventListener("change",(function(n){var i=n.target.files[0];if(i){var r=t.validateFileType(i);r.valid||(e.showToast(r.message,"error"),n.target.value=""),e.validateMintButton()}else e.validateMintButton()})),n.addEventListener("paste",(function(n){n.preventDefault();var i=(n.clipboardData||window.clipboardData).getData("text"),r=i.slice(0,50),a=t.sanitizeInput(r);n.target.value=a,i.length>50&&e.showToast("NFT name cannot exceed 50 characters","error"),e.validateMintButton()})),i.addEventListener("paste",(function(n){n.preventDefault();var i=(n.clipboardData||window.clipboardData).getData("text"),r=i.slice(0,500),a=t.sanitizeInput(r);n.target.value=a,i.length>500&&e.showToast("NFT description cannot exceed 500 characters","error"),e.validateMintButton()})),this.validateMintButton()}}},{key:"validateMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-mint-btn"),e=document.getElementById("algox-mintx-nft-name"),n=document.getElementById("algox-mintx-nft-description"),i=document.getElementById("algox-mintx-nft-file"),r=e.value.trim().length>0,a=n.value.trim().length>0,o=i.files.length>0;t.disabled=!(r&&a&&o)}}},{key:"clearMessage",value:function(){L(N,this)||L(Y,this)&&(L(Y,this).innerText="",L(Y,this).style.display="none",L(Y,this).style.cursor="pointer")}},{key:"resetNFTDetails",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-nft-name"),e=document.getElementById("algox-mintx-nft-description"),n=document.getElementById("algox-mintx-nft-file"),i=document.getElementById("algox-mintx-mint-btn"),r=document.getElementById("algox-mintx-reset-btn");t.value="",e.value="",n.value="",i.style.display="block",r.style.display="none",i.disabled=!0,this.clearMessage(),this.validateMintButton()}}},{key:"updateMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pointer";L(N,this)||L(Y,this)&&(L(Y,this).innerText=t,L(Y,this).style.display="block",L(Y,this).style.cursor=e)}},{key:"disableMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-mint-btn"),e=document.getElementById("algox-logout-btn");t&&(t.disabled=!0),e&&(e.disabled=!0)}}},{key:"enableMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-mint-btn"),e=document.getElementById("algox-logout-btn");t&&(t.disabled=!1),e&&(e.disabled=!1)}}},{key:"showResetButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-mint-btn"),e=document.getElementById("algox-mintx-reset-btn");t&&(t.style.display="none"),e&&(e.style.display="block")}}},{key:"setupFTInputValidation",value:function(t){var e=this;if(!L(N,this)){var n=document.getElementById("algox-mintx-ft-name"),i=document.getElementById("algox-mintx-ft-description"),r=document.getElementById("algox-mintx-ft-decimals"),a=document.getElementById("algox-mintx-ft-supply"),o=document.getElementById("algox-mintx-ft-file");n.addEventListener("input",(function(n){if(n.target.value.length>50)return n.target.value=n.target.value.slice(0,50),void e.showToast("Token name cannot exceed 50 characters","error");if(n.target.value.includes("<")||n.target.value.includes(">")){var i=t.sanitizeInput(n.target.value);i!==n.target.value&&(n.target.value=i)}e.validateFTMintButton()})),i.addEventListener("input",(function(n){if(n.target.value.length>500)return n.target.value=n.target.value.slice(0,500),void e.showToast("Token description cannot exceed 500 characters","error");if(n.target.value.includes("<")||n.target.value.includes(">")){var i=t.sanitizeInput(n.target.value);i!==n.target.value&&(n.target.value=i)}e.validateFTMintButton()})),r.addEventListener("input",(function(t){var n=t.target.value.replace(/[^0-9]/g,"");""!==n&&Number(n)>19&&(n="19",e.showToast("Decimals cannot exceed 19","error")),t.target.value=n,e.validateFTMintButton()})),a.addEventListener("input",(function(t){var n=t.target.value.replace(/[^0-9]/g,"");t.target.value=n,e.validateFTMintButton()})),o.addEventListener("change",(function(n){var i=n.target.files[0];if(i){var r=t.validateFileType(i);r.valid||(e.showToast(r.message,"error"),n.target.value="")}e.validateFTMintButton()})),n.addEventListener("paste",(function(n){n.preventDefault();var i=(n.clipboardData||window.clipboardData).getData("text"),r=i.slice(0,50);n.target.value=t.sanitizeInput(r),i.length>50&&e.showToast("Token name cannot exceed 50 characters","error"),e.validateFTMintButton()})),i.addEventListener("paste",(function(n){n.preventDefault();var i=(n.clipboardData||window.clipboardData).getData("text"),r=i.slice(0,500);n.target.value=t.sanitizeInput(r),i.length>500&&e.showToast("Token description cannot exceed 500 characters","error"),e.validateFTMintButton()})),this.validateFTMintButton()}}},{key:"validateFTMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-ft-mint-btn"),e=document.getElementById("algox-mintx-ft-name"),n=document.getElementById("algox-mintx-ft-description"),i=document.getElementById("algox-mintx-ft-decimals"),r=document.getElementById("algox-mintx-ft-supply"),a=e.value.trim().length>0,o=n.value.trim().length>0,s=Number(i.value),l=""!==i.value&&Number.isInteger(s)&&s>=0&&s<=19,c=Number(r.value),h=""!==r.value&&Number.isInteger(c)&&c>=1;t.disabled=!(a&&o&&l&&h)}}},{key:"resetFTDetails",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-ft-name"),e=document.getElementById("algox-mintx-ft-description"),n=document.getElementById("algox-mintx-ft-decimals"),i=document.getElementById("algox-mintx-ft-supply"),r=document.getElementById("algox-mintx-ft-file"),a=document.getElementById("algox-mintx-ft-mint-btn"),o=document.getElementById("algox-mintx-ft-reset-btn");t.value="",e.value="",n.value="",i.value="",r.value="",a.style.display="block",o.style.display="none",a.disabled=!0,this.clearFTMessage(),this.validateFTMintButton()}}},{key:"clearFTMessage",value:function(){L(N,this)||L(H,this)&&(L(H,this).innerText="",L(H,this).style.display="none",L(H,this).style.cursor="pointer")}},{key:"updateFTMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pointer";L(N,this)||L(H,this)&&(L(H,this).innerText=t,L(H,this).style.display="block",L(H,this).style.cursor=e)}},{key:"disableFTMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-ft-mint-btn"),e=document.getElementById("algox-logout-btn");t&&(t.disabled=!0),e&&(e.disabled=!0)}}},{key:"enableFTMintButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-ft-mint-btn"),e=document.getElementById("algox-logout-btn");t&&(t.disabled=!1),e&&(e.disabled=!1)}}},{key:"showFTResetButton",value:function(){if(!L(N,this)){var t=document.getElementById("algox-mintx-ft-mint-btn"),e=document.getElementById("algox-mintx-ft-reset-btn");t&&(t.style.display="none"),e&&(e.style.display="block")}}}],e&&M(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function U(t){var e=this;document.getElementById("algox-wallet-choice").addEventListener("click",function(){var e=_(I().mark((function e(n){var i,r,a,o;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a=null===(i=(r=n.target).closest)||void 0===i?void 0:i.call(r,".algox-wallet-btn"))){e.next=5;break}return o=a.getAttribute("data-wallet"),e.next=5,t.onWalletConnect(o);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),document.getElementById("algox-minimized-btn").addEventListener("click",(function(){return t.onMaximize()})),document.getElementById("algox-minimize-btn").addEventListener("click",(function(){return t.onMinimize()})),document.getElementById("algox-logout-btn").addEventListener("click",(function(){return t.onLogout()})),document.getElementById("algox-theme-btn").addEventListener("click",(function(){t.onThemeToggle()})),document.getElementById("algox-wallet-address").addEventListener("click",(function(){L(R,e).account&&(navigator.clipboard.writeText(L(R,e).account),e.showToast("Wallet address copied to clipboard","success"))}))}function K(t){var e=document.getElementById("algox-sdk-container"),n=null==e?void 0:e.querySelector(".algox-tabs-container"),i=null==e?void 0:e.querySelector(".algox-tab-content"),r=null==e?void 0:e.querySelector(".algox-tabs-track"),a=null==e?void 0:e.querySelectorAll(".algox-tab-btn"),o=null==e?void 0:e.querySelector("#algox-tab-prev"),s=null==e?void 0:e.querySelector("#algox-tab-next");if(r&&a&&0!==a.length){if(a.length<=1)return n&&(n.style.display="none"),void(i&&(i.style.display="contents"));var l=0,c=a.length;c<=2&&(o&&(o.style.display="none"),s&&(s.style.display="none"));var h=function(){!o||!s||c<=2||(o.disabled=0===l,s.disabled=l>=c-2)},d=function(t){"prev"===t&&l>0?l--:"next"===t&&l<c-2&&l++;var e=-50*l;r.style.transform="translateX(".concat(e,"%)"),h()};a.forEach((function(t){t.addEventListener("click",(function(){var n=t.getAttribute("data-tab");a.forEach((function(t){return t.classList.remove("active")})),t.classList.add("active"),e.querySelectorAll(".algox-tab-pane").forEach((function(t){return t.classList.remove("active")}));var i=e.querySelector("#algox-".concat(n,"-tab"));i&&i.classList.add("active")}))})),null==o||o.addEventListener("click",(function(){return d("prev")})),null==s||s.addEventListener("click",(function(){return d("next")})),h()}}function J(t){var e=this;F(j,this,K).call(this,t),document.getElementById("algox-mintx-mint-btn").addEventListener("click",_(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onMintNFT();case 2:case"end":return e.stop()}}),e)})))),document.getElementById("algox-mintx-reset-btn").addEventListener("click",(function(){return t.onResetNFT()})),document.getElementById("algox-mintx-ft-mint-btn").addEventListener("click",_(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.onMintFT();case 2:case"end":return e.stop()}}),e)})))),document.getElementById("algox-mintx-ft-reset-btn").addEventListener("click",(function(){return t.onResetFT()})),B(Y,this,document.getElementById("algox-mintx-messages")),L(Y,this)&&L(Y,this).addEventListener("click",(function(){if(L(Y,e).innerText&&"Minting NFT... Please wait."!==L(Y,e).innerText){var t=L(Y,e).innerText.replace("NFT Minted! Transaction ID: ","");navigator.clipboard.writeText(t),e.showToast("Transaction ID copied to clipboard","success");var n="mainnet"===L(R,e).network?"mainnet":"testnet",i="https://lora.algokit.io/".concat(n,"/transaction/").concat(t);window.open(i,"_blank")}})),B(H,this,document.getElementById("algox-mintx-ft-messages")),L(H,this)&&L(H,this).addEventListener("click",(function(){if(L(H,e).innerText&&"Minting FT... Please wait."!==L(H,e).innerText){var t=L(H,e).innerText.replace("FT Minted! Transaction ID: ","");navigator.clipboard.writeText(t),e.showToast("Transaction ID copied to clipboard","success");var n="mainnet"===L(R,e).network?"mainnet":"testnet",i="https://lora.algokit.io/".concat(n,"/transaction/").concat(t);window.open(i,"_blank")}}))}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function $(){return"undefined"!=typeof globalThis&&void 0!==globalThis.window&&void 0!==globalThis.document}var Q=new Map;function tt(){return $()&&"undefined"!=typeof localStorage?localStorage:{getItem:function(t){return Q.has(t)?Q.get(t):null},setItem:function(t,e){Q.set(t,String(e))},removeItem:function(t){Q.delete(t)}}}function et(t){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},et(t)}function nt(){nt=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new D(i||[]);return r(o,"_invoke",{value:I(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var u="suspendedStart",p="suspendedYield",m="executing",g="completed",f={};function y(){}function v(){}function w(){}var b={};c(b,o,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(P([])));S&&S!==n&&i.call(S,o)&&(b=S);var A=w.prototype=y.prototype=Object.create(b);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(r,a,o,s){var l=d(t[r],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==et(h)&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(h).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,s)}))}s(l.arg)}var a;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,r){n(t,i,e,r)}))}return a=a?a.then(r,r):r()}})}function I(e,n,i){var r=u;return function(a,o){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===a)throw o;return{value:t,done:!0}}for(i.method=a,i.arg=o;;){var s=i.delegate;if(s){var l=E(s,i);if(l){if(l===f)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===u)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=d(e,n,i);if("normal"===c.type){if(r=i.done?g:p,c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=g,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),f;var a=d(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(et(e)+" is not iterable")}return v.prototype=w,r(A,"constructor",{value:w,configurable:!0}),r(w,"constructor",{value:v,configurable:!0}),v.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},C(k.prototype),c(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new k(h(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(A),c(A,l,"Generator"),c(A,o,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=P,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:P(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),f}},e}function it(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function rt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){it(a,i,r,o,s,"next",t)}function s(t){it(a,i,r,o,s,"throw",t)}o(void 0)}))}}function at(t){if(!t)throw new Error("File is required.");if("undefined"!=typeof Blob&&t instanceof Blob)return t;if(null!=t.data&&t.name){var e=t.data instanceof Uint8Array?t.data:Buffer.from(t.data);return new Blob([e],{type:t.type||t.mimetype||"application/octet-stream"})}throw new Error("Invalid file input. Provide a File/Blob in the browser or { data, name, type } in Node.js.")}function ot(t){return st.apply(this,arguments)}function st(){return(st=rt(nt().mark((function t(e){var n;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("function"!=typeof(n=at(e)).arrayBuffer){t.next=3;break}return t.abrupt("return",n.arrayBuffer());case 3:throw new Error("Unable to read file buffer.");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function lt(t){return ct.apply(this,arguments)}function ct(){return(ct=rt(nt().mark((function t(e){var n,i,r;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new TextEncoder,i=n.encode(e),t.next=4,crypto.subtle.digest("SHA-256",i);case 4:return r=t.sent,t.abrupt("return",new Uint8Array(r));case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ht(t){return dt.apply(this,arguments)}function dt(){return(dt=rt(nt().mark((function t(e){var n,i,r;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,ot(e);case 2:return n=t.sent,t.next=5,crypto.subtle.digest("SHA-256",n);case 5:return i=t.sent,r=Array.from(new Uint8Array(i)),t.abrupt("return","sha256-".concat((o=r,"undefined"!=typeof btoa?btoa(String.fromCharCode.apply(String,function(t){if(Array.isArray(t))return q(t)}(a=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(a)||function(t,e){if(t){if("string"==typeof t)return q(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(t,e):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):Buffer.from(o).toString("base64"))));case 8:case"end":return t.stop()}var a,o}),t)})))).apply(this,arguments)}function ut(t,e){return pt.apply(this,arguments)}function pt(){return(pt=rt(nt().mark((function t(e,n){var i,r,a,o,s;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=at(e),r=new FormData,$()&&"undefined"!=typeof File&&e instanceof File?r.append("file",e):(a=e.name||(i.type?"upload.".concat(i.type.split("/")[1]||"bin"):"upload.bin"),r.append("file",i,a)),t.next=6,fetch("https://api.pinata.cloud/pinning/pinFileToIPFS",{method:"POST",headers:{Authorization:"Bearer ".concat(n)},body:r});case 6:if((o=t.sent).ok){t.next=9;break}throw new Error("Failed to upload file to IPFS: ".concat(o.status," ").concat(o.statusText));case 9:return t.next=11,o.json();case 11:if((s=t.sent).IpfsHash){t.next=14;break}throw new Error("Pinata did not return an IPFS hash.");case 14:return t.abrupt("return",s.IpfsHash);case 15:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mt(t,e){return gt.apply(this,arguments)}function gt(){return(gt=rt(nt().mark((function t(e,n){var i,r;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,fetch("https://api.pinata.cloud/pinning/pinJSONToIPFS",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(n)},body:JSON.stringify(e)});case 3:if((i=t.sent).ok){t.next=6;break}throw new Error("Failed to upload JSON to IPFS: ".concat(i.status," ").concat(i.statusText));case 6:return t.next=8,i.json();case 8:if((r=t.sent).IpfsHash){t.next=11;break}throw new Error("Pinata did not return an IPFS hash for metadata.");case 11:return t.abrupt("return",r.IpfsHash);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ft(t,e){return yt.apply(this,arguments)}function yt(){return(yt=rt(nt().mark((function t(e,n){var i;return nt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch("https://api.pinata.cloud/pinning/unpin/".concat(e),{method:"DELETE",headers:{Authorization:"Bearer ".concat(n)}});case 3:if((i=t.sent).ok){t.next=6;break}throw new Error("Failed to delete from IPFS: ".concat(i.statusText));case 6:return t.abrupt("return",!0);case 9:throw t.prev=9,t.t0=t.catch(0),console.error("Error deleting from IPFS:",t.t0),t.t0;case 13:case"end":return t.stop()}}),t,null,[[0,9]])})))).apply(this,arguments)}function vt(t){return Math.round(1e6*t)}function wt(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||"ipfs.io";return t.replace("ipfs://","https://".concat(e,"/ipfs/"))}function bt(e,n){var i=(new TextEncoder).encode("listing_"),r=(new TextEncoder).encode(e),a=(new TextEncoder).encode("_"),o=t.Ay$.encodeUint64(BigInt(n)),s=i.length+2+r.length+2+a.length+o.length,l=new Uint8Array(s),c=0,h=new DataView(l.buffer);return l.set(i,c),c+=i.length,h.setUint16(c,r.length,!1),c+=2,l.set(r,c),c+=r.length,h.setUint16(c,a.length,!1),c+=2,l.set(a,c),c+=a.length,l.set(o,c),l}function xt(t,e,n){return{appIndex:t,name:bt(e,n)}}function St(e){try{var n="string"==typeof e?Uint8Array.from(atob(e),(function(t){return t.charCodeAt(0)})):e,i=0;if("listing_"!==(new TextDecoder).decode(n.slice(0,8)))return null;i+=8;var r=new DataView(n.buffer,n.byteOffset,n.byteLength),a=r.getUint16(i,!1);i+=2;var o=(new TextDecoder).decode(n.slice(i,i+a));i+=a;var s=r.getUint16(i,!1);i+=2;var l=(new TextDecoder).decode(n.slice(i,i+s));if(i+=s,"_"!==l)return null;var c=Number(t.Ay$.decodeUint64(n.slice(i,i+8),"safe"));return{marketplace:o,assetId:String(c)}}catch(t){return console.warn("Failed to decode listing box name",t),null}}function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function kt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ct(Object(n),!0).forEach((function(e){It(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function It(t,e,n){return(e=Bt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Et(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=_t(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function _t(t,e){if(t){if("string"==typeof t)return Mt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(t,e):void 0}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Dt(){Dt=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var a=e&&e.prototype instanceof y?e:y,o=Object.create(a.prototype),s=new D(i||[]);return r(o,"_invoke",{value:I(t,n,s)}),o}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var u="suspendedStart",p="suspendedYield",m="executing",g="completed",f={};function y(){}function v(){}function w(){}var b={};c(b,o,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(P([])));S&&S!==n&&i.call(S,o)&&(b=S);var A=w.prototype=y.prototype=Object.create(b);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(r,a,o,s){var l=d(t[r],t,a);if("throw"!==l.type){var c=l.arg,h=c.value;return h&&"object"==At(h)&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(h).then((function(t){c.value=t,o(c)}),(function(t){return n("throw",t,o,s)}))}s(l.arg)}var a;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,r){n(t,i,e,r)}))}return a=a?a.then(r,r):r()}})}function I(e,n,i){var r=u;return function(a,o){if(r===m)throw Error("Generator is already running");if(r===g){if("throw"===a)throw o;return{value:t,done:!0}}for(i.method=a,i.arg=o;;){var s=i.delegate;if(s){var l=E(s,i);if(l){if(l===f)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===u)throw r=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=m;var c=d(e,n,i);if("normal"===c.type){if(r=i.done?g:p,c.arg===f)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=g,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,r=e.iterator[i];if(r===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),f;var a=d(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var o=a.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function M(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e||""===e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(At(e)+" is not iterable")}return v.prototype=w,r(A,"constructor",{value:w,configurable:!0}),r(w,"constructor",{value:v,configurable:!0}),v.displayName=c(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,c(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},C(k.prototype),c(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new k(h(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(A),c(A,l,"Generator"),c(A,o,(function(){return this})),c(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=P,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(i,r){return s.type="throw",s.arg=e,n.next=i,r&&(n.method="next",n.arg=t),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),M(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;M(n)}return r}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:P(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),f}},e}function Pt(t,e,n,i,r,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,r)}function Tt(t){return function(){var e=this,n=arguments;return new Promise((function(i,r){var a=t.apply(e,n);function o(t){Pt(a,i,r,o,s,"next",t)}function s(t){Pt(a,i,r,o,s,"throw",t)}o(void 0)}))}}function Lt(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Bt(i.key),i)}}function Bt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}function Ft(t,e,n){Rt(t,e),e.set(t,n)}function Rt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Nt(t,e){return t.get(zt(t,e))}function Vt(t,e,n){return t.set(zt(t,e),n),n}function zt(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Gt=__webpack_require__(9698),Wt=new t.Ay$.ABIContract({name:Gt.contract.name,methods:Gt.contract.methods}),Ot=new WeakMap,Zt=new WeakMap,Yt=new WeakMap,Ht=new WeakMap,jt=new WeakMap,Xt=new WeakMap,Ut=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,qt=new WeakMap,$t=new WeakMap,Qt=new WeakMap,te=new WeakMap,ee=new WeakMap,ne=new WeakMap,ie=new WeakMap,re=new WeakMap,ae=new WeakMap,oe=new WeakMap,se=new WeakMap,le=new WeakMap,ce=new WeakMap,he=new WeakMap,de=new WeakMap,ue=new WeakMap,pe=new WeakMap,me=new WeakMap,ge=new WeakMap,fe=new WeakMap,ye=new WeakMap,ve=new WeakMap,we=new WeakMap,be=new WeakMap,xe=new WeakMap,Se=new WeakMap,Ae=new WeakMap,Ce=new WeakMap,ke=new WeakSet;function Ie(t){var e=tt();e.removeItem("walletconnect"),e.removeItem("DeflyWallet.Wallet"),e.removeItem("PeraWallet.Wallet"),!Nt(Jt,this)&&$()?(alert(t),window.location.reload()):console.error("SDK validation failed:",t)}function Ee(){return _e.apply(this,arguments)}function _e(){return(_e=Tt(Dt().mark((function t(){var e,n,i,r;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if($()){t.next=2;break}return t.abrupt("return",null);case 2:if(Nt(Ot,this)){t.next=10;break}return t.next=5,Promise.all([Promise.resolve().then(__webpack_require__.bind(__webpack_require__,1899)),Promise.resolve().then(__webpack_require__.bind(__webpack_require__,2042))]);case 5:e=t.sent,o=2,n=function(t){if(Array.isArray(t))return t}(a=e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=a.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(a,o)||_t(a,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0].PeraWalletConnect,r=n[1].DeflyWalletConnect,Vt(Ot,this,{pera:new i,defly:new r});case 10:return t.abrupt("return",Nt(Ot,this));case 11:case"end":return t.stop()}var a,o}),t,this)})))).apply(this,arguments)}function Me(t){return De.apply(this,arguments)}function De(){return(De=Tt(Dt().mark((function t(e){var n,i,r=this;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Nt(ne,this)){t.next=2;break}return t.abrupt("return",e.map((function(t){return t.signTxn(Nt(ne,r).sk)})));case 2:if(Nt(Xt,this)){t.next=4;break}throw new Error("No signing method available. Connect with connectWallet(address, mnemonic) or a browser wallet.");case 4:return t.next=6,zt(ke,this,Ee).call(this);case 6:if(null!=(n=t.sent)&&n[Nt(Xt,this)]){t.next=9;break}throw new Error("Browser wallet signing is unavailable in this environment.");case 9:return t.next=11,n[Nt(Xt,this)].signTransaction([e.map((function(t){return{txn:t,signers:[r.account]}}))]);case 11:return i=t.sent,t.abrupt("return",i);case 13:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Pe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"perform this action";if(!Nt(Zt,this)||!this.account)throw!Nt(Jt,this)&&this.isMinimized&&this.maximizeSDK(!0),new Error("Wallet is not connected. Connect a wallet to ".concat(t,"."))}function Te(t){return(null==t?void 0:t.type)||(null==t?void 0:t.mimetype)||"application/octet-stream"}function Le(){return Be.apply(this,arguments)}function Be(){return(Be=Tt(Dt().mark((function t(){var e=this;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return Nt(ie,this).initUI({onWalletConnect:function(t){return zt(ke,e,Ne).call(e,t)},onMinimize:function(){return e.minimizeSDK()},onMaximize:function(){return e.maximizeSDK()},onLogout:function(){return zt(ke,e,ze).call(e)},onThemeToggle:function(){e.theme="light"===e.theme?"dark":"light",Nt(ie,e).saveUIState(),Nt(ie,e).applyTheme(),n.emit("theme:changed",{theme:e.theme})},onResetNFT:function(){return Nt(ie,e).resetNFTDetails()},onMintNFT:function(){return zt(ke,e,Oe).call(e)},onResetFT:function(){return Nt(ie,e).resetFTDetails()},onMintFT:function(){return zt(ke,e,Ue).call(e)}}),Nt(ie,this).setupNFTInputValidation({getSupportedMediaFormats:function(){return Nt(Ce,e)},sanitizeInput:function(t){return l.sanitizeInput(t)},validateFileType:function(t){return l.validateFileType(t,Nt(Ce,e))}}),Nt(ie,this).setupFTInputValidation({sanitizeInput:function(t){return l.sanitizeInput(t)},validateFileType:function(t){return l.validateFileType(t,["IMAGE"])}}),t.next=5,zt(ke,this,Fe).call(this);case 5:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function Fe(){return Re.apply(this,arguments)}function Re(){return(Re=Tt(Dt().mark((function t(){var e,i,r,a,o,s,l,c;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if($()){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,(e=tt()).getItem("walletconnect"),i=e.getItem("PeraWallet.Wallet"),r=e.getItem("DeflyWallet.Wallet"),a=null,o=null,t.next=11,zt(ke,this,Ee).call(this);case 11:if(s=t.sent){t.next=14;break}return t.abrupt("return");case 14:if(!i){t.next=25;break}return t.prev=15,t.next=18,s.pera.reconnectSession();case 18:(l=t.sent)&&l.length>0&&(a="pera",o=l),t.next=25;break;case 22:t.prev=22,t.t0=t.catch(15),console.log("Failed to reconnect to Pera wallet:",t.t0.message);case 25:if(o||!r){t.next=36;break}return t.prev=26,t.next=29,s.defly.reconnectSession();case 29:(c=t.sent)&&c.length>0&&(a="defly",o=c),t.next=36;break;case 33:t.prev=33,t.t1=t.catch(26),console.log("Failed to reconnect to Defly wallet:",t.t1.message);case 36:o&&o.length>0&&a?(Vt(Zt,this,!0),this.account=o[0],Vt(Xt,this,a),Vt(Yt,this,{address:this.account,walletType:a}),Nt(ie,this).showToast("Restored connection to ".concat(a," wallet"),"success"),Nt(Jt,this)||Nt(ie,this).showSDKUI(),n.emit("wallet:connection:connected",{address:this.account})):Nt(Jt,this)||zt(ke,this,We).call(this),t.next=45;break;case 39:t.prev=39,t.t2=t.catch(2),console.error("Failed to restore connection",t.t2),Nt(ie,this).showToast("Failed to restore connection!","error"),n.emit("wallet:connection:failed",{error:"Failed to restore connection"}),Nt(Jt,this)||zt(ke,this,We).call(this);case 45:case"end":return t.stop()}}),t,this,[[2,39],[15,22],[26,33]])})))).apply(this,arguments)}function Ne(t){return Ve.apply(this,arguments)}function Ve(){return(Ve=Tt(Dt().mark((function t(e){var i,r,a,o,s,l;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Nt(Ht,this)){t.next=3;break}return Nt(ie,this).showToast("A wallet connection is already in progress.","warning"),t.abrupt("return");case 3:if(Nt(jt,this).includes(e)){t.next=6;break}return Nt(ie,this).showToast("Unsupported wallet selected.","error"),t.abrupt("return");case 6:if(Nt(ie,this).clearMessage(),Vt(Xt,this,e),!Nt(Jt,this)&&$()){t.next=10;break}throw new Error("Browser wallet connection requires UI. Use connectWallet(address, mnemonic) in headless mode.");case 10:return document.getElementById("algox-sdk-container").style.display="none",t.next=13,zt(ke,this,Ee).call(this);case 13:return i=t.sent,r=i[e],Vt(Ht,this,!0),t.prev=16,a=r.connect(),o=new Promise((function(t,e){return setTimeout((function(){return e(new Error("Wallet connection timed out."))}),3e4)})),t.next=21,Promise.race([a,o]);case 21:if((s=t.sent)&&0!==s.length){t.next=24;break}throw new Error("Wallet connection declined or no account returned.");case 24:Vt(Zt,this,!0),this.account=s[0],Vt(Yt,this,{address:this.account,walletType:e}),Nt(Jt,this)||Nt(ie,this).showSDKUI(),Nt(ie,this).showToast("Connected to ".concat(e," wallet"),"success"),n.emit("wallet:connection:connected",{address:this.account}),Vt(Ht,this,!1),t.next=70;break;case 33:if(t.prev=33,t.t0=t.catch(16),"Wallet connection timed out."!==t.t0.message){t.next=44;break}return t.next=38,r.disconnect();case 38:if(!r.killSession){t.next=41;break}return t.next=41,r.killSession();case 41:Nt(Jt,this)?console.error("UI is disabled, skipping wallet connection UI"):window.location.reload(),t.next=70;break;case 44:if(console.error("Failed to connect wallet!",t.t0),Vt(Ht,this,!1),!t.t0.message||!t.t0.message.includes("Session currently connected")){t.next=66;break}return t.prev=47,t.next=50,r.reconnectSession();case 50:if(!((l=t.sent)&&l.length>0)){t.next=61;break}return Vt(Zt,this,!0),this.account=l[0],Vt(Xt,this,e),Vt(Yt,this,{address:this.account,walletType:e}),Nt(Jt,this)?console.error("UI is disabled, skipping wallet connection UI"):(Nt(ie,this).showSDKUI(),Nt(ie,this).updateWalletAddressBar()),Nt(ie,this).showToast("Connected to existing ".concat(e," session"),"success"),n.emit("wallet:connection:connected",{address:this.account}),Vt(Ht,this,!1),t.abrupt("return");case 61:t.next=66;break;case 63:t.prev=63,t.t1=t.catch(47),console.error("Failed to reconnect to existing session:",t.t1);case 66:Nt(ie,this).showToast("Failed to connect wallet!","error"),n.emit("wallet:connection:failed",{error:"Failed to connect wallet!"}),Vt(Ht,this,!1),Nt(Jt,this)?console.error("UI is disabled, skipping wallet connection UI"):(document.getElementById("algox-sdk-container").style.display="flex",zt(ke,this,We).call(this));case 70:case"end":return t.stop()}}),t,this,[[16,33],[47,63]])})))).apply(this,arguments)}function ze(){return Ge.apply(this,arguments)}function Ge(){return Ge=Tt(Dt().mark((function t(){var e,i,r,a,o=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=o.length>0&&void 0!==o[0]&&o[0],!this.processing){t.next=3;break}return t.abrupt("return");case 3:if(e||Nt(Jt,this)||!$()||"undefined"==typeof confirm){t.next=6;break}if(confirm("Are you sure you want to logout?")){t.next=6;break}return t.abrupt("return");case 6:if(t.prev=6,!Nt(Xt,this)||"mnemonic"===Nt(Xt,this)){t.next=18;break}return t.next=10,zt(ke,this,Ee).call(this);case 10:if(i=t.sent,!(r=null==i?void 0:i[Nt(Xt,this)])){t.next=18;break}return t.next=15,r.disconnect();case 15:if(!r.killSession){t.next=18;break}return t.next=18,r.killSession();case 18:(a=tt()).removeItem("walletconnect"),a.removeItem("DeflyWallet.Wallet"),a.removeItem("PeraWallet.Wallet"),t.next=27;break;case 24:t.prev=24,t.t0=t.catch(6),console.error("Failed to disconnect wallet session:",t.t0);case 27:Vt(ne,this,null),n.emit("wallet:connection:disconnected",{address:this.account}),Nt(ie,this).showToast("Logged out successfully.","success"),Nt(Jt,this)?(Vt(Zt,this,!1),this.account=null,Vt(Yt,this,null),Vt(Xt,this,null)):zt(ke,this,We).call(this);case 31:case"end":return t.stop()}}),t,this,[[6,24]])}))),Ge.apply(this,arguments)}function We(){Vt(Zt,this,!1),this.account=null,Vt(Yt,this,null),Vt(Xt,this,null),Nt(ie,this).resetToLoginUI()}function Oe(){return Ze.apply(this,arguments)}function Ze(){return(Ze=Tt(Dt().mark((function t(){var e,i,r,a,o,s,c,h,d;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.processing){t.next=2;break}return t.abrupt("return");case 2:if(e=l.sanitizeInput(document.getElementById("algox-mintx-nft-name").value),i=l.sanitizeInput(document.getElementById("algox-mintx-nft-description").value),r=document.getElementById("algox-mintx-nft-file"),(a=l.validateNFTName(e)).valid){t.next=9;break}return Nt(ie,this).showToast(a.message,"error"),t.abrupt("return");case 9:if((o=l.validateNFTDescription(i)).valid){t.next=13;break}return Nt(ie,this).showToast(o.message,"error"),t.abrupt("return");case 13:if(r.files.length){t.next=16;break}return Nt(ie,this).showToast("Please upload a file.","error"),t.abrupt("return");case 16:return Nt(Jt,this)||(Nt(ie,this).updateMessage("Minting NFT... Please wait.","default"),Nt(ie,this).disableMintButton()),this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),t.prev=20,t.next=23,zt(ke,this,Ye).call(this,{name:e,description:i,file:r.files[0]});case 23:return s=t.sent,c=s.transactionId,h=s.assetId,Nt(Jt,this)||Nt(ie,this).updateMessage("NFT Minted! Transaction ID: ".concat(c),"pointer"),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),Nt(ie,this).showToast("NFT Minted Successfully! TxID: ".concat(c),"success"),Nt(Jt,this)||(Nt(ie,this).showResetButton(),Nt(ie,this).enableMintButton()),t.next=34,this.getNFTMetadata({assetId:h});case 34:d=t.sent,n.emit("nft:mint:success",{transactionId:c,nft:d}),t.next=46;break;case 38:t.prev=38,t.t0=t.catch(20),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),Nt(Jt,this)||Nt(ie,this).resetNFTDetails(),Nt(ie,this).showToast("Failed to mint NFT!","error"),n.emit("nft:mint:failed",{error:"Failed to mint NFT!"});case 46:case"end":return t.stop()}}),t,this,[[20,38]])})))).apply(this,arguments)}function Ye(t){return He.apply(this,arguments)}function He(){return(He=Tt(Dt().mark((function t(e){var n,i,r,a,o,s,l,c,h,d,u,p,m;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.name,i=e.description,r=e.file,Nt(Zt,this)&&this.account){t.next=3;break}throw new Error("Wallet is not connected.");case 3:return a=null,o=null,s=0,t.prev=6,s=1,Nt(ie,this).updateLoadingMessage("Processing... Step 1: Uploading file to IPFS"),t.next=11,ut(r,Nt(ye,this));case 11:return a=t.sent,s=2,Nt(ie,this).updateLoadingMessage("Processing... Step 2: Creating metadata"),t.next=16,ht(r);case 16:return l=t.sent,c={name:n,description:i,image:"ipfs://".concat(a),image_integrity:l,image_mimetype:zt(ke,this,Te).call(this,r),decimals:0,standard:"arc3",minted_by:Nt(fe,this),marketplace:Nt(ge,this)},s=3,Nt(ie,this).updateLoadingMessage("Processing... Step 3: Hashing metadata"),h=JSON.stringify(c),t.next=23,lt(h);case 23:return d=t.sent,s=4,Nt(ie,this).updateLoadingMessage("Processing... Step 4: Uploading metadata to IPFS"),t.next=28,mt(c,Nt(ye,this));case 28:return o=t.sent,s=5,Nt(ie,this).updateLoadingMessage("Processing... Open your wallet to continue"),t.next=33,zt(ke,this,je).call(this,{metadataIpfsHash:o,assetName:n,metadataHashBuffer:d,total:1,decimals:0});case 33:return u=t.sent,p=u.txid,m=u.assetId,t.abrupt("return",{transactionId:p,assetId:m});case 39:if(t.prev=39,t.t0=t.catch(6),t.prev=41,!(s>=4)){t.next=51;break}if(!o){t.next=46;break}return t.next=46,ft(o,Nt(ye,this));case 46:if(!a){t.next=49;break}return t.next=49,ft(a,Nt(ye,this));case 49:t.next=55;break;case 51:if(!(s>=1)){t.next=55;break}if(!a){t.next=55;break}return t.next=55,ft(a,Nt(ye,this));case 55:t.next=60;break;case 57:t.prev=57,t.t1=t.catch(41),console.error("Failed to cleanup IPFS files:",t.t1);case 60:throw t.t0;case 61:case"end":return t.stop()}}),t,this,[[6,39],[41,57]])})))).apply(this,arguments)}function je(t){return Xe.apply(this,arguments)}function Xe(){return(Xe=Tt(Dt().mark((function e(n){var i,r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.metadataIpfsHash,r=n.assetName,a=n.metadataHashBuffer,o=n.total,s=void 0===o?1:o,l=n.decimals,c=void 0===l?0:l,e.next=3,Nt(Ut,this).getTransactionParams().do();case 3:return h=e.sent,d="ipfs://".concat(i,"#arc3"),u=r&&"string"==typeof r&&r.length>0?r.substring(0,32).replace(/[^a-zA-Z0-9 _-]/g,""):"Unnamed Asset",p=t.Ay$.makeAssetCreateTxnWithSuggestedParamsFromObject({sender:this.account,total:BigInt(s),decimals:c,defaultFrozen:!1,unitName:Nt(ge,this),assetName:u,assetURL:d,assetMetadataHash:a,suggestedParams:h}),m=[p],Nt(Ae,this)>0&&(g=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(we,this),amount:vt(Nt(Ae,this)),suggestedParams:h}),m.push(g)),m.length>1&&t.Ay$.assignGroupID(m),e.next=12,zt(ke,this,Me).call(this,m);case 12:return f=e.sent,e.next=15,Nt(Ut,this).sendRawTransaction(f).do();case 15:return y=e.sent,v=y.txid,e.next=19,t.Ay$.waitForConfirmation(Nt(Ut,this),v,10);case 19:return w=e.sent,b=Number(w.assetIndex),e.abrupt("return",{txid:v,assetId:b});case 22:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function Ue(){return Ke.apply(this,arguments)}function Ke(){return(Ke=Tt(Dt().mark((function t(){var e,i,r,a,o,s,c,h,d,u,p,m,g;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.processing){t.next=2;break}return t.abrupt("return");case 2:if(e=l.sanitizeInput(document.getElementById("algox-mintx-ft-name").value),i=l.sanitizeInput(document.getElementById("algox-mintx-ft-description").value),r=document.getElementById("algox-mintx-ft-decimals").value,a=document.getElementById("algox-mintx-ft-supply").value,o=document.getElementById("algox-mintx-ft-file"),(s=l.validateFTName(e)).valid){t.next=11;break}return Nt(ie,this).showToast(s.message,"error"),t.abrupt("return");case 11:if((c=l.validateFTDescription(i)).valid){t.next=15;break}return Nt(ie,this).showToast(c.message,"error"),t.abrupt("return");case 15:if((h=l.validateFTDecimals(r)).valid){t.next=19;break}return Nt(ie,this).showToast(h.message,"error"),t.abrupt("return");case 19:if((d=l.validateFTTotalSupply(a)).valid){t.next=23;break}return Nt(ie,this).showToast(d.message,"error"),t.abrupt("return");case 23:return Nt(Jt,this)||(Nt(ie,this).updateFTMessage("Minting FT... Please wait.","default"),Nt(ie,this).disableFTMintButton()),this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),t.prev=27,t.next=30,zt(ke,this,Je).call(this,{name:e,description:i,decimals:Number(r),totalSupply:Number(a),file:o.files.length?o.files[0]:null});case 30:return u=t.sent,p=u.transactionId,m=u.assetId,Nt(Jt,this)||Nt(ie,this).updateFTMessage("FT Minted! Transaction ID: ".concat(p),"pointer"),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),Nt(ie,this).showToast("FT Minted Successfully! TxID: ".concat(p),"success"),Nt(Jt,this)||(Nt(ie,this).showFTResetButton(),Nt(ie,this).enableFTMintButton()),t.next=41,this.getFTMetadata({assetId:m});case 41:g=t.sent,n.emit("ft:mint:success",{transactionId:p,ft:g}),t.next=53;break;case 45:t.prev=45,t.t0=t.catch(27),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),Nt(Jt,this)||Nt(ie,this).resetFTDetails(),Nt(ie,this).showToast("Failed to mint FT!","error"),n.emit("ft:mint:failed",{error:"Failed to mint FT!"});case 53:case"end":return t.stop()}}),t,this,[[27,45]])})))).apply(this,arguments)}function Je(t){return qe.apply(this,arguments)}function qe(){return(qe=Tt(Dt().mark((function t(e){var n,i,r,a,o,s,l,c,h,d,u,p,m,g,f;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.name,i=e.description,r=e.decimals,a=e.totalSupply,o=e.file,Nt(Zt,this)&&this.account){t.next=3;break}throw new Error("Wallet is not connected.");case 3:if(s=null,l=null,c=0,t.prev=6,h={name:n,description:i,decimals:r,standard:"arc3",minted_by:Nt(fe,this),marketplace:Nt(ge,this)},!o){t.next=20;break}return c=1,Nt(ie,this).updateLoadingMessage("Processing... Step 1: Uploading icon to IPFS"),t.next=13,ut(o,Nt(ye,this));case 13:return s=t.sent,t.next=16,ht(o);case 16:d=t.sent,h.image="ipfs://".concat(s),h.image_integrity=d,h.image_mimetype=o.type;case 20:return c=2,Nt(ie,this).updateLoadingMessage("Processing... Step 2: Creating metadata"),c=3,Nt(ie,this).updateLoadingMessage("Processing... Step 3: Hashing metadata"),u=JSON.stringify(h),t.next=27,lt(u);case 27:return p=t.sent,c=4,Nt(ie,this).updateLoadingMessage("Processing... Step 4: Uploading metadata to IPFS"),t.next=32,mt(h,Nt(ye,this));case 32:return l=t.sent,c=5,Nt(ie,this).updateLoadingMessage("Processing... Open your wallet to continue"),t.next=37,zt(ke,this,je).call(this,{metadataIpfsHash:l,assetName:n,metadataHashBuffer:p,total:a,decimals:r});case 37:return m=t.sent,g=m.txid,f=m.assetId,t.abrupt("return",{transactionId:g,assetId:f});case 43:if(t.prev=43,t.t0=t.catch(6),t.prev=45,!(c>=4)){t.next=55;break}if(!l){t.next=50;break}return t.next=50,ft(l,Nt(ye,this));case 50:if(!s){t.next=53;break}return t.next=53,ft(s,Nt(ye,this));case 53:t.next=59;break;case 55:if(!(c>=1)){t.next=59;break}if(!s){t.next=59;break}return t.next=59,ft(s,Nt(ye,this));case 59:t.next=64;break;case 61:t.prev=61,t.t1=t.catch(45),console.error("Failed to cleanup IPFS files:",t.t1);case 64:throw t.t0;case 65:case"end":return t.stop()}}),t,this,[[6,43],[45,61]])})))).apply(this,arguments)}function $e(){return Qe.apply(this,arguments)}function Qe(){return(Qe=Tt(Dt().mark((function t(){var e,n,i;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e="".concat(Nt(ae,this),"/v2/applications/").concat(Nt(de,this),"/boxes"),t.next=3,fetch(e);case 3:if((n=t.sent).ok){t.next=6;break}throw new Error("Failed to fetch application boxes: ".concat(n.status));case 6:return t.next=8,n.json();case 8:return i=t.sent,t.abrupt("return",i.boxes||[]);case 10:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function tn(t,e){return en.apply(this,arguments)}function en(){return(en=Tt(Dt().mark((function t(e,n){var i,r;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=bt(e,n),t.next=3,Nt(Ut,this).getApplicationBoxByName(Nt(de,this),i).do();case 3:return r=t.sent,t.abrupt("return",(a=r.value,o=void 0,s=void 0,l=void 0,c=void 0,h=void 0,d=void 0,u=void 0,p=void 0,s=new DataView(a.buffer,a.byteOffset,a.byteLength),l=(new TextDecoder).decode(a.slice(8,66)),c=68+s.getUint16(66,!1),h=(new TextDecoder).decode(a.slice(68,c)),o=Number(h),d=Number(o/1e6),p=(u=c+2)+s.getUint16(c,!1),{seller:l,price:d,marketplace:(new TextDecoder).decode(a.slice(u,p))}));case 5:case"end":return t.stop()}var a,o,s,l,c,h,d,u,p}),t,this)})))).apply(this,arguments)}function nn(){return rn.apply(this,arguments)}function rn(){return rn=Tt(Dt().mark((function t(){var e,n,i,r,a,o,s=this,l=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=l.length>0&&void 0!==l[0]&&l[0],n=Date.now(),!(!e&&Nt(oe,this)&&n-Nt(se,this)<3e4)){t.next=4;break}return t.abrupt("return",Nt(oe,this));case 4:return i=[],t.prev=5,t.next=8,zt(ke,this,$e).call(this);case 8:return r=t.sent,a=r.map((function(t){return St(t.name)})).filter(Boolean),t.next=12,Promise.all(a.map(function(){var t=Tt(Dt().mark((function t(e){var n,i,r;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.marketplace,i=e.assetId,t.prev=1,t.next=4,zt(ke,s,tn).call(s,n,i);case 4:return r=t.sent,t.abrupt("return",{assetId:i,seller:r.seller,price:r.price,marketplace:n});case 8:return t.prev=8,t.t0=t.catch(1),console.warn("Failed to decode listing box:",t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()));case 12:o=t.sent.filter(Boolean),i.push.apply(i,function(t){if(Array.isArray(t))return Mt(t)}(c=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(c)||_t(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),t.next=20;break;case 16:throw t.prev=16,t.t0=t.catch(5),console.error("Error fetching all listings:",t.t0.message),t.t0;case 20:return Vt(oe,this,i),Vt(se,this,n),t.abrupt("return",i);case 23:case"end":return t.stop()}var c}),t,this,[[5,16]])}))),rn.apply(this,arguments)}function an(t){return on.apply(this,arguments)}function on(){return on=Tt(Dt().mark((function t(e){var n,i,r,a,o,s=this,l=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=l.length>1&&void 0!==l[1]&&l[1],i=Date.now(),!(!n&&Nt(le,this)&&Nt(he,this)===e&&i-Nt(ce,this)<3e4)){t.next=4;break}return t.abrupt("return",Nt(le,this));case 4:return t.next=6,zt(ke,this,$e).call(this);case 6:return r=t.sent,a=r.map((function(t){return St(t.name)})).filter((function(t){return t&&t.marketplace===e})),t.next=10,Promise.all(a.map(function(){var t=Tt(Dt().mark((function t(n){var i,r;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=n.assetId,t.prev=1,t.next=4,zt(ke,s,tn).call(s,e,i);case 4:return r=t.sent,t.abrupt("return",{assetId:i,seller:r.seller,price:r.price,marketplace:e});case 8:return t.prev=8,t.t0=t.catch(1),console.warn("Failed to decode listing box:",t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}}),t,null,[[1,8]])})));return function(e){return t.apply(this,arguments)}}()));case 10:return o=t.sent.filter(Boolean),Vt(le,this,o),Vt(ce,this,i),Vt(he,this,e),t.abrupt("return",o);case 15:case"end":return t.stop()}}),t,this)}))),on.apply(this,arguments)}function sn(t){return ln.apply(this,arguments)}function ln(){return ln=Tt(Dt().mark((function t(e){var n,i,r=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.length>1&&void 0!==r[1]?r[1]:Nt(ge,this),t.prev=1,t.next=4,zt(ke,this,tn).call(this,n,e);case 4:return i=t.sent,t.abrupt("return",{assetId:String(e),seller:i.seller,price:i.price,marketplace:n});case 8:return t.prev=8,t.t0=t.catch(1),t.abrupt("return",null);case 11:case"end":return t.stop()}}),t,this,[[1,8]])}))),ln.apply(this,arguments)}function cn(t){return hn.apply(this,arguments)}function hn(){return(hn=Tt(Dt().mark((function t(e){var n,i,r,a,o,s;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,zt(ke,this,$e).call(this);case 2:n=t.sent,i=Et(n),t.prev=4,i.s();case 6:if((r=i.n()).done){t.next=23;break}if(a=r.value,(o=St(a.name))&&o.assetId===String(e)){t.next=11;break}return t.abrupt("continue",21);case 11:return t.prev=11,t.next=14,zt(ke,this,tn).call(this,o.marketplace,e);case 14:return s=t.sent,t.abrupt("return",{assetId:String(e),seller:s.seller,price:s.price,marketplace:o.marketplace});case 18:t.prev=18,t.t0=t.catch(11),console.warn("Failed to read listing box value:",t.t0);case 21:t.next=6;break;case 23:t.next=28;break;case 25:t.prev=25,t.t1=t.catch(4),i.e(t.t1);case 28:return t.prev=28,i.f(),t.finish(28);case 31:return t.abrupt("return",null);case 32:case"end":return t.stop()}}),t,this,[[4,25,28,31],[11,18]])})))).apply(this,arguments)}function dn(t){return un.apply(this,arguments)}function un(){return(un=Tt(Dt().mark((function t(e){var n,i,r,a,o,s,l,c,h,d,u,p,m;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.assetId,i=e.seller,r=e.price,a=e.marketplace,o="".concat(Nt(re,this),"/v2/assets/").concat(n),t.next=4,fetch(o);case 4:if((s=t.sent).ok){t.next=7;break}return t.abrupt("return",null);case 7:return t.next=9,s.json();case 9:return l=t.sent,c=l.asset.params,h=kt(kt({},c),{},{assetId:n,listing:{seller:i,price:r,marketplace:a}}),t.next=14,zt(ke,this,yn).call(this,h,c);case 14:return d="".concat(Nt(re,this),"/v2/assets/").concat(n,"/balances?currency-greater-than=0"),t.next=17,fetch(d);case 17:if(!(u=t.sent).ok){t.next=24;break}return t.next=21,u.json();case 21:p=t.sent,(m=(p.balances||[]).find((function(t){return t.amount>0})))&&(h.currentHolder=m.address);case 24:return t.abrupt("return",h);case 25:case"end":return t.stop()}}),t,this)})))).apply(this,arguments)}function pn(t){return 1===Number(t.total)&&0===Number(t.decimals)}function mn(t){return"NFT"===Nt(me,this)?zt(ke,this,pn).call(this,t):!zt(ke,this,pn).call(this,t)}function gn(t,e){return fn.apply(this,arguments)}function fn(){return(fn=Tt(Dt().mark((function t(e,n){var i,r,a,o;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(i=n.url)&&i.startsWith("ipfs://")){t.next=3;break}return t.abrupt("return");case 3:return r=wt(i,Nt(ve,this)),t.prev=4,t.next=7,fetch(r);case 7:if((a=t.sent).ok){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,a.json();case 12:o=t.sent,(zt(ke,this,pn).call(this,n)||o.standard)&&(o.image&&o.image.startsWith("ipfs://")&&(o.image=wt(o.image,Nt(ve,this))),e.metadata=o),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(4),console.warn("IPFS metadata fetch failed for asset ".concat(e.assetId),t.t0);case 19:case"end":return t.stop()}}),t,this,[[4,16]])})))).apply(this,arguments)}function yn(t,e){return vn.apply(this,arguments)}function vn(){return(vn=Tt(Dt().mark((function t(e,n){var i,r,a,o;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(i=n.url)&&i.startsWith("ipfs://")){t.next=3;break}return t.abrupt("return");case 3:return r=wt(i,Nt(ve,this)),t.prev=4,t.next=7,fetch(r);case 7:if((a=t.sent).ok){t.next=10;break}return t.abrupt("return");case 10:return t.next=12,a.json();case 12:o=t.sent,"NFT"===Nt(me,this)?0===o.decimals&&o.image_integrity&&o.image_mimetype&&o.standard&&o.image&&o.image.startsWith("ipfs://")&&(o.image=wt(o.image,Nt(ve,this)),e.metadata=o):o.standard&&(o.image&&o.image.startsWith("ipfs://")&&(o.image=wt(o.image,Nt(ve,this))),e.metadata=o),t.next=19;break;case 16:t.prev=16,t.t0=t.catch(4),console.warn("IPFS metadata fetch failed for asset ".concat(e.assetId),t.t0);case 19:case"end":return t.stop()}}),t,this,[[4,16]])})))).apply(this,arguments)}const wn=function(){return e=function e(i){var r,a=i.env,o=i.disableUi,s=void 0!==o&&o,c=i.disableToast,h=void 0!==c&&c,d=i.toastLocation,u=void 0===d?"TOP_RIGHT":d,p=i.minimizeUILocation,m=void 0===p?"right":p,g=i.logo,f=void 0===g?null:g,y=i.namespace,v=i.pinata_ipfs_server_key,w=i.revenueWalletAddress,b=i.marketplaceType,x=void 0===b?"NFT":b,S=i.pinata_ipfs_gateway_url,A=void 0===S?null:S,C=i.listingFee,k=void 0===C?0:C,I=i.buyingFee,E=void 0===I?0:I,_=i.unListingFee,M=void 0===_?0:_,D=i.mintFee,P=void 0===D?0:D,T=i.supportedMediaFormats,L=void 0===T?["IMAGE"]:T;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Rt(this,r=ke),r.add(this),Ft(this,Ot,void 0),Ft(this,Zt,void 0),Ft(this,Yt,void 0),Ft(this,Ht,void 0),Ft(this,jt,void 0),Ft(this,Xt,void 0),Ft(this,Ut,void 0),Ft(this,Kt,void 0),Ft(this,Jt,void 0),Ft(this,qt,void 0),Ft(this,$t,void 0),Ft(this,Qt,void 0),Ft(this,te,void 0),Ft(this,ee,void 0),Ft(this,ne,void 0),Ft(this,ie,void 0),Ft(this,re,void 0),Ft(this,ae,void 0),Ft(this,oe,void 0),Ft(this,se,void 0),Ft(this,le,void 0),Ft(this,ce,void 0),Ft(this,he,void 0),Ft(this,de,void 0),Ft(this,ue,void 0),Ft(this,pe,void 0),Ft(this,me,void 0),Ft(this,ge,void 0),Ft(this,fe,void 0),Ft(this,ye,void 0),Ft(this,ve,void 0),Ft(this,we,void 0),Ft(this,be,void 0),Ft(this,xe,void 0),Ft(this,Se,void 0),Ft(this,Ae,void 0),Ft(this,Ce,void 0);try{if(this.network=l.validateEnvironment(a),Vt(Jt,this,l.validateDisableUi(s)),Vt(Kt,this,l.validateDisableToast(h)),Vt(ee,this,l.validateToastLocation(u)),Vt(qt,this,l.validateMinimizeUILocation(m)),Vt($t,this,l.validateLogo(f)),Vt(pe,this,l.validateNamespace(y)),Vt(ye,this,l.validatePinataServerKey(v)),Vt(we,this,l.validateRevenueWalletAddress(w)),Vt(me,this,l.validateMarketplaceType(x)),Vt(ve,this,l.validatePinataGatewayUrl(A)),Vt(be,this,l.validateFee(k,"Listing fee")),Vt(xe,this,l.validateFee(E,"Buying fee")),Vt(Se,this,l.validateFee(M,"unListingFee fee")),Vt(Ae,this,l.validateFee(P,"Mint fee")),Vt(Ce,this,l.validateSupportedMediaFormats(L)),Vt(ie,this,new X(this,{disableUi:Nt(Jt,this),disableToast:Nt(Kt,this),logo:Nt($t,this),minimizeUILocation:Nt(qt,this),toastLocation:Nt(ee,this),marketplaceType:Nt(me,this)})),this.processing=!1,this.events=n,Vt(Qt,this,["mainnet","testnet"]),Vt(Ot,this,null),Vt(Zt,this,!1),this.account=null,Vt(Yt,this,null),Vt(Ht,this,!1),Vt(jt,this,["pera","defly"]),Vt(Xt,this,null),Vt(Ut,this,new t.Ay$.Algodv2("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","mainnet"===this.network?"https://mainnet-api.algonode.cloud":"https://testnet-api.algonode.cloud",443)),Vt(re,this,"mainnet"===this.network?"https://mainnet-idx.algonode.cloud":"https://testnet-idx.algonode.cloud"),Vt(ae,this,"mainnet"===this.network?"https://mainnet-api.algonode.cloud":"https://testnet-api.algonode.cloud"),Vt(oe,this,null),Vt(se,this,0),Vt(le,this,null),Vt(ce,this,0),Vt(he,this,null),Vt(ge,this,"AMX".concat(Nt(pe,this))),Vt(fe,this,"AlgoMintX"),Vt(de,this,(this.network,764970022)),Vt(ue,this,(this.network,"YUS4ATNZYFNBOSN4MYP5BYPJKQNYSYRGU6PFP65ZLWXPWWBLUZYSHWJGUA")),!Nt(Jt,this)&&$()){var B=tt().getItem("axs");if(B)try{var F=JSON.parse(B);this.isMinimized=F.minimized||!1,this.theme=F.theme||Nt(ie,this).getSystemTheme()}catch(t){this.isMinimized=!1,this.theme=Nt(ie,this).getSystemTheme()}else this.isMinimized=!1,this.theme=Nt(ie,this).getSystemTheme();Nt(ie,this).saveUIState(),zt(ke,this,Le).call(this)}}catch(t){zt(ke,this,Ie).call(this,t.message)}},i=[{key:"minimizeSDK",value:function(t){Nt(ie,this).minimizeSDK(t)}},{key:"maximizeSDK",value:function(t){Nt(ie,this).maximizeSDK(t)}},{key:"connectWallet",value:(S=Tt(Dt().mark((function e(i,r){var a,o;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i&&"string"==typeof i){e.next=3;break}throw new Error("Wallet address is required");case 3:if(58===i.length){e.next=5;break}throw new Error("Wallet address must be 58 characters long");case 5:if(/^[A-Z2-7]{58}$/.test(i)){e.next=7;break}throw new Error("Invalid Algorand wallet address format");case 7:if(r&&"string"==typeof r){e.next=9;break}throw new Error("Wallet mnemonic is required");case 9:if(25===r.trim().split(/\s+/).length){e.next=12;break}throw new Error("Mnemonic must contain 25 words");case 12:if(e.prev=12,("string"==typeof(a=t.Ay$.mnemonicToSecretKey(r)).addr?a.addr:null!==(o=a.addr)&&void 0!==o&&o.publicKey?t.Ay$.encodeAddress(a.addr.publicKey):String(a.addr||""))===i){e.next=17;break}throw new Error("Mnemonic does not match the provided wallet address");case 17:e.next=22;break;case 19:throw e.prev=19,e.t0=e.catch(12),new Error(e.t0.message||"Invalid mnemonic");case 22:return Vt(ne,this,a),this.account=i,Vt(Zt,this,!0),Vt(Xt,this,"mnemonic"),Vt(Yt,this,{type:"mnemonic",address:i}),n.emit("wallet:connected",{address:i,type:"mnemonic"}),Nt(Jt,this)||Nt(ie,this).showSDKUI(),e.abrupt("return",{address:i,type:"mnemonic"});case 32:throw e.prev=32,e.t1=e.catch(0),console.error("Error connecting wallet:",e.t1.message),n.emit("wallet:connection:failed",{error:e.t1.message}),e.t1;case 37:case"end":return e.stop()}}),e,this,[[0,32],[12,19]])}))),function(t,e){return S.apply(this,arguments)})},{key:"disconnectWallet",value:(x=Tt(Dt().mark((function t(){return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Nt(Zt,this)){t.next=2;break}throw new Error("No wallet is currently connected");case 2:return t.next=4,zt(ke,this,ze).call(this,!0);case 4:case"end":return t.stop()}}),t,this)}))),function(){return x.apply(this,arguments)})},{key:"mintNFT",value:(b=Tt(Dt().mark((function t(e){var i,r,a,o,s,c,h,d,u;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.name,r=e.description,a=e.file,zt(ke,this,Pe).call(this,"mint an NFT"),"NFT"===Nt(me,this)){t.next=4;break}throw new Error("This marketplace is configured for FT assets only.");case 4:if(o=l.sanitizeInput(i),s=l.sanitizeInput(r),(c=l.validateNFTName(o)).valid){t.next=9;break}throw new Error(c.message);case 9:if((h=l.validateNFTDescription(s)).valid){t.next=12;break}throw new Error(h.message);case 12:if(a){t.next=14;break}throw new Error("Media file is required.");case 14:if((d=l.validateFileType(a,Nt(Ce,this))).valid){t.next=17;break}throw new Error(d.message);case 17:return this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),t.prev=20,t.next=23,zt(ke,this,Ye).call(this,{name:o,description:s,file:a});case 23:return u=t.sent,n.emit("nft:mint:success",u),t.abrupt("return",u);case 28:throw t.prev=28,t.t0=t.catch(20),n.emit("nft:mint:failed",{error:t.t0.message}),t.t0;case 32:return t.prev=32,this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),t.finish(32);case 37:case"end":return t.stop()}}),t,this,[[20,28,32,37]])}))),function(t){return b.apply(this,arguments)})},{key:"mintFT",value:(w=Tt(Dt().mark((function t(e){var i,r,a,o,s,c,h,d,u,p,m,g,f,y;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.name,r=e.description,a=e.decimals,o=e.totalSupply,s=e.file,c=void 0===s?null:s,zt(ke,this,Pe).call(this,"mint a fungible token"),"FT"===Nt(me,this)){t.next=4;break}throw new Error("This marketplace is configured for NFT assets only.");case 4:if(h=l.sanitizeInput(i),d=l.sanitizeInput(r),(u=l.validateFTName(h)).valid){t.next=9;break}throw new Error(u.message);case 9:if((p=l.validateFTDescription(d)).valid){t.next=12;break}throw new Error(p.message);case 12:if((m=l.validateFTDecimals(a)).valid){t.next=15;break}throw new Error(m.message);case 15:if((g=l.validateFTTotalSupply(o)).valid){t.next=18;break}throw new Error(g.message);case 18:if(!c){t.next=22;break}if((f=l.validateFileType(c,["IMAGE"])).valid){t.next=22;break}throw new Error(f.message);case 22:return this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),t.prev=25,t.next=28,zt(ke,this,Je).call(this,{name:h,description:d,decimals:Number(a),totalSupply:Number(o),file:c});case 28:return y=t.sent,n.emit("ft:mint:success",y),t.abrupt("return",y);case 33:throw t.prev=33,t.t0=t.catch(25),n.emit("ft:mint:failed",{error:t.t0.message}),t.t0;case 37:return t.prev=37,this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),t.finish(37);case 42:case"end":return t.stop()}}),t,this,[[25,33,37,42]])}))),function(t){return w.apply(this,arguments)})},{key:"getListedNFTs",value:(v=Tt(Dt().mark((function t(){var e,n,i=this;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,zt(ke,this,an).call(this,Nt(ge,this));case 3:if(0!==(e=t.sent).length){t.next=6;break}return t.abrupt("return",[]);case 6:return t.next=8,Promise.all(e.map((function(t){return zt(ke,i,dn).call(i,t)})));case 8:return n=t.sent.filter(Boolean),t.abrupt("return",n.filter((function(t){return zt(ke,i,mn).call(i,t)})));case 12:throw t.prev=12,t.t0=t.catch(0),console.error("Error fetching listed NFTS",t.t0.message),t.t0;case 16:case"end":return t.stop()}}),t,this,[[0,12]])}))),function(){return v.apply(this,arguments)})},{key:"getMarketplaces",value:(y=Tt(Dt().mark((function t(){var e,n,i,r,a,o,s,l,c,h,d=this;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,zt(ke,this,nn).call(this);case 3:e=t.sent,n={},i=Et(e),t.prev=6,i.s();case 8:if((r=i.n()).done){t.next=22;break}if(a=r.value,o=a.marketplace,s=a.assetId,l=a.price,c=a.seller,o){t.next=13;break}return t.abrupt("continue",20);case 13:n[o]||(n[o]={marketplace:o,namespace:o.startsWith("AMX")?o.slice(3):o,listingCount:0,totalListedValue:0,floorPrice:null,sellers:new Set,assetIds:[]}),(h=n[o]).listingCount+=1,h.totalListedValue+=l,h.floorPrice=null===h.floorPrice?l:Math.min(h.floorPrice,l),c&&h.sellers.add(c),h.assetIds.push(s);case 20:t.next=8;break;case 22:t.next=27;break;case 24:t.prev=24,t.t0=t.catch(6),i.e(t.t0);case 27:return t.prev=27,i.f(),t.finish(27);case 30:return t.abrupt("return",Object.values(n).map((function(t){var e;return{marketplace:t.marketplace,namespace:t.namespace,listingCount:t.listingCount,uniqueSellers:t.sellers.size,totalListedValue:t.totalListedValue,floorPrice:null!==(e=t.floorPrice)&&void 0!==e?e:0,avgPrice:t.listingCount?t.totalListedValue/t.listingCount:0,assetIds:t.assetIds,isCurrentMarketplace:t.marketplace===Nt(ge,d)}})));case 33:throw t.prev=33,t.t1=t.catch(0),console.error("Error fetching marketplaces:",t.t1.message),t.t1;case 37:case"end":return t.stop()}}),t,this,[[0,33],[6,24,27,30]])}))),function(){return y.apply(this,arguments)})},{key:"getMarketplaceCount",value:(f=Tt(Dt().mark((function t(){var e;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getMarketplaces();case 2:return e=t.sent,t.abrupt("return",e.length);case 4:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"listingStatus",value:(g=Tt(Dt().mark((function t(e){var n,i,r,a,o=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:Nt(ge,this),t.prev=1,t.next=4,zt(ke,this,sn).call(this,e,n);case 4:if(i=t.sent){t.next=7;break}return t.abrupt("return",{marketplace:n,assetId:String(e),exists:!1,listing:null});case 7:return t.abrupt("return",{marketplace:n,assetId:String(e),exists:!0,listing:i});case 10:if(t.prev=10,t.t0=t.catch(1),console.error("Error fetching listing status:",t.t0.message),!(null!==(r=t.t0.message)&&void 0!==r&&r.includes("not found")||null!==(a=t.t0.message)&&void 0!==a&&a.includes("does not exist")||404===t.t0.status)){t.next=15;break}return t.abrupt("return",{marketplace:n,assetId:String(e),exists:!1,listing:null});case 15:throw t.t0;case 16:case"end":return t.stop()}}),t,this,[[1,10]])}))),function(t){return g.apply(this,arguments)})},{key:"getMarketplaceStats",value:(m=Tt(Dt().mark((function t(){var e,n,i,r,a,o,s,l,c,h,d,u=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:Nt(ge,this),t.prev=1,t.next=4,zt(ke,this,an).call(this,e);case 4:n=t.sent,i=n.map((function(t){return{assetId:t.assetId,price:t.price,seller:t.seller}})),r=0,a=null,o=new Set,s=Et(i);try{for(s.s();!(l=s.n()).done;)c=l.value,h=c.price,d=c.seller,r+=h,a=null===a?h:Math.min(a,h),d&&o.add(d)}catch(t){s.e(t)}finally{s.f()}return t.abrupt("return",{marketplace:e,namespace:e.startsWith("AMX")?e.slice(3):e,listingCount:i.length,uniqueSellers:o.size,totalListedValue:r,floorPrice:null!=a?a:0,avgPrice:i.length?r/i.length:0,listings:i});case 14:throw t.prev=14,t.t0=t.catch(1),console.error("Error fetching marketplace stats:",t.t0.message),t.t0;case 18:case"end":return t.stop()}}),t,this,[[1,14]])}))),function(){return m.apply(this,arguments)})},{key:"getMarketplaceData",value:(p=Tt(Dt().mark((function t(){var e,n,i,r,a,o,s,l,c,h=this,d=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=d.length>0&&void 0!==d[0]?d[0]:Nt(ge,this),t.prev=1,t.next=4,zt(ke,this,an).call(this,e);case 4:if(0!==(n=t.sent).length){t.next=7;break}throw new Error("Marketplace ".concat(e," not found"));case 7:return t.next=9,Promise.all(n.map((function(t){return zt(ke,h,dn).call(h,t)})));case 9:return i=t.sent.filter(Boolean),r=new Set,a=new Set,o=0,s=null,i.forEach((function(t){r.add(t.listing.seller),t.currentHolder&&a.add(t.currentHolder),o+=t.listing.price,s=null===s?t.listing.price:Math.min(s,t.listing.price)})),l=i[0],c=l&&1===Number(l.total)&&0===Number(l.decimals)?"NFT":"FT",t.abrupt("return",{marketplace:e,namespace:e.startsWith("AMX")?e.slice(3):e,network:this.network,status:"Active",assetType:c,listings:i,listingCount:i.length,uniqueSellers:r.size,uniqueHolders:a.size,totalListedValue:o,floorPrice:null!=s?s:0,avgPrice:i.length?o/i.length:0});case 20:throw t.prev=20,t.t0=t.catch(1),console.error("Error fetching marketplace data:",t.t0.message),t.t0;case 24:case"end":return t.stop()}}),t,this,[[1,20]])}))),function(){return p.apply(this,arguments)})},{key:"getWalletAssets",value:(u=Tt(Dt().mark((function t(){var e,n,i,r,a,o,s,c,h,d=this,u=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=(e=u.length>0&&void 0!==u[0]?u[0]:{}).accountId,i=e.marketplaceOnly,r=void 0!==i&&i,t.prev=1,n){t.next=8;break}if(Nt(Zt,this)&&this.account){t.next=6;break}throw this.isMinimized&&this.maximizeSDK(!0),new Error("Wallet is not connected");case 6:t.next=9;break;case 8:l.validateRevenueWalletAddress(n);case 9:return a="".concat(Nt(re,this),"/v2/accounts/").concat(n||this.account),t.next=12,fetch(a);case 12:if((o=t.sent).ok){t.next=15;break}throw new Error("Indexer fetch error: ".concat(o.status));case 15:return t.next=17,o.json();case 17:return s=t.sent,c=(s.account.assets||[]).filter((function(t){return t.amount>0})),t.next=21,Promise.all(c.map(function(){var t=Tt(Dt().mark((function t(e){var n,i,a,o,s,l,c,h,u,p,m,g;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e["asset-id"],i="".concat(Nt(re,d),"/v2/assets/").concat(n),t.next=4,fetch(i);case 4:if((a=t.sent).ok){t.next=7;break}return t.abrupt("return",null);case 7:return t.next=9,a.json();case 9:if(o=t.sent,s=o.asset.params,l=zt(ke,d,pn).call(d,s),!r||zt(ke,d,mn).call(d,s)){t.next=14;break}return t.abrupt("return",null);case 14:return c=kt(kt({},s),{},{assetId:n,balance:e.amount,assetType:l?"NFT":"FT"}),t.next=17,zt(ke,d,gn).call(d,c,s);case 17:if(!r){t.next=22;break}return t.next=20,zt(ke,d,sn).call(d,n,Nt(ge,d));case 20:(h=t.sent)&&(c.listing={seller:h.seller,price:h.price,marketplace:h.marketplace});case 22:return u="".concat(Nt(re,d),"/v2/assets/").concat(n,"/balances?currency-greater-than=0"),t.next=25,fetch(u);case 25:if(!(p=t.sent).ok){t.next=32;break}return t.next=29,p.json();case 29:m=t.sent,(g=(m.balances||[]).find((function(t){return t.amount>0})))&&(c.currentHolder=g.address);case 32:return t.abrupt("return",c);case 33:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 21:return h=t.sent.filter(Boolean),t.abrupt("return",h);case 25:throw t.prev=25,t.t0=t.catch(1),console.error("Error fetching wallet assets:",t.t0.message),t.t0;case 29:case"end":return t.stop()}}),t,this,[[1,25]])}))),function(){return u.apply(this,arguments)})},{key:"getWalletNFTs",value:(d=Tt(Dt().mark((function t(){var e,n=arguments;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=n.length>0&&void 0!==n[0]?n[0]:{},t.abrupt("return",this.getWalletAssets(e));case 2:case"end":return t.stop()}}),t,this)}))),function(){return d.apply(this,arguments)})},{key:"getAssetMetadata",value:(h=Tt(Dt().mark((function t(e){var n;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.assetId,t.abrupt("return",this.getNFTMetadata({assetId:n}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"getNFTMetadata",value:(c=Tt(Dt().mark((function t(e){var n,i,r,a,o,s,l,c,h,d,u,p,m,g,f;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.assetId,t.prev=1,r="".concat(Nt(re,this),"/v2/assets/").concat(n),t.next=5,fetch(r);case 5:if((a=t.sent).ok){t.next=8;break}throw new Error("Failed to fetch asset data: ".concat(a.status));case 8:return t.next=10,a.json();case 10:return o=t.sent,s=o.asset.params,l=kt(kt({},s),{},{assetId:n}),t.next=15,zt(ke,this,sn).call(this,n,Nt(ge,this));case 15:if(t.t0=t.sent,t.t0){t.next=20;break}return t.next=19,zt(ke,this,cn).call(this,n);case 19:t.t0=t.sent;case 20:return(c=t.t0)&&(l.listing={seller:c.seller,price:c.price,marketplace:c.marketplace}),t.next=24,zt(ke,this,yn).call(this,l,s);case 24:return h="".concat(Nt(re,this),"/v2/assets/").concat(n,"/balances?currency-greater-than=0"),t.next=27,fetch(h);case 27:if(!(d=t.sent).ok){t.next=33;break}return t.next=31,d.json();case 31:(u=t.sent).balances&&u.balances.length>0&&(p=u.balances.find((function(t){return t.amount>0})))&&(l.currentHolder=p.address);case 33:return m="".concat(Nt(re,this),"/v2/transactions?asset-id=").concat(n,"&tx-type=acfg"),t.next=36,fetch(m);case 36:if((g=t.sent).ok){t.next=39;break}throw new Error("Failed to fetch asset config transaction: ".concat(g.status));case 39:return t.next=41,g.json();case 41:return f=t.sent,l.transactionId=null===(i=f.transactions)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.id,t.abrupt("return",l);case 46:throw t.prev=46,t.t1=t.catch(1),console.error("Error fetching NFT metadata:",t.t1.message),t.t1;case 50:case"end":return t.stop()}}),t,this,[[1,46]])}))),function(t){return c.apply(this,arguments)})},{key:"getFTMetadata",value:(s=Tt(Dt().mark((function t(e){var n;return Dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.assetId,t.abrupt("return",this.getNFTMetadata({assetId:n}));case 2:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"listNFT",value:(o=Tt(Dt().mark((function e(i){var r,a,o,s,l,c,h,d,u,p,m,g,f,y,v,w,b,x,S,A,C;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.assetId,a=i.nftPrice,e.prev=1,this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),Nt(Zt,this)&&this.account||zt(ke,this,Pe).call(this,"list an asset"),r&&a){e.next=8;break}throw new Error("Asset ID and price are required");case 8:if(!isNaN(r)&&!isNaN(a)){e.next=10;break}throw new Error("Asset ID and price must be a number.");case 10:return e.next=12,Nt(Ut,this).getAssetByID(r).do();case 12:if(o=e.sent,zt(ke,this,mn).call(this,o.params)){e.next=15;break}throw new Error("This marketplace only supports ".concat(Nt(me,this)," assets."));case 15:return s="".concat(Nt(re,this),"/v2/accounts/").concat(this.account),e.next=18,fetch(s);case 18:if((l=e.sent).ok){e.next=21;break}throw new Error("Failed to fetch account assets: ".concat(l.status));case 21:return e.next=23,l.json();case 23:if(c=e.sent,h=(c.account.assets||[]).find((function(t){return t["asset-id"]===r&&t.amount>0}))){e.next=27;break}throw new Error("You do not hold this asset in your wallet.");case 27:return d="NFT"===Nt(me,this)?1:Number(h.amount),e.next=30,Nt(Ut,this).getTransactionParams().do();case 30:return u=e.sent,p=kt(kt({},u),{},{flatFee:!0,fee:4e3}),m=xt(Nt(de,this),Nt(ge,this),r),g=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(ue,this),amount:1e5,suggestedParams:u}),f=Wt.methods.find((function(t){return"transferNFTToContractAndAddListing"===t.name})),y=t.Ay$.makeApplicationCallTxnFromObject({sender:this.account,appIndex:Nt(de,this),onComplete:t.Ay$.OnApplicationComplete.NoOpOC,appArgs:[f.getSelector(),t.Ay$.ABIType.from("uint64").encode(BigInt(r)),t.Ay$.ABIType.from("string").encode(this.account),t.Ay$.ABIType.from("string").encode(vt(a).toString()),t.Ay$.ABIType.from("string").encode(Nt(ge,this))],boxes:[m],foreignAssets:[r],suggestedParams:p}),v=t.Ay$.makeAssetTransferTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(ue,this),amount:BigInt(d),assetIndex:r,suggestedParams:u}),w=[g,y,v],Nt(be,this)>0&&(b=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(we,this),amount:vt(Nt(be,this)),suggestedParams:u}),w.push(b)),t.Ay$.assignGroupID(w),e.next=42,zt(ke,this,Me).call(this,w);case 42:return x=e.sent,e.next=45,Nt(Ut,this).sendRawTransaction(x).do();case 45:return S=e.sent,A=S.txid,e.next=49,t.Ay$.waitForConfirmation(Nt(Ut,this),A,10);case 49:return Vt(oe,this,null),Vt(le,this,null),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),e.next=56,this.getNFTMetadata({assetId:r});case 56:return C=e.sent,n.emit("nft:list:success",{nft:C,transactionId:A}),e.abrupt("return",{nft:C,transactionId:A});case 61:throw e.prev=61,e.t0=e.catch(1),console.error("Error listing NFT:",e.t0.message),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),n.emit("nft:list:failed",{error:"Could not list NFT!"}),e.t0;case 69:case"end":return e.stop()}}),e,this,[[1,61]])}))),function(t){return o.apply(this,arguments)})},{key:"unlistNFT",value:(a=Tt(Dt().mark((function e(i){var r,a,o,s,l,c,h,d,u,p,m,g,f,y;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.assetId,e.prev=1,this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),zt(ke,this,Pe).call(this,"unlist an asset"),r){e.next=8;break}throw new Error("Asset ID is required.");case 8:if(!isNaN(r)){e.next=10;break}throw new Error("Asset ID must be a number.");case 10:return e.next=12,this.getNFTMetadata({assetId:r});case 12:if(a=e.sent,zt(ke,this,mn).call(this,a)){e.next=15;break}throw new Error("This marketplace only supports ".concat(Nt(me,this)," assets."));case 15:if(a.listing.marketplace===Nt(ge,this)){e.next=17;break}throw new Error("Cannot un-list nft from other marketplace.");case 17:return e.next=19,Nt(Ut,this).getTransactionParams().do();case 19:return o=e.sent,s=kt(kt({},o),{},{flatFee:!0,fee:3e3}),l=xt(Nt(de,this),Nt(ge,this),r),c=t.Ay$.makeAssetTransferTxnWithSuggestedParamsFromObject({sender:this.account,receiver:this.account,amount:0,assetIndex:r,suggestedParams:o}),h=Wt.methods.find((function(t){return"transferNFTToSellerAndRemoveListing"===t.name})),d=t.Ay$.makeApplicationCallTxnFromObject({sender:this.account,appIndex:Nt(de,this),onComplete:t.Ay$.OnApplicationComplete.NoOpOC,appArgs:[h.getSelector(),t.Ay$.ABIType.from("uint64").encode(BigInt(r)),t.Ay$.ABIType.from("string").encode(this.account),t.Ay$.ABIType.from("string").encode(Nt(ge,this))],boxes:[l],foreignAssets:[r],suggestedParams:s}),u=[c,d],Nt(Se,this)>0&&(p=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(we,this),amount:vt(Nt(Se,this)),suggestedParams:o}),u.push(p)),t.Ay$.assignGroupID(u),e.next=30,zt(ke,this,Me).call(this,u);case 30:return m=e.sent,e.next=33,Nt(Ut,this).sendRawTransaction(m).do();case 33:return g=e.sent,f=g.txid,e.next=37,t.Ay$.waitForConfirmation(Nt(Ut,this),f,10);case 37:return Vt(oe,this,null),Vt(le,this,null),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),e.next=44,this.getNFTMetadata({assetId:r});case 44:return y=e.sent,n.emit("nft:buy:success",{nft:y,transactionId:f}),e.abrupt("return",{nft:y,transactionId:f});case 49:throw e.prev=49,e.t0=e.catch(1),console.error("Error un-listing NFT:",e.t0.message),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),n.emit("nft:unlist:failed",{error:"Could not unlist NFT!"}),e.t0;case 57:case"end":return e.stop()}}),e,this,[[1,49]])}))),function(t){return a.apply(this,arguments)})},{key:"buyNFT",value:(r=Tt(Dt().mark((function e(i){var r,a,o,s,l,c,h,d,u,p,m,g,f,y,v;return Dt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i.assetId,e.prev=1,this.processing=!0,Nt(ie,this).showLoadingOverlay("Processing..."),n.emit("sdk:processing:started",{processing:this.processing}),zt(ke,this,Pe).call(this,"buy an asset"),r){e.next=8;break}throw new Error("Asset ID is required.");case 8:if(!isNaN(r)){e.next=10;break}throw new Error("Asset ID must be a number.");case 10:return e.next=12,this.getNFTMetadata({assetId:r});case 12:if(a=e.sent,zt(ke,this,mn).call(this,a)){e.next=15;break}throw new Error("This marketplace only supports ".concat(Nt(me,this)," assets."));case 15:if(a.listing.seller!==this.account){e.next=17;break}throw new Error("Seller cannot buy the listed nft.");case 17:if(a.listing.marketplace===Nt(ge,this)){e.next=19;break}throw new Error("Cannot buy nft from other marketplace.");case 19:return e.next=21,Nt(Ut,this).getTransactionParams().do();case 21:return o=e.sent,s=kt(kt({},o),{},{flatFee:!0,fee:3e3}),l=xt(Nt(de,this),Nt(ge,this),r),c=t.Ay$.makeAssetTransferTxnWithSuggestedParamsFromObject({sender:this.account,receiver:this.account,amount:0,assetIndex:r,suggestedParams:o}),h=Wt.methods.find((function(t){return"transferNFTToReceiverAndRemoveListing"===t.name})),d=t.Ay$.makeApplicationCallTxnFromObject({sender:this.account,appIndex:Nt(de,this),onComplete:t.Ay$.OnApplicationComplete.NoOpOC,appArgs:[h.getSelector(),t.Ay$.ABIType.from("uint64").encode(BigInt(r)),t.Ay$.ABIType.from("string").encode(a.listing.seller),t.Ay$.ABIType.from("string").encode(Nt(ge,this))],boxes:[l],foreignAssets:[r],suggestedParams:s}),u=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:a.listing.seller,amount:vt(a.listing.price),suggestedParams:o}),p=[c,d,u],Nt(xe,this)>0&&(m=t.Ay$.makePaymentTxnWithSuggestedParamsFromObject({sender:this.account,receiver:Nt(we,this),amount:vt(Nt(xe,this)),suggestedParams:o}),p.push(m)),t.Ay$.assignGroupID(p),e.next=33,zt(ke,this,Me).call(this,p);case 33:return g=e.sent,e.next=36,Nt(Ut,this).sendRawTransaction(g).do();case 36:return f=e.sent,y=f.txid,e.next=40,t.Ay$.waitForConfirmation(Nt(Ut,this),y,10);case 40:return Vt(oe,this,null),Vt(le,this,null),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),e.next=47,this.getNFTMetadata({assetId:r});case 47:return v=e.sent,n.emit("nft:buy:success",{nft:v,transactionId:y}),e.abrupt("return",{nft:v,transactionId:y});case 52:throw e.prev=52,e.t0=e.catch(1),console.error("Error buying NFT:",e.t0.message),this.processing=!1,Nt(ie,this).hideLoadingOverlay(),n.emit("sdk:processing:stopped",{processing:this.processing}),n.emit("nft:buy:failed",{error:"Could not buy NFT!"}),e.t0;case 60:case"end":return e.stop()}}),e,this,[[1,52]])}))),function(t){return r.apply(this,arguments)})}],i&&Lt(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,r,a,o,s,c,h,d,u,p,m,g,f,y,v,w,b,x,S}()})(),window.AlgoMintX=__webpack_exports__.default})();